NI Linux Real-Time Discussions

cancel
Showing results for 
Search instead for 
Did you mean: 

ACM USB Serial Devices not working in RIO 15 / LabVIEW 2015

Fun coincidence the file descriptor could have been a valid error.... but looking at it now I see the open, return fd, read and close for the /proc/consoles call.

I'll dig further into the file tomorrow and let you know. Thanks!

0 Kudos
Message 11 of 22
(1,307 Views)

Interesting. I see this pattern MANY times in the strace file: Write with return count match, futex with timeout, REPEAT. Eventually I see less frequent futex calls and more write and ioctl calls...

In all there are 832 calls to write my specific command from the one VISA write call in the code. The ioctl calls and futex timeouts continue long after the last write. There are 6906 matches for "ioctl(25,"

and there are 7738 timeouts.

What's interesting to me is that the open /proc/consoles AND the open ACM calls both seem to return the fd of 25. Is that expected?

Here's a copy and paste of a larger segment (sorry for the massive paste):

1499  stat64("/dev/ttyACM0", {st_mode=S_IFCHR|0660, st_rdev=makedev(166, 0), ...}) = 0

1499  open("/proc/consoles", O_RDONLY|O_LARGEFILE <unfinished ...>

1476  <... clock_nanosleep resumed> NULL) = 0

1499  <... open resumed> )              = 25

1476  clock_gettime(CLOCK_REALTIME,  <unfinished ...>

1499  read(25,  <unfinished ...>

1476  <... clock_gettime resumed> {1458136428, 960407645}) = 0

1499  <... read resumed> "", 8191)      = 0

1476  clock_gettime(CLOCK_MONOTONIC,  <unfinished ...>

1499  close(25 <unfinished ...>

1476  <... clock_gettime resumed> {444, 572353890}) = 0

1499  <... close resumed> )             = 0

1476  clock_gettime(CLOCK_REALTIME,  <unfinished ...>

1499  open("/dev/ttyACM0", O_RDWR|O_NOCTTY|O_NONBLOCK <unfinished ...>

1476  <... clock_gettime resumed> {1458136428, 961054988}) = 0

1476  clock_nanosleep(CLOCK_MONOTONIC, TIMER_ABSTIME, {444, 581605913},  <unfinished ...>

1306  <... nanosleep resumed> NULL)     = 0

1306  gettimeofday( <unfinished ...>

1499  <... open resumed> )              = 25

1306  <... gettimeofday resumed> {1458136428, 962184}, NULL) = 0

1499  ioctl(25, SNDCTL_TMR_TIMEBASE or SNDRV_TIMER_IOCTL_NEXT_DEVICE or TCGETS <unfinished ...>

1306  futex(0x5b6f4, FUTEX_WAIT_REQUEUE_PI_PRIVATE|FUTEX_CLOCK_REALTIME, 90433, {1458136428, 962184000}, 0x5b720 <unfinished ...>

1499  <... ioctl resumed> , {B115200 -opost -isig -icanon -echo ...}) = 0

1306  <... futex resumed> )             = -1 ETIMEDOUT (Connection timed out)

1499  ioctl(25, TIOCEXCL <unfinished ...>

1306  futex(0x5b720, FUTEX_UNLOCK_PI_PRIVATE, 32 <unfinished ...>

1499  <... ioctl resumed> , 0)          = 0

1306  <... futex resumed> )             = 0

1499  ioctl(25, SNDCTL_TMR_START or SNDRV_TIMER_IOCTL_TREAD or TCSETS <unfinished ...>

1306  gettimeofday({1458136428, 963185}, NULL) = 0

1306  futex(0x5b6f4, FUTEX_WAIT_REQUEUE_PI_PRIVATE|FUTEX_CLOCK_REALTIME, 90435, {1458136428, 963185000}, 0x5b720) = -1 ETIMEDOUT (Connection timed out)

1306  futex(0x5b720, FUTEX_UNLOCK_PI_PRIVATE, 32) = 0

1306  nanosleep({0, 5000000},  <unfinished ...>

1499  <... ioctl resumed> , {B9600 -opost -isig -icanon -echo ...}) = 0

1499  ioctl(25, SNDCTL_TMR_START or SNDRV_TIMER_IOCTL_TREAD or TCSETS, {B9600 -opost -isig -icanon -echo ...}) = 0

1499  ioctl(25, SNDCTL_TMR_TIMEBASE or SNDRV_TIMER_IOCTL_NEXT_DEVICE or TCGETS, {B9600 -opost -isig -icanon -echo ...}) = 0

1499  ioctl(25, TIOCGRS485, 0xb4e90410) = -1 ENOTTY (Inappropriate ioctl for device)

1499  ioctl(25, TIOCGICOUNT, 0xb5a17134) = 0

1499  ioctl(25, TIOCMGET, [TIOCM_DTR|TIOCM_RTS|TIOCM_CTS]) = 0

1499  ioctl(25, TIOCMSET, [TIOCM_DTR|TIOCM_RTS|TIOCM_CTS]) = 0

1499  ioctl(25, TIOCMGET, [TIOCM_DTR|TIOCM_RTS|TIOCM_CTS]) = 0

1499  ioctl(25, TIOCMSET, [TIOCM_DTR|TIOCM_RTS|TIOCM_CTS]) = 0

1499  gettimeofday({1458136428, 965773}, NULL) = 0

1499  gettimeofday({1458136428, 966004}, NULL) = 0

1499  semop(98307, {{1, 1, SEM_UNDO}}, 1) = 0

1499  gettimeofday({1458136428, 966436}, NULL) = 0

1499  semop(98307, {{0, -1, SEM_UNDO|IPC_NOWAIT}}, 1) = 0

1499  semop(98307, {{0, 1, SEM_UNDO}}, 1) = 0

1499  gettimeofday({1458136428, 967018}, NULL) = 0

1499  gettimeofday( <unfinished ...>

1471  <... nanosleep resumed> 0xb5254ce8) = 0

1499  <... gettimeofday resumed> {1458136428, 967245}, NULL) = 0

1471  nanosleep({0, 100000000},  <unfinished ...>

1499  gettimeofday({1458136428, 967560}, NULL) = 0

1499  gettimeofday({1458136428, 967762}, NULL) = 0

1499  gettimeofday({1458136428, 967964}, NULL) = 0

1499  gettimeofday({1458136428, 968165}, NULL) = 0

1499  gettimeofday({1458136428, 968364}, NULL) = 0

1499  gettimeofday({1458136428, 968658}, NULL) = 0

1499  gettimeofday({1458136428, 968903}, NULL) = 0

1306  <... nanosleep resumed> NULL)     = 0

1499  gettimeofday( <unfinished ...>

1306  gettimeofday( <unfinished ...>

1499  <... gettimeofday resumed> {1458136428, 969130}, NULL) = 0

1306  <... gettimeofday resumed> {1458136428, 969215}, NULL) = 0

1499  gettimeofday( <unfinished ...>

1306  futex(0x5b6f4, FUTEX_WAIT_REQUEUE_PI_PRIVATE|FUTEX_CLOCK_REALTIME, 90437, {1458136428, 969215000}, 0x5b720 <unfinished ...>

1499  <... gettimeofday resumed> {1458136428, 969461}, NULL) = 0

1306  <... futex resumed> )             = -1 ETIMEDOUT (Connection timed out)

1499  gettimeofday( <unfinished ...>

1306  futex(0x5b720, FUTEX_UNLOCK_PI_PRIVATE, 32 <unfinished ...>

1499  <... gettimeofday resumed> {1458136428, 969802}, NULL) = 0

1306  <... futex resumed> )             = 0

1499  gettimeofday( <unfinished ...>

1476  <... clock_nanosleep resumed> NULL) = 0

1499  <... gettimeofday resumed> {1458136428, 970160}, NULL) = 0

1476  clock_gettime(CLOCK_REALTIME,  <unfinished ...>

1499  semop(98307, {{2, -1, SEM_UNDO|IPC_NOWAIT}}, 1 <unfinished ...>

1476  <... clock_gettime resumed> {1458136428, 970393691}) = 0

1499  <... semop resumed> )             = 0

1499  semop(98307, {{2, 1, SEM_UNDO}}, 1 <unfinished ...>

1476  clock_gettime(CLOCK_MONOTONIC,  <unfinished ...>

1499  <... semop resumed> )             = 0

1476  <... clock_gettime resumed> {444, 582452286}) = 0

1499  ioctl(25, SNDCTL_TMR_START or SNDRV_TIMER_IOCTL_TREAD or TCSETS <unfinished ...>

1476  clock_gettime(CLOCK_REALTIME,  <unfinished ...>

1499  <... ioctl resumed> , {B9600 -opost -isig -icanon -echo ...}) = 0

1476  <... clock_gettime resumed> {1458136428, 971182844}) = 0

1499  ioctl(25, SNDCTL_TMR_START or SNDRV_TIMER_IOCTL_TREAD or TCSETS <unfinished ...>

1476  clock_nanosleep(CLOCK_MONOTONIC, TIMER_ABSTIME, {444, 591605913},  <unfinished ...>

1306  gettimeofday({1458136428, 971655}, NULL) = 0

1306  futex(0x5b6f4, FUTEX_WAIT_REQUEUE_PI_PRIVATE|FUTEX_CLOCK_REALTIME, 90439, {1458136428, 971655000}, 0x5b720) = -1 ETIMEDOUT (Connection timed out)

1306  futex(0x5b720, FUTEX_UNLOCK_PI_PRIVATE, 32 <unfinished ...>

1499  <... ioctl resumed> , {B115200 -opost -isig -icanon -echo ...}) = 0

1499  ioctl(25, SNDCTL_TMR_TIMEBASE or SNDRV_TIMER_IOCTL_NEXT_DEVICE or TCGETS <unfinished ...>

1306  <... futex resumed> )             = 0

1499  <... ioctl resumed> , {B115200 -opost -isig -icanon -echo ...}) = 0

1306  nanosleep({0, 5000000},  <unfinished ...>

1499  gettimeofday({1458136428, 972593}, NULL) = 0

1499  semop(98307, {{2, -1, SEM_UNDO|IPC_NOWAIT}}, 1) = 0

1499  semop(98307, {{2, 1, SEM_UNDO}}, 1) = 0

1499  gettimeofday({1458136428, 973203}, NULL) = 0

1499  gettimeofday({1458136428, 973404}, NULL) = 0

1499  gettimeofday({1458136428, 973600}, NULL) = 0

1499  gettimeofday({1458136428, 973800}, NULL) = 0

1499  gettimeofday({1458136428, 974000}, NULL) = 0

1499  gettimeofday({1458136428, 974200}, NULL) = 0

1499  semop(98307, {{2, -1, SEM_UNDO|IPC_NOWAIT}}, 1) = 0

1499  semop(98307, {{2, 1, SEM_UNDO}}, 1) = 0

1499  gettimeofday({1458136428, 974786}, NULL) = 0

1499  semop(98307, {{2, -1, SEM_UNDO|IPC_NOWAIT}}, 1) = 0

1499  semop(98307, {{2, 1, SEM_UNDO}}, 1) = 0

1499  gettimeofday({1458136428, 975370}, NULL) = 0

1499  gettimeofday({1458136428, 975568}, NULL) = 0

1499  gettimeofday({1458136428, 975767}, NULL) = 0

1499  gettimeofday({1458136428, 976004}, NULL) = 0

1499  gettimeofday({1458136428, 976205}, NULL) = 0

1499  gettimeofday({1458136428, 976406}, NULL) = 0

1499  semop(98307, {{2, -1, SEM_UNDO|IPC_NOWAIT}}, 1) = 0

1499  semop(98307, {{2, 1, SEM_UNDO}}, 1) = 0

1499  gettimeofday({1458136428, 976991}, NULL) = 0

1499  semop(98307, {{2, -1, SEM_UNDO|IPC_NOWAIT}}, 1) = 0

1499  semop(98307, {{2, 1, SEM_UNDO}}, 1) = 0

1499  gettimeofday({1458136428, 977559}, NULL) = 0

1306  <... nanosleep resumed> NULL)     = 0

1499  gettimeofday( <unfinished ...>

1306  gettimeofday( <unfinished ...>

1499  <... gettimeofday resumed> {1458136428, 977849}, NULL) = 0

1306  <... gettimeofday resumed> {1458136428, 977935}, NULL) = 0

1499  gettimeofday( <unfinished ...>

1306  futex(0x5b6f4, FUTEX_WAIT_REQUEUE_PI_PRIVATE|FUTEX_CLOCK_REALTIME, 90441, {1458136428, 977935000}, 0x5b720 <unfinished ...>

1499  <... gettimeofday resumed> {1458136428, 978178}, NULL) = 0

1306  <... futex resumed> )             = -1 ETIMEDOUT (Connection timed out)

1499  gettimeofday( <unfinished ...>

1306  futex(0x5b720, FUTEX_UNLOCK_PI_PRIVATE, 32 <unfinished ...>

1499  <... gettimeofday resumed> {1458136428, 978591}, NULL) = 0

1306  <... futex resumed> )             = 0

1499  gettimeofday( <unfinished ...>

1306  gettimeofday( <unfinished ...>

1499  <... gettimeofday resumed> {1458136428, 978906}, NULL) = 0

1306  <... gettimeofday resumed> {1458136428, 978991}, NULL) = 0

1499  gettimeofday( <unfinished ...>

1306  futex(0x5b6f4, FUTEX_WAIT_REQUEUE_PI_PRIVATE|FUTEX_CLOCK_REALTIME, 90443, {1458136428, 978991000}, 0x5b720 <unfinished ...>

1499  <... gettimeofday resumed> {1458136428, 979238}, NULL) = 0

1499  semop(98307, {{2, -1, SEM_UNDO|IPC_NOWAIT}}, 1 <unfinished ...>

1306  <... futex resumed> )             = -1 ETIMEDOUT (Connection timed out)

1499  <... semop resumed> )             = 0

1499  semop(98307, {{2, 1, SEM_UNDO}}, 1 <unfinished ...>

1306  futex(0x5b720, FUTEX_UNLOCK_PI_PRIVATE, 32 <unfinished ...>

1499  <... semop resumed> )             = 0

1306  <... futex resumed> )             = 0

1499  gettimeofday( <unfinished ...>

1476  <... clock_nanosleep resumed> NULL) = 0

1499  <... gettimeofday resumed> {1458136428, 980078}, NULL) = 0

1499  semop(98307, {{2, -1, SEM_UNDO|IPC_NOWAIT}}, 1 <unfinished ...>

1476  clock_gettime(CLOCK_REALTIME,  <unfinished ...>

1499  <... semop resumed> )             = 0

1476  <... clock_gettime resumed> {1458136428, 980447337}) = 0

1499  semop(98307, {{2, 1, SEM_UNDO}}, 1 <unfinished ...>

1476  clock_gettime(CLOCK_MONOTONIC,  <unfinished ...>

1499  <... semop resumed> )             = 0

1476  <... clock_gettime resumed> {444, 592395151}) = 0

1499  gettimeofday( <unfinished ...>

1476  clock_gettime(CLOCK_REALTIME,  <unfinished ...>

1499  <... gettimeofday resumed> {1458136428, 981026}, NULL) = 0

1476  <... clock_gettime resumed> {1458136428, 981110280}) = 0

1499  gettimeofday( <unfinished ...>

1476  clock_nanosleep(CLOCK_MONOTONIC, TIMER_ABSTIME, {444, 601605913},  <unfinished ...>

1499  <... gettimeofday resumed> {1458136428, 981372}, NULL) = 0

1306  nanosleep({0, 5000000},  <unfinished ...>

1499  gettimeofday({1458136428, 981733}, NULL) = 0

1499  gettimeofday({1458136428, 981935}, NULL) = 0

1499  gettimeofday({1458136428, 982134}, NULL) = 0

1499  gettimeofday({1458136428, 982335}, NULL) = 0

1499  gettimeofday({1458136428, 982534}, NULL) = 0

1499  gettimeofday({1458136428, 982734}, NULL) = 0

1499  gettimeofday({1458136428, 982971}, NULL) = 0

1499  gettimeofday({1458136428, 983177}, NULL) = 0

1499  gettimeofday({1458136428, 983378}, NULL) = 0

1499  gettimeofday({1458136428, 983576}, NULL) = 0

1499  semop(98307, {{2, -1, SEM_UNDO|IPC_NOWAIT}}, 1) = 0

1499  semop(98307, {{2, 1, SEM_UNDO}}, 1 <unfinished ...>

1463  <... nanosleep resumed> NULL)     = 0

1499  <... semop resumed> )             = 0

1463  nanosleep({0, 55000000},  <unfinished ...>

1499  ioctl(25, SNDCTL_TMR_START or SNDRV_TIMER_IOCTL_TREAD or TCSETS, {B9600 -opost -isig -icanon -echo ...}) = 0

1499  ioctl(25, SNDCTL_TMR_START or SNDRV_TIMER_IOCTL_TREAD or TCSETS, {B115200 -opost -isig -icanon -echo ...}) = 0

1499  ioctl(25, SNDCTL_TMR_TIMEBASE or SNDRV_TIMER_IOCTL_NEXT_DEVICE or TCGETS, {B115200 -opost -isig -icanon -echo ...}) = 0

1499  gettimeofday({1458136428, 986393}, NULL) = 0

1499  semop(98307, {{2, -1, SEM_UNDO|IPC_NOWAIT}}, 1) = 0

1499  semop(98307, {{2, 1, SEM_UNDO}}, 1 <unfinished ...>

1306  <... nanosleep resumed> NULL)     = 0

1499  <... semop resumed> )             = 0

1306  gettimeofday( <unfinished ...>

1499  gettimeofday( <unfinished ...>

1306  <... gettimeofday resumed> {1458136428, 987010}, NULL) = 0

1499  <... gettimeofday resumed> {1458136428, 987088}, NULL) = 0

1306  futex(0x5b6f4, FUTEX_WAIT_REQUEUE_PI_PRIVATE|FUTEX_CLOCK_REALTIME, 90445, {1458136428, 987010000}, 0x5b720 <unfinished ...>

1499  gettimeofday( <unfinished ...>

1306  <... futex resumed> )             = -1 ETIMEDOUT (Connection timed out)

1499  <... gettimeofday resumed> {1458136428, 987444}, NULL) = 0

1306  futex(0x5b720, FUTEX_UNLOCK_PI_PRIVATE, 32 <unfinished ...>

1499  gettimeofday( <unfinished ...>

1306  <... futex resumed> )             = 0

1499  <... gettimeofday resumed> {1458136428, 987779}, NULL) = 0

1306  gettimeofday( <unfinished ...>

1499  gettimeofday( <unfinished ...>

1306  <... gettimeofday resumed> {1458136428, 988004}, NULL) = 0

1499  <... gettimeofday resumed> {1458136428, 988075}, NULL) = 0

1306  futex(0x5b6f4, FUTEX_WAIT_REQUEUE_PI_PRIVATE|FUTEX_CLOCK_REALTIME, 90447, {1458136428, 988004000}, 0x5b720 <unfinished ...>

1499  gettimeofday( <unfinished ...>

1306  <... futex resumed> )             = -1 ETIMEDOUT (Connection timed out)

1499  <... gettimeofday resumed> {1458136428, 988486}, NULL) = 0

1306  futex(0x5b720, FUTEX_UNLOCK_PI_PRIVATE, 32) = 0

1306  nanosleep({0, 5000000},  <unfinished ...>

1499  gettimeofday({1458136428, 989042}, NULL) = 0

1499  gettimeofday({1458136428, 989248}, NULL) = 0

1499  semop(98307, {{2, -1, SEM_UNDO|IPC_NOWAIT}}, 1) = 0

1499  semop(98307, {{2, 1, SEM_UNDO}}, 1) = 0

1499  ioctl(25, FIONREAD, [0])          = 0

1499  ioctl(25, TCFLSH <unfinished ...>

1476  <... clock_nanosleep resumed> NULL) = 0

1499  <... ioctl resumed> , 0)          = 0

1476  clock_gettime(CLOCK_REALTIME,  <unfinished ...>

1499  ioctl(25, TIOCGICOUNT <unfinished ...>

1476  <... clock_gettime resumed> {1458136428, 990314700}) = 0

1499  <... ioctl resumed> , 0xb5a17134) = 0

1476  clock_gettime(CLOCK_MONOTONIC,  <unfinished ...>

1499  gettimeofday( <unfinished ...>

1476  <... clock_gettime resumed> {444, 602257267}) = 0

1499  <... gettimeofday resumed> {1458136428, 990741}, NULL) = 0

1499  semop(98307, {{2, -1, SEM_UNDO|IPC_NOWAIT}}, 1 <unfinished ...>

1476  clock_gettime(CLOCK_REALTIME,  <unfinished ...>

1499  <... semop resumed> )             = 0

1476  <... clock_gettime resumed> {1458136428, 991091457}) = 0

1499  semop(98307, {{2, 1, SEM_UNDO}}, 1 <unfinished ...>

1476  clock_nanosleep(CLOCK_MONOTONIC, TIMER_ABSTIME, {444, 611605913},  <unfinished ...>

1499  <... semop resumed> )             = 0

1499  gettimeofday({1458136428, 991634}, NULL) = 0

1499  gettimeofday({1458136428, 991854}, NULL) = 0

1499  gettimeofday({1458136428, 992095}, NULL) = 0

1499  clock_gettime(CLOCK_MONOTONIC, {444, 603903769}) = 0

1499  gettimeofday({1458136428, 992499}, NULL) = 0

1499  gettimeofday({1458136428, 992699}, NULL) = 0

1499  gettimeofday({1458136428, 992895}, NULL) = 0

1499  gettimeofday({1458136428, 993094}, NULL) = 0

1499  gettimeofday({1458136428, 993294}, NULL) = 0

1499  gettimeofday({1458136428, 993492}, NULL) = 0

1499  semop(98307, {{2, -1, SEM_UNDO|IPC_NOWAIT}}, 1) = 0

1499  semop(98307, {{2, 1, SEM_UNDO}}, 1) = 0

1499  gettimeofday( <unfinished ...>

1306  <... nanosleep resumed> NULL)     = 0

1499  <... gettimeofday resumed> {1458136428, 994076}, NULL) = 0

1306  gettimeofday( <unfinished ...>

1499  gettimeofday( <unfinished ...>

1306  <... gettimeofday resumed> {1458136428, 994306}, NULL) = 0

1499  <... gettimeofday resumed> {1458136428, 994382}, NULL) = 0

1306  futex(0x5b6f4, FUTEX_WAIT_REQUEUE_PI_PRIVATE|FUTEX_CLOCK_REALTIME, 90449, {1458136428, 994306000}, 0x5b720 <unfinished ...>

1499  gettimeofday( <unfinished ...>

1306  <... futex resumed> )             = -1 ETIMEDOUT (Connection timed out)

1499  <... gettimeofday resumed> {1458136428, 994729}, NULL) = 0

1499  gettimeofday( <unfinished ...>

1306  futex(0x5b720, FUTEX_UNLOCK_PI_PRIVATE, 32 <unfinished ...>

1499  <... gettimeofday resumed> {1458136428, 994965}, NULL) = 0

1306  <... futex resumed> )             = 0

1499  gettimeofday( <unfinished ...>

1306  gettimeofday( <unfinished ...>

1499  <... gettimeofday resumed> {1458136428, 995278}, NULL) = 0

1306  <... gettimeofday resumed> {1458136428, 995363}, NULL) = 0

1499  gettimeofday( <unfinished ...>

1306  futex(0x5b6f4, FUTEX_WAIT_REQUEUE_PI_PRIVATE|FUTEX_CLOCK_REALTIME, 90451, {1458136428, 995363000}, 0x5b720 <unfinished ...>

1499  <... gettimeofday resumed> {1458136428, 995615}, NULL) = 0

1306  <... futex resumed> )             = -1 ETIMEDOUT (Connection timed out)

1499  gettimeofday( <unfinished ...>

1306  futex(0x5b720, FUTEX_UNLOCK_PI_PRIVATE, 32 <unfinished ...>

1499  <... gettimeofday resumed> {1458136428, 995945}, NULL) = 0

1499  ioctl(25, TIOCGICOUNT <unfinished ...>

1306  <... futex resumed> )             = 0

1499  <... ioctl resumed> , 0xb4e90b60) = 0

1306  nanosleep({0, 5000000},  <unfinished ...>

1499  gettimeofday({1458136428, 996499}, NULL) = 0

1499  select(1024, NULL, [25], NULL, {0, 0}) = 1 (out [25], left {0, 0})

1499  write(25, "\0012\0Summer\0\201\31", 12) = 12

1499  gettimeofday({1458136428, 997217}, NULL) = 0

1499  ioctl(25, TCFLSH, 0x1)            = 0

1499  ioctl(25, TIOCGICOUNT, 0xb4e90b10) = 0

1499  gettimeofday({1458136428, 997748}, NULL) = 0

1499  gettimeofday({1458136428, 997948}, NULL) = 0

1499  gettimeofday({1458136428, 998248}, NULL) = 0

1499  gettimeofday({1458136428, 998515}, NULL) = 0

1499  gettimeofday({1458136428, 998724}, NULL) = 0

1499  ioctl(25, TIOCGICOUNT, 0xb4e90ac0) = 0

1499  gettimeofday({1458136428, 999101}, NULL) = 0

1499  select(1024, NULL, [25], NULL, {0, 0}) = 1 (out [25], left {0, 0})

1499  write(25, "\0012\0Summer\0\201\31", 12) = 12

1499  gettimeofday({1458136428, 999798}, NULL) = 0

1499  ioctl(25, TCFLSH <unfinished ...>

1476  <... clock_nanosleep resumed> NULL) = 0

1499  <... ioctl resumed> , 0x1)        = 0

1499  ioctl(25, TIOCGICOUNT <unfinished ...>

1476  clock_gettime(CLOCK_REALTIME,  <unfinished ...>

1499  <... ioctl resumed> , 0xb4e90a70) = 0

1476  <... clock_gettime resumed> {1458136429, 402260}) = 0

1499  gettimeofday( <unfinished ...>

1476  clock_gettime(CLOCK_MONOTONIC,  <unfinished ...>

1499  <... gettimeofday resumed> {1458136429, 662}, NULL) = 0

1476  <... clock_gettime resumed> {444, 612341212}) = 0

1499  gettimeofday( <unfinished ...>

1476  clock_gettime(CLOCK_REALTIME,  <unfinished ...>

1499  <... gettimeofday resumed> {1458136429, 1005}, NULL) = 0

1476  <... clock_gettime resumed> {1458136429, 1079708}) = 0

1499  gettimeofday( <unfinished ...>

1476  clock_nanosleep(CLOCK_MONOTONIC, TIMER_ABSTIME, {444, 621605913},  <unfinished ...>

1499  <... gettimeofday resumed> {1458136429, 1343}, NULL) = 0

1306  <... nanosleep resumed> NULL)     = 0

1499  gettimeofday( <unfinished ...>

1306  gettimeofday( <unfinished ...>

1499  <... gettimeofday resumed> {1458136429, 1695}, NULL) = 0

1306  <... gettimeofday resumed> {1458136429, 1780}, NULL) = 0

1499  clock_gettime(CLOCK_MONOTONIC,  <unfinished ...>

1306  futex(0x5b6f4, FUTEX_WAIT_REQUEUE_PI_PRIVATE|FUTEX_CLOCK_REALTIME, 90453, {1458136429, 1780000}, 0x5b720 <unfinished ...>

1499  <... clock_gettime resumed> {444, 613631653}) = 0

1477  <... nanosleep resumed> 0xb4f3cd08) = 0

1499  gettimeofday( <unfinished ...>

1477  clock_gettime(CLOCK_MONOTONIC,  <unfinished ...>

1499  <... gettimeofday resumed> {1458136429, 2360}, NULL) = 0

1477  <... clock_gettime resumed> {444, 614038915}) = 0

1499  gettimeofday( <unfinished ...>

1477  clock_gettime(CLOCK_MONOTONIC,  <unfinished ...>

1499  <... gettimeofday resumed> {1458136429, 2679}, NULL) = 0

1477  <... clock_gettime resumed> {444, 614363206}) = 0

1499  gettimeofday( <unfinished ...>

1477  nanosleep({0, 99000000},  <unfinished ...>

1499  <... gettimeofday resumed> {1458136429, 2993}, NULL) = 0

1499  gettimeofday( <unfinished ...>

1306  <... futex resumed> )             = -1 ETIMEDOUT (Connection timed out)

0 Kudos
Message 12 of 22
(1,307 Views)

MRedRaider wrote:

Interesting. I see this pattern MANY times in the strace file: Write with return count match, futex with timeout, REPEAT. Eventually I see less frequent futex calls and more write and ioctl calls...

In all there are 832 calls to write my specific command from the one VISA write call in the code. The ioctl calls and futex timeouts continue long after the last write. There are 6906 matches for "ioctl(25,"

and there are 7738 timeouts.

...

Some of this can be normal use and expected. It's difficult to know without looking at the source of the library being used under the G API. I believe that came from Amulet. It would be interesting to compare a working standard serial port trace and a non-working USB-serial trace, but ultimately it likely comes down to the contents of that library.

MRedRaider continues:

...

What's interesting to me is that the open /proc/consoles AND the open ACM calls both seem to return the fd of 25. Is that expected?

...


As I hinted at above, once a file descriptor is closed, it's available for re-use. This is normal and expected.

1499  open("/proc/consoles", O_RDONLY|O_LARGEFILE <unfinished ...>

...

1499  <... open resumed> )              = 25

...

1499  read(25,  <unfinished ...>

...

1499  <... read resumed> "", 8191)      = 0

...

1499  close(25 <unfinished ...>

...

1499  <... close resumed> )             = 0

...

1499  open("/dev/ttyACM0", O_RDWR|O_NOCTTY|O_NONBLOCK <unfinished ...>

...

1499  <... open resumed> )              = 25

0 Kudos
Message 13 of 22
(1,307 Views)

visa config is just before the first write, errors before permissions fix on all RIO versions I've tried. No error after even on RIO 15:Amulet VISA Open.png

this is directly after the config and freezes up / returns a timeout. This works in RIO 14 and desktop now. The shipping example is a statemachine so nothing else is going on:

Amulet VISA call.png

0 Kudos
Message 14 of 22
(1,307 Views)

Were you able to check to see if this works with RIO 15.x and the direct serial connection?

0 Kudos
Message 15 of 22
(1,307 Views)

Found a daughterboard and tested. Works fine with the inbuilt 232 port...

0 Kudos
Message 16 of 22
(1,307 Views)

Now, what I was suggesting is that it'd be interesting to compare a working trace against a non-working, specifically around the accesses to the port. You may want to use the -ff option instead of -f to have different processes/threads dump to different files (since all of the accesses should happen from within one thread, this will cut down on the noise).

0 Kudos
Message 17 of 22
(1,307 Views)

Alright. I did a strace with RS232 working and I notice the following:

Open is the same, ioctl calls look the same, some futexes do timeout.

The writes look the same as well -

RS232:

1474  write(31, "\0012\0Summer\0\201\31", 12 <unfinished ...>

1282  clock_gettime(CLOCK_MONOTONIC,  <unfinished ...>

1474  <... write resumed> )             = 12

ACM:

1499  write(25, "\0012\0Summer\0\201\31", 12 <unfinished ...>

1306  futex(0x5b6f4, FUTEX_WAIT_REQUEUE_PI_PRIVATE|FUTEX_CLOCK_REALTIME, 99891, {1458136448, 872740000}, 0x5b720 <unfinished ...>

1499  <... write resumed> )             = 12

I search for the first READ on each and there's an interesting difference, likely a result of the repeated writes on the ACM -

RS232:

1474  read(31,  <unfinished ...>

1282  <... clock_nanosleep resumed> NULL) = 0

1474  <... read resumed> "\1", 1)       = 1

ACM:

1499  read(25,  <unfinished ...>

1476  <... clock_gettime resumed> {454, 612661999}) = 0

1499  <... read resumed> "\0012\201\365\0012\201\365\0012\201\365\0012\201\365\0012\201\365\0012\201\365\0012\201\365\0012\201\365"..., 1024) = 1024

I verified that there were no close commands between the port open and these reads...

I'm happy to send the full files... probably need a dropbox or FTP server for that though.

0 Kudos
Message 18 of 22
(1,307 Views)

Nothing about those snippets seems to be indicative of issues at the tty level, they are working as expected. It seems that the difference between the two is something in the difference in the (likely) CRC16-oriented functional mode that the display is being communicated to (checking the Amulet GEM users guide).

I don't know that there's anything addition that can be done without digging into the libraries being used to try to determine what is different in the operation modes or of course tracing the actual serial (on the line) traffic to note the differences in behavior.

You could alway use pastebin to put up the logs. If the relevant bits won't fit, there are other services out there that do the same thing.

0 Kudos
Message 19 of 22
(1,307 Views)

Too big for pastebin without a pro account. I zipped them and put them on ftp.ni.com/incoming

separate zips-

  1. amuletTraceACM.zip
  2. amuletTraceRS232.zip

There's a rar of the 232 as well...missed the zip setting when I compressed it.

0 Kudos
Message 20 of 22
(1,307 Views)