# Unable to receive data from /dev/ttyACM0 device

## manoj24

Description:

=========

Using USB based CAN device connected on AR9350 mips processor based Atheros reference board with linux kernel 2.6.32.61. Which is coming up as /dev/ttyACM0 device. In which Able to transmit data from application to the H/W device, but not able to receive data from the CAN device to the board.

Tested this on Fedora12 with linux 2.6.31 kernel where every thing is working fine. Also tested on AR71xx mips based Atheros reference board with linux kernel 2.6.32.61, here also every thing is working fine.

Device terminal settings:

===================

Below are the terminal settings used for /dev/ttyACM0 device on both AR9350 and AR71xx boards,

 *Quote:*   

> [root@localhost /root]# stty -a < /dev/ttyACM0
> 
> speed 460800 baud; rows 24; columns 80; intr = ^C; quit = ^\; erase = ^?; kill = ^U; eof = ^D; eol = ; eol2 = ; swtch = ; 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 -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

 

Main Problem:

==========

when we open the device acm_rx_tasklet is getting invoked but the list in acm filled_read_bufs is empty. And also acm_read_bulk func is not getting called for adding receive buffer into filled_read_bufs list.

Note:

====

Have observed the same problem as mentioned above in AR71xx board and Fedora12 system when baud-rate is other than 460800.

Debug Log:

=========

Below is the debug log with enabling CONFIG_USB_DEBUG option in kernel and DEBUG option in cdc-acm.c file. Here acm_read_bulk func is not getting called which is needed.

 *Quote:*   

> drivers/usb/class/cdc-acm.c: Entering acm_tty_open.
> 
> ath-ehci ath-ehci.0: reused qh 82e14980 schedule
> 
> usb 1-1.1: link qh2-0e01/82e14980 start 1 [1/2 us]
> ...

 

Help needed:

==========

Please suggest some tips to debug this issue. May be some more terminal settings needed to make this working. Not able to understand why only RX is not happening but able to do TX from board to Device.

----------

