After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 683525 - China TeleCom CBP7.1 causes modem-manager to crash (SEGV)
China TeleCom CBP7.1 causes modem-manager to crash (SEGV)
Status: RESOLVED FIXED
Product: NetworkManager
Classification: Platform
Component: ModemManager
0.9.x
Other Linux
: Normal normal
: ---
Assigned To: Dan Williams
NetworkManager maintainer(s)
Depends on:
Blocks:
 
 
Reported: 2012-09-06 19:11 UTC by Joshua Rocky Tuahta Purba
Modified: 2012-09-28 18:42 UTC
See Also:
GNOME target: ---
GNOME version: 3.3/3.4


Attachments
modem-manager log (63.33 KB, text/plain)
2012-09-06 19:11 UTC, Joshua Rocky Tuahta Purba
Details
NetworkManager log (10.03 KB, text/plain)
2012-09-06 19:14 UTC, Joshua Rocky Tuahta Purba
Details
output of mm-test.py (498 bytes, text/plain)
2012-09-06 19:16 UTC, Joshua Rocky Tuahta Purba
Details
AT commands execution and result from minicom. (6.53 KB, text/plain)
2012-09-07 10:37 UTC, Joshua Rocky Tuahta Purba
Details
The output of wvdialconf. (1.59 KB, text/plain)
2012-09-09 09:52 UTC, Joshua Rocky Tuahta Purba
Details
The content of /etc/wvdial.conf (I appended the "smart" profile, below the "Defaults"). (464 bytes, text/plain)
2012-09-09 09:55 UTC, Joshua Rocky Tuahta Purba
Details
The output of 'wvdial smart'. (557 bytes, text/plain)
2012-09-09 10:06 UTC, Joshua Rocky Tuahta Purba
Details
The content of /var/log/syslog after 'wvdial smart' command. (754 bytes, text/plain)
2012-09-09 10:15 UTC, Joshua Rocky Tuahta Purba
Details
AT commands execution and result from minicom (session 2). (2.13 KB, text/plain)
2012-09-10 21:03 UTC, Joshua Rocky Tuahta Purba
Details
AT commands execution and result from minicom (session 3). (235 bytes, text/plain)
2012-09-11 05:23 UTC, Joshua Rocky Tuahta Purba
Details
ModemManager log (with Via CBP plugin). (18.30 KB, text/plain)
2012-09-11 19:12 UTC, Joshua Rocky Tuahta Purba
Details
NetworkManager log (when ModemManager has Via CBP plugin). (3.14 KB, text/plain)
2012-09-11 19:16 UTC, Joshua Rocky Tuahta Purba
Details
Output of mm-test.py (when ModemManager has Via CBP plugin). (17 bytes, text/plain)
2012-09-11 19:18 UTC, Joshua Rocky Tuahta Purba
Details
Log of ModemManager 0.6.0.0-1.2.fc17 (18.37 KB, text/plain)
2012-09-13 19:32 UTC, Joshua Rocky Tuahta Purba
Details
Log of NetworkManager (with ModemManager 0.6.0.0-1.2.fc17) (3.14 KB, text/plain)
2012-09-13 19:35 UTC, Joshua Rocky Tuahta Purba
Details
Output of mm-test.py (with ModemManager 0.6.0.0-1.2.fc17) (16 bytes, text/plain)
2012-09-13 19:37 UTC, Joshua Rocky Tuahta Purba
Details

Description Joshua Rocky Tuahta Purba 2012-09-06 19:11:38 UTC
Created attachment 223688 [details]
modem-manager log

Using USB (CDMA) modem China TeleCom CBP7.1 to connect to the network will cause modem-manager to crash.

Simplest steps to reproduce (requirement: usb-modeswitch-1.2.4 and usb-modeswitch-data-20120815):
1. Plug the China TeleCom CBP7.1 modem.
2. Activate a CDMA network connection in the nm-applet.
3. After a while, modem-manager will crash by itself.

If usb-modeswitch, or the usb-modeswitch-data is below the above version, these are the steps to reproduce:
1. Plug the China TeleCom CBP7.1 modem.
2. Choose either one: eject the device, or switch the device's mode using usb_modeswitch.
   2.1. By using eject (from terminal):
        $ eject /dev/sr1
   2.2. By using usb_modeswitch (from terminal as root):
        $ usb_modeswitch -v 15eb -p 7153 -V 15eb -P 7152 -M "5553424312345678000000000000061b000000020000000000000000000000"
3. Load driver module for the modem. Choose either one:
   3.1. usbserial driver (from terminal as root):
        $ sudo modprobe usbserial vendor=0x15eb product=0x7152
   3.2. option driver (from terminal as root):
        $ modprobe option
        $ echo "15eb 7152" > /sys/bus/usb-serial/drivers/option1/new_id
4. Activate a CDMA network connection in the nm-applet.
5. After a while, modem-manager will crash by itself.

Tested in:
1. Ubuntu 12.04 LTS (amd64), Linux kernel version 3.2.0-29-generic.
2. Fedora 17 x86_64 Desktop Live.

N.B.:
1. The logs I attached are from Ubuntu.
2. See my dialog in usb_modeswitch forum for more information (starting from http://www.draisberghof.de/usb_modeswitch/bb/viewtopic.php?f=4&t=974&start=15#p6601).
Comment 1 Joshua Rocky Tuahta Purba 2012-09-06 19:14:11 UTC
Created attachment 223690 [details]
NetworkManager log

Info to get the logs in https://wiki.ubuntu.com/DebuggingModemmanager
Comment 2 Joshua Rocky Tuahta Purba 2012-09-06 19:14:27 UTC
Comment on attachment 223688 [details]
modem-manager log

Info to get the logs in https://wiki.ubuntu.com/DebuggingModemmanager
Comment 3 Joshua Rocky Tuahta Purba 2012-09-06 19:16:01 UTC
Created attachment 223692 [details]
output of mm-test.py

Suggested in https://wiki.ubuntu.com/DebuggingModemmanager
$ python ./mm-test.py
Comment 4 Dan Williams 2012-09-06 20:03:30 UTC
So the problem is that MM is attempting to find out whether the modem is registered with the network or not. Since the modem doesn't use standard CDMA AT commands (AT+CSS) and it's not a Qualcomm chip (it's a Via CBP7) and thus we don't have DIAG, we need to figure out what AT commands the chip does use.  I've snooped around the Mac OS X connection manager for this device using strings, and I have some AT commands we should try.

So first, you need to install minicom on your Ubuntu machine.  That should be as easy as "apt-get install minicom".  After that, we'll need to attach the modem to the Ubuntu machine and run minicom like so from a terminal:

sudo minicom -D /dev/ttyUSB2

that will drop you into minicom, where we can talk to the modem.  To exit minicom at any time, hit CTL+A, then Z and choose "yes" to exit.

So what you want to do is just type the following commands to the modem, hit return, and then make a note of the response so you can paste it back into this report.  Probably best to make a text file, paste in the commands I want output from, and then when you get the response, paste that into the text file just below the original command.

AT^CPRL?

AT^MIN?

AT^HDRCSQ?
AT^HDRCSQ
AT^HDRCSQ=?

AT^AUTHMODE?
AT^AUTHMODE
AT^AUTHMODE=?

AT^MEID?
AT^MEID

AT^MDN
AT^MDN?

AT^CNET?
AT^CNET
AT^CNET=?

AT^ROAM?
AT^ROAM=?
AT^ROAM

AT^MCCMNC
AT^MCCMNC=?
AT^MCCMNC?

AT^CPIN$?
AT^CPIN?

AT^RSSI?
AT^RSSI

AT^PREFMODE?
AT^PREFMODE=?
AT^PREFMODE

AT^PREPAID?
AT^PREPAID
AT^PREPAID=?

AT^SYSCONFIG?
AT^SYSCONFIG=?
AT^SYSCONFIG

AT^SYSINFO?
AT^SYSINFO=?
AT^SYSINFO

Thanks!
Comment 5 Joshua Rocky Tuahta Purba 2012-09-07 10:37:19 UTC
Created attachment 223743 [details]
AT commands execution and result from minicom.

Hi, Dan William. Thanks for responding.

I attached the output of the AT commands from minicom in the 'minicom-session.log.txt'.

Extra information: the modem is branded as Cyrus MC400.
Comment 6 Dan Williams 2012-09-07 15:05:36 UTC
Excellent, the commands should give us what we need here.  We have SYSINFO, which gives us registration and roaming information, while HDRCSQ gives us EVDO signal strength.  PREFMODE gives us 2G / 3G preference.

Some of the others might be unsolicited codes which we don't send directly, but which the modem emits periodically when things like signal strength change.  We'll have to see later when we have better support for the device what those might be.

So now we get to create a plugin for this modem, probably including other CBP7-based devices.  The commands follow the Huawei command set pretty closely, actually.  (Also; the Smartfren AC682 appears to be a CBP7 device, but also has some ZTE-type commands mixed in.  Somewhat bizarre).
Comment 7 Dan Williams 2012-09-07 15:45:21 UTC
Developer note: we'll use AT+CSQ for CDMA 1x RSSI, and HDRCSQ for EVDO RSSI, depending on what SYSINFO says.  Basically just like the Huawei CDMA code does, which is what the China TeleCom CBP7 devices seem to follow.

Also, AT+TIME results for when we implement the Time API for CDMA:

AT+TIME
+TIME: 2012-09-07 22:32:26:320,430301924,NOR,CDMA
OK
Comment 8 Joshua Rocky Tuahta Purba 2012-09-09 09:51:06 UTC
Hi, Dan Williams.

By following a blog post (http://ridhanux.blogspot.com/2011/11/setting-modem-smartfren-ac682-di-ubuntu.html), I managed to make the device working.

This is what I do (in terminal):

---

< Using other means for internet connectivity. >

$ sudo apt-get install wvdial

$ sudo service network-manager stop

$ sudo service modemmanager stop

< This is when I plugged the modem in. >
< Need to eject modem manually, because the device is not yet supported >
< in usb_modeswitch 1.2.3. In usb_modeswitch 1.2.4 (and newest data > 
< package) this wouldn't be necessary. >

$ sudo eject /dev/sr0

$ sudo modprobe option

$ sudo su

# echo "15eb 7152" > /sys/bus/usb-serial/drivers/option1/new_id

# exit

$ sudo wvdialconf

< See the attachment wvdialconf.log for the output of above command. >
< Next I edited the /etc/wvdial.conf to add dialer profile (see attachment). >

$ sudo wvdial smart

< See the attachment wvdial_smart.log for the output of above command. >

---

Done.
Now I am connected to the internet.
The catch is, the connection is not managed by NetworkManager.
Comment 9 Joshua Rocky Tuahta Purba 2012-09-09 09:52:32 UTC
Created attachment 223837 [details]
The output of wvdialconf.
Comment 10 Joshua Rocky Tuahta Purba 2012-09-09 09:55:47 UTC
Created attachment 223838 [details]
The content of /etc/wvdial.conf (I appended the "smart" profile, below the "Defaults").
Comment 11 Joshua Rocky Tuahta Purba 2012-09-09 10:06:58 UTC
Created attachment 223841 [details]
The output of 'wvdial smart'.
Comment 12 Joshua Rocky Tuahta Purba 2012-09-09 10:15:47 UTC
Created attachment 223842 [details]
The content of /var/log/syslog after 'wvdial smart' command.
Comment 13 Dan Williams 2012-09-10 16:22:06 UTC
If you get a chance, could you grab the output of the following commands?

AT+CREG=?
AT+CIEV=?
AT+ARSI=?
AT+VMCCMNC?
AT+VMCC?
AT+VMNC?
AT+VPON?
AT+CREG?
AT+CSNID?

thanks!
Comment 14 Dan Williams 2012-09-10 16:25:59 UTC
Also:

AT+CREG?
Comment 15 Joshua Rocky Tuahta Purba 2012-09-10 21:03:53 UTC
Created attachment 223957 [details]
AT commands execution and result from minicom (session 2).

Hi, Dan Williams. Thanks for the response.

I attached the output of the new AT commands from minicom in the
'minicom_session_2.log.txt'.
Comment 16 Dan Williams 2012-09-10 21:18:35 UTC
And some more:

AT+EVCSQ2
AT^GPSMODE?
AT^GPSLOC=?
AT+VROM?
AT+VLOCINFO?

Thanks again!
Comment 17 Dan Williams 2012-09-10 23:57:48 UTC
Still want the AT command responses from comment 16 (so we can get other info,  like whether we're using EVDOr0 or EVDOrA), but I've pushed a 'via' branch that should work with these devices.

Fedora 17 test builds here; if you're able to test, please do the same test procedure and grab the logs so we can make sure everything is working correctly.

http://koji.fedoraproject.org/koji/taskinfo?taskID=4473547
Comment 18 Joshua Rocky Tuahta Purba 2012-09-11 05:23:30 UTC
Created attachment 223984 [details]
AT commands execution and result from minicom (session 3).

Hi, Dan Williams. Thanks for the response.

I attached the output of the latest AT commands from minicom in the
'minicom_session_3.log.txt'.

Regarding the Fedora 17 test build, I'll try getting the necessary logs as soon as I can.

Right now, I am not sure yet how to use the information you described in http://koji.fedoraproject.org/koji/taskinfo?taskID=4473547.

I assume that I need to download the 2 RPMs (according to my CPU architecture):
1. ModemManager-0.6.0.0-1.1.fc17.x86_64.rpm 
2. ModemManager-debuginfo-0.6.0.0-1.1.fc17.x86_64.rpm

Then I need to kill all NetworkManager and ModemManager processes, and proceed to install the newly downloaded RPMs.

After that I need to start the NetworkManager and ModemManager processes in a way that produces the debug logs.

I'll try this as soon as I can.
Comment 19 Dan Williams 2012-09-11 13:17:12 UTC
Sorry!  I should have been more specific.  You only need RPM #1 (the main MM RPM), and after you install that (which you can do with "rpm -Uhv /path/to/rpm" if you like to do it manually, otherwise you can do "yum localinstall /path/to/rpm") you can "killall -TERM modem-manager".  Then you can proceed to reproduce the logs as you've done in comment #2 from DebuggingModemManager.
Comment 20 Joshua Rocky Tuahta Purba 2012-09-11 19:12:25 UTC
Created attachment 224039 [details]
ModemManager log (with Via CBP plugin).

Hi, Dan Williams. Thanks for the clarification.

Using the 'ModemManager-0.6.0.0-1.1.fc17', now the Mobile Broadband connection entry is not even listed in the nm-applet.

This is the debug log of ModemManager, on Fedora 17 Live Desktop.
The modem manager has been updated using:
rpm -Uvh ModemManager-0.6.0.0-1.1.fc17.x86_64.rpm

Interesting lines in the log:
...
[mm-manager.c:640] do_grab_port(): plugin 'Via CBP7' claimed to support tty/ttyUSB0 but couldn't: (0) Only CDMA modems are currently supported by this plugin.
...
[mm-manager.c:640] do_grab_port(): plugin 'Via CBP7' claimed to support tty/ttyUSB2 but couldn't: (0) Only CDMA modems are currently supported by this plugin.
...
[mm-manager.c:640] do_grab_port(): plugin 'Via CBP7' claimed to support tty/ttyUSB2 but couldn't: (0) Only CDMA modems are currently supported by this plugin.
...
[mm-plugin-base.c:859] real_handle_probe_response(): Couldn't probe for capabilities, probably not a GSM or CDMA modem
...
Comment 21 Joshua Rocky Tuahta Purba 2012-09-11 19:16:13 UTC
Created attachment 224042 [details]
NetworkManager log (when ModemManager has Via CBP plugin).

This is the debug log of NetworkManager, from the same execution as in comment #20.
Comment 22 Joshua Rocky Tuahta Purba 2012-09-11 19:18:24 UTC
Created attachment 224043 [details]
Output of mm-test.py (when ModemManager has Via CBP plugin).

This is the output of:
python ./mm-test.py

This is from the same execution/test-iteration as in comment #20.
Comment 23 Dan Williams 2012-09-13 04:31:07 UTC
Argh, stupid mistake on my part.  New build:

http://koji.fedoraproject.org/koji/taskinfo?taskID=4479784
Comment 24 Joshua Rocky Tuahta Purba 2012-09-13 19:32:55 UTC
Created attachment 224261 [details]
Log of ModemManager 0.6.0.0-1.2.fc17

Hi, Dan Williams. Thanks for responding.

I have just tried the latest ModemManager test build (version 0.6.0.0-1.2.fc17 from http://koji.fedoraproject.org/koji/taskinfo?taskID=4479784).

The result is still the same as comment #20. That is: the 'Mobile Broadband' entry is still not listed in the nm-applet.

In this log, the explanation also appears to be similar to comment #20:
...
[mm-manager.c:640] do_grab_port(): plugin 'Via CBP7' claimed to support tty/ttyUSB0 but couldn't: (0) Only CDMA modems are currently supported by this plugin.
...
[mm-manager.c:640] do_grab_port(): plugin 'Via CBP7' claimed to support tty/ttyUSB2 but couldn't: (0) Only CDMA modems are currently supported by this plugin.
...
Comment 25 Joshua Rocky Tuahta Purba 2012-09-13 19:35:58 UTC
Created attachment 224262 [details]
Log of NetworkManager (with ModemManager 0.6.0.0-1.2.fc17)
Comment 26 Joshua Rocky Tuahta Purba 2012-09-13 19:37:23 UTC
Created attachment 224263 [details]
Output of mm-test.py (with ModemManager 0.6.0.0-1.2.fc17)
Comment 27 Dan Williams 2012-09-17 15:00:15 UTC
Another stupid bug which was my fault.  And another build for you to test:

http://koji.fedoraproject.org/koji/taskinfo?taskID=4491857

Thanks!
Comment 28 Dan Williams 2012-09-19 20:14:05 UTC
Any luck with the latest build?
Comment 29 Joshua Rocky Tuahta Purba 2012-09-21 06:04:16 UTC
Hi, Dan Williams, I am sorry for my late response.

Regarding the latest build, I'll try it out as soon as I can.
But I think it is best that I tell you of my situation first. Right now, I am located somewhere without CDMA network, so I cannot try out the build straight away (the modem is useless without CDMA network).

When I get back home (which could take 3 weeks from now), I'll try it out.

Again, I am really sorry for this.
Comment 30 Dan Williams 2012-09-21 17:12:43 UTC
Hey,  no problem.  ezee on the NM mailing list has been trying it out too, and found a bug.  The build from comment 27 isn't going to work.  I'll post a new one soon.  Thanks!
Comment 31 Dan Williams 2012-09-21 18:18:09 UTC
http://koji.fedoraproject.org/koji/taskinfo?taskID=4511966

If you get a chance.  If the RPMs have been deleted by the time you're able to test, let me know and I'll do another test build. Thanks!
Comment 32 Joshua Rocky Tuahta Purba 2012-09-24 05:29:36 UTC
Hi, Dan Williams.

Sure, I'll try out the latest test builds when I am back home.

Thanks.
Comment 33 Dan Williams 2012-09-28 18:42:24 UTC
Plugin merged to MM_06, tested working on the mailing list.  Test builds available here:

http://people.redhat.com/dcbw/ModemManager/via/

Let me know how they work for you.