Page 1 of 1

usb_modeswitch on embedded platform. Guessing ttyUSB*

Posted: 16 Jul 2012, 12:16
by tirant
Good Morning everyone,

I have ported usb_modeswitch for my embedded platform. We don't use udev at all, so we usually run usb_modeswitch when we detect a new usb device connected to the system with the vendor and prod id.

Code: Select all

 $ usb_modeswitch -c 19d2\:1013 

But then we have the problem of multiple ttyUSB* files created, and usually only one works for PPP connections. We have an interactive script to check which one is working for every modem, but it is tedious.

Is there any information in usb_modeswitch or a way to get which is the correct ttyUSB* file/port?

Thanks.

PS. I have to add that no /dev/gsmmodem is created in my system as a symbolic link to the correct ttyUSBX

Posted: 16 Jul 2012, 22:57
by Josh
Fortunately, you don't have to guess ...

Take the lowest ttyUSB port (interface) that includes an endpoint with "Interrupt" type. You can check this in the device tree (under "/sys/bus/usb/devices").

Posted: 18 Jul 2012, 08:40
by tirant
Josh wrote:Fortunately, you don't have to guess ...

Take the lowest ttyUSB port (interface) that includes an endpoint with "Interrupt" type. You can check this in the device tree (under "/sys/bus/usb/devices").
That's really helpful! Thanks a lot!