How to determine which GobiSerial port is the AT command port?

Hi I am using the EM7455 and the GobiNet and GobiSerial driver. Everything seems to be working fine.

From Linux, I like to find out which of the 3 /ttyUSB ports is the AT command port. How can I do that?
Right now I am just assuming it is always ttyUSB2 but that may not always be the case.


The easiest way to test is by sending AT to each port and see if there is OK response.
Another option is to use qmi sdk api to check which is the AT port.

The AT command port is always USB interface #3 on the EM7455 and most other current Sierra Wireless modems. So you can simply match against this attribute in sysfs. Either simple command line matching (this does not check the vendor id, so it could easily fail, but you get the idea):

bjorn@miraculix:~$ readlink /sys/bus/usb-serial/devices/ttyUSB*|sed -ne 's,.*3/tty,tty,p'

Or you could create a udev rule to help you identify the port, eg. by using a fixed symlink name:


Lots of possibilities. The clue is the fixed interface number.