4

I have a single Sierra Wireless USB 308 modem we are using for sending SMS message to, and receiving SMS messages from, customers.

When this single device is plugged in, the system creates multiple device files: /dev/ttyUSB0, /dev/ttyUSB1, /dev/ttyUSB2, /dev/ttyUSB3. I read somewhere that the sending of SMSes must use the third device file (/dev/ttyUSB2). I'm using SMS tools.

Questions:

  1. Why does a single device produce multiple device files in the /dev directory?
  2. I want to be able to symlink /dev/ttyUSB2 to /dev/sms-sierra. When running udevadm info -a /dev/ttyUSBXXX on each device file (where "XXX" is "0", "1", "2" or "3"), the information for each "device" is almost identical. Because the device numberings are not always the same, how can I write a udev rule to detect the appropriate device number to use?

For question 1, I have no idea. For question 2, is there a program required in order to probe the device file as to whether it can send SMS (e.g., by seeing if it responds to the appropriate modem "AT" commands)?

  • What is the output of lsusb for this device? – Faheem Mitha Apr 15 '16 at 16:41
0

Question 1: The kernel creates multiple ttyUSB for concurrect requests, you can't use /dev/ttyUSB0 for SMS while it's connected to other program (WvDial, pppd, ModemManager..etc.)

Question 2: minicom

0

This is common, but still mysterious. Telit and Huawei modems do the same thing. Telit at least, specify how many there will be in their Linux USB Driver - User Guide.

For example, with the Telit LE910 I'm using at the moment, the USB PID is 0x1201, which is listed as providing via serial to Linux "5 ports /dev/ttyUSBx". There is a curious footnote on the corresponding table, stating:

Not all the ports exposed by a modem can be used for AT commands sending: please refer to the proper AT commands User Guide for port arrangement description.

Following the "AT commands" trail turns out to be a wild goose chase. Searching for "port arrangement description" instead turns up a bit more information, some misleading, some illuminating. This image appears in the "TELIT 3G MODULES PORTS ARRANGEMENTS USER GUIDE":

enter image description here

Pay attention to the green paths. The modem has a "Virtual Serial Device" which, when connected via USB to a computer (DTE), presents a number of "USB Channels". The mapping of those channels to the modem's "Access Points" is configurable. The "AT0", "AT1", "AT2" access points appear to provide concurrent AT command sessions. The "TT" access point appears to be an old communications interface for use with a "TTC Tool" to create a "TTC Connection". And finally, the GPS access point is a standard GNSS interface that can provide NMEA sentences.

So depending on how your modem is configured, I would expect that your ttyUSB devices are some permutation of these access points.

For example, by trial and error it seems in my case the first two and the last (ttyUSB0, ttyUSB1 and ttyUSB4) are not AT ports, while the other two are (ttyUSB2 and ttyUSB3).

So the answer to your question 2 is: you can't. It's up to the modem's configuration to determine which device is connected to which function.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.