GNOME Bugzilla – Bug 598939
sierra: use the 'data' port for PPP
Last modified: 2013-03-10 13:53:26 UTC
According to http://sierrawireless.custhelp.com/app/answers/detail/a_id/500#GSM/UMTS_AT_Commands, the data port for the Sierra MC8775 (VID:PID 1199:6813) is /dev/ttyUSB2 and the AT command port is /dev/ttyUSB0. I verified it using the method mentioned as described there: "If you connected to the AT command port, the AT command ati5 displays the modem information. If you connected to the Data port, the AT command ati5 returns OK only." I'd like to write a script which collects some info about signal strength, etc. But as NM uses /dev/ttyUSB0, I can't collect anything as the port is busy. Could you give me some hints where I can change the ttyUSB port? BTW, I'm running latest Ubuntu Karmic.
The ports used are autodetected by ModemManager based on modem probing and cannot be changed manually (for a few good reasons). To diagnose your problem, could you please: 1) stop NetworkManager 2) stop modem-manager (killall -TERM modem-manager) 3) as root: modem-manager --debug and let it find your 8775. Then please post the output of modem-manager into this bug report. Thanks!
Created attachment 146007 [details] modem-manager debug output Please find attached the requested debug output.
That log looks correct; ttyUSB0 is the main port, and ttyUSB2 is the secondary port. ttyUSB2 will be used by ModemManager to retrieve signal strength, cell technology state, and unsolicited cell location updates while ttyUSB0 is used for PPP. Many Sierra devices expose more than two AT-capable ports which can be used for GPS/etc, and any of the others are available since MM only claims two. Note that while MM is running, you can query MM for signal status at any time using the D-Bus API. So you shouldn't need a script really, since ModemManager is already doing this for you, which is the reason it claims two ports, not just one. We may be misdetecting which port should be used for data on the Sierra devices (my 8775 allows PPP on what I think is the AT command port) but that's a different bug. So I'd recommend using the ModemManager D-Bus API (see http://cgit.freedesktop.org/ModemManager/ModemManager/tree/introspection ) to grab signal strength and other info while connected. If there are bugs with that, we need to fix them. dbus-send --system --print-reply --dest=org.freedesktop.ModemManager /org/freedesktop/ModemManager/Modems/0 org.freedesktop.ModemManager.Modem.Gsm.Network.GetSignalQuality will print out the current signal quality for you, as long as the modem has been enabled with the org.freedesktop.ModemManager.Modem.Enable(true) method like so: dbus-send --system --print-reply --dest=org.freedesktop.ModemManager /org/freedesktop/ModemManager/Modems/0 org.freedesktop.ModemManager.Modem.Enable boolean:true
Ok, thanks a lot for the info regarding the D-Bus API. And I think that you're right that the PPP port is not correctly detected. As I wrote, the Sierra FAQ mentions that /dev/ttyUSB0 is the AT command port and /dev/ttyUSB2 the PPP port. Is there already a bug report?
With my 8775, ttyUSB0 is the *data* port, and ttyUSB2 is the *AT* port. What does your modem respond with on both those ports when you type "ATI" in minicom? I get: ttyUSB0 -------------- Sierra Wireless, Inc. MC8775 APP1 OK ttyUS2: ------------- Manufacturer: Sierra Wireless, Inc. Model: MC8775 Revision: H2_0_8_19MCAP G:/WS/FW/H2_0_8_19MCAP/MSM6280/SRC 2008/08/29 18:28:52 IMEI: <hidden> IMEI SV: 13 FSN: <hidden> 3GPP Release 5 +GCAP: +CGSM,+FCLASS,+DS which means that ttyUSB2 is the AT port and ttyUSB0 is the data port. It simply wouldn't make sense the other way around, because ttyUSB0 doesn't implement a full AT command parser, and thus is only usable for signal strength (AT+CSQ) and ATD#99*. This if you used ttyUSB2 as the data port, you wouldn't be able to get cell location updates, technology changes, or SMS notifications on APP1/ttyUSB0 because it's parser is crippled. So the only way this makes sense is if the APP1 port is the data port, and ttyUSB2 is the AT port. But... I tried yesterday with my 8775 and could not get the device to hold a PPP session on the "data" (APP1) port. The connection setup works, but PPP fails immediately. PPP works just fine with the same configuration on the "AT" port. I think what you're referring to is this mail: http://lkml.indiana.edu/hypermail/linux/kernel/0903.2/00824.html "By far the most efficient interface is the one that shows up on /dev/ttyUSB0 and you will get the best throughput if you use that interface." by which he means the "data"/APP1 port. I also saw your name floating around in forums about the HSDPA 7.2 firmware upgrade when I was trying to update my firmware to see if the PPP failures were firmware related (they weren't). I now have the 2.x firmware on my 8775 (and 1.9 firmware on my HP hs2300 which is a rebranded 8775) and both of them fail PPP the same way. So I'll have to follow up with Sierra here to find out why.
Here's my output: whoopie@x61t:~$ com /dev/ttyUSB0 C-a exit, C-x modem lines status [STATUS]: RTS CTS DSR DCD DTR ati Manufacturer: Sierra Wireless, Inc. Model: MC8775 Revision: H2_0_8_19MCAP G:/WS/FW/H2_0_8_19MCAP/MSM6280/SRC 2008/08/29 18:28:52 IMEI: <hidden> IMEI SV: 13 FSN: <hidden> 3GPP Release 5 +GCAP: +CGSM,+DS,+ES OK whoopie@x61t:~$ com /dev/ttyUSB2 C-a exit, C-x modem lines status [STATUS]: RTS DTR Sierra Wireless, Inc. MC8775 APP1 OK It's absolutely the same output as yours, but the ports are swapped!
Another report: https://bugs.launchpad.net/modemmanager/+bug/504035
The MC8780 is also affected. Someone on freenode's ##ibmthinkpad channel gave me the following info when executing the ATI command: ttyUSB0: Sierra Wireless, Inc. MC8780 APP1 ttyUSB2: Manufacturer: Sierra Wireless, Inc. Model: MC8780 Revision: F1_2_3_15AP C:/WS/FW/F1_2_3_15AP/MSM7200R3/SRC/AMSS 2008/07/09 13:02:11 IMEI: … That means that ttyUSB0 is the data port and ttyUSB2 the AT port. But he told me that the connection is established over ttyUSB2. Couldn't the logic just be changed that the port with "APP1" output is marked as the primary port (and not the secondary one)?
(In reply to comment #8) > Couldn't the logic just be changed that the port with "APP1" output is marked > as the primary port (and not the secondary one)? Unfortunately for some modems APP1 actually has the minimal command parser where most commands are rejected. You'll notice that if the port doesn't even echo back your commands, and ATE1 still doesn't cause echo-back. I've sent mail to Sierra folk about "at!csdonsio2?", we'll see what they say.
FYI, I don't own this Sierra modem anymore.
MM 0.6 and later should do the right thing here, but since I can't test with my 8775s (they appear to fail PPP any time the secondary ports are used) I've currently limited it to specific devices like the 8781. If we find more devices that support it we can widen the checks here.
As mentioned, I don't own the device anymore, so it's up to others to give the needed info.
k. let's assume this to be OBSOLETE then.