Automatic Activation, Hotplug and UDEV, Configuration
Post Reply
tirant
Posts: 7
Joined: 13 Jul 2012, 13:52

usb_modeswitch on embedded platform. Guessing ttyUSB*

Post by tirant » 16 Jul 2012, 12:16

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

Josh
Site Admin
Posts: 6593
Joined: 03 Nov 2007, 00:30

Post by Josh » 16 Jul 2012, 22:57

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").

tirant
Posts: 7
Joined: 13 Jul 2012, 13:52

Post by tirant » 18 Jul 2012, 08:40

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!

Post Reply