Search code examples
linuxlinux-device-driverttycdc

cdc_acm initialization takes a long time


I'm having an USB device, which is not a modem, that gets recognized as a ttyACM under Linux. I can open this path for read/write operations with standard system calls. The problem I have seen is that in the first 20 seconds after plug-in, some USB packets are lost, and this happens with great probability.

I recompiled the cdc_acm driver and enabled DEBUG and VERBOSE_DEBUG. Since the output is too long, I'm pasting it here. I'm seeing the sequence acm_tty_install, acm_tty_open repeated twice, under no apparent reason. Also, there are many acm_softint calls which take somewhere around 3 seconds to "finish", based on dmesg timestamps.

Appreciate if you have some clues on what is going on.


Solution

  • It seems that the modemmanager daemon triggers upon plug-in and start sending AT commands to my device, repeating it twice, probably because it doesn't get any response. A simple stop modemmanager does the trick.