2

I have a development board which will have 3 ACM interfaces when connected to Ubuntu host and i want to transfer data from Host to Device over ttyACM3.

I have followed the following procedure for data transfer,

Precondition:

  1. Modify /etc/inittab to remove Linux console on /dev/ttyGS3
  2. Create a binary file with a minimum length of about 20MBytes

Test Steps:

  1. DUT side: stty -F /dev/ttyGS3 raw -echo -echoe -echok -echoctl -echoke
  2. HOST side: stty -F /dev/ttyACM3 raw -echo -echoe -echok -echoctl -echoke
  3. DUT side: cat /dev/ttyGS3 > /tmp/rx_pattern.bin
  4. HOST side: cat ./pattern.bin > /dev/ttyACM3

By following above procedure i see some data(~300 KB) is missed at the DUT side randomly. I have also used "dd" command for data transfer but still there is a data loss.

But i tried to transfer the same "pattern.bin" file from the Host by using "minicom" application and "cat" command to receive from DUT side, surprisingly i don't see any data loss.

I have took USB Ellisys logs during issue scenario,

  1. One of the "OUT" transaction is failed(handshake is NAK) and there is no "PING" transaction for the failed transfer.

  2. Whereas in success scenario whenever "OUT" transaction fails, "PING" transaction is present and data is sent again.

stty command difference on the both the hosts.

Ubuntu 14.04:

speed 115200 baud; rows 0; columns 0; line = 0;
intr = ^C; quit = ^\; erase = ^?; kill = ^U; eof = ^A; eol = <undef>; eol2 = <undef>; swtch = <undef>; start = ^Q;
stop = ^S; susp = ^Z; rprnt = ^R; werase = ^W; lnext = ^V; flush = ^O; min = 1; time = 0;
-parenb -parodd cs8 hupcl -cstopb cread -clocal -crtscts
-ignbrk -brkint -ignpar -parmrk -inpck -istrip -inlcr -igncr -icrnl -ixon -ixoff -iuclc -ixany -imaxbel -iutf8
-opost -olcuc -ocrnl -onlcr -onocr -onlret -ofill -ofdel nl0 cr0 tab0 bs0 vt0 ff0
-isig -icanon -iexten -echo -echoe -echok -echonl -noflsh -xcase -tostop -echoprt -echoctl -echoke

Ubuntu 16.04:

speed 9600 baud; rows 0; columns 0; line = 0;
intr = ^C; quit = ^\; erase = ^?; kill = ^U; eof = ^D; eol = <undef>; eol2 = <undef>; swtch = <undef>; start = ^Q;
stop = ^S; susp = ^Z; rprnt = ^R; werase = ^W; lnext = ^V; discard = ^O; min = 1; time = 0;
-parenb -parodd -cmspar cs8 hupcl -cstopb cread clocal -crtscts
-ignbrk -brkint -ignpar -parmrk -inpck -istrip -inlcr -igncr -icrnl -ixon -ixoff -iuclc -ixany -imaxbel -iutf8
-opost -olcuc -ocrnl onlcr -onocr -onlret -ofill -ofdel nl0 cr0 tab0 bs0 vt0 ff0
-isig -icanon iexten -echo -echoe -echok -echonl -noflsh -xcase -tostop -echoprt -echoctl -echoke -flusho -extproc

Surprisingly if i keep open ACM3 port from Minicom application and tries to send data, there is no data loss even in Ubuntu 14.4.

Rui F Ribeiro
  • 55,929
  • 26
  • 146
  • 227

0 Answers0