2
I have a Huawei E353 modem which I'm using with a Raspberry Pi.
When I plug it in, I get three TTYs - ttyUSB0, ttyUSB1 and ttyUSB2.
But sometimes the modem interface (where you can issue Hayes-type AT commands) is on ttyUSB0 and sometimes it's on ttyUSB1.
I can't spot any common factor that makes the difference. And I'm not certain, but it does seem that it always does the same thing on the same Pi (or maybe the same dongle - I've got several of each and haven't had a chance to try different combinations too much).
Can anyone suggest what influences the tty numbering?
This may be incorrect depending on your distribution. – davidgo – 2017-04-08T18:49:00.150
@davidgo: I still have to see a non-ancient distribution where it is incorrect. Care to elaborate? At least for any distribution using
udev
, it is not incorrect. – dirkt – 2017-04-08T18:56:29.467Sorry. The first line of your post put me off - because a fair few devices are coded by modern OS's to get fixed addresses (based on udev) at runtime - Ethernet springs to mind for a start, but also drives addressed by uuid or partition name and many others. Your solution to craft udev rules is spot on though. – davidgo – 2017-04-08T19:05:12.817
@davidgo: And note that even new style network interface names don't always work reliably - there are a few questions on stackexchange relating to that. So, just don't rely on them if you for some reason need to identify a particular device. – dirkt – 2017-04-08T19:09:52.863
As for the other answer, you seem to have missed the point. These are not separate devices but one USB device handled by one driver (
huawei_cdc_ncm
) that presents three ttys. I'm not sure how to distinguish the ttys in the output oflsusb
- especially since it seems the device doesn't present a standard usbserial interface (all the interfaces are either USB Mass Storage class or class 255 - Vendor Specific). – Tom – 2017-04-10T10:18:06.623