GNOME Bugzilla – Bug 683525
China TeleCom CBP7.1 causes modem-manager to crash (SEGV)
Last modified: 2012-09-28 18:42:24 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).
Created attachment 223690 [details] NetworkManager log Info to get the logs in https://wiki.ubuntu.com/DebuggingModemmanager
Comment on attachment 223688 [details] modem-manager log Info to get the logs in https://wiki.ubuntu.com/DebuggingModemmanager
Created attachment 223692 [details] output of mm-test.py Suggested in https://wiki.ubuntu.com/DebuggingModemmanager $ python ./mm-test.py
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!
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.
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).
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
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.
Created attachment 223837 [details] The output of wvdialconf.
Created attachment 223838 [details] The content of /etc/wvdial.conf (I appended the "smart" profile, below the "Defaults").
Created attachment 223841 [details] The output of 'wvdial smart'.
Created attachment 223842 [details] The content of /var/log/syslog after 'wvdial smart' command.
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!
Also: AT+CREG?
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'.
And some more: AT+EVCSQ2 AT^GPSMODE? AT^GPSLOC=? AT+VROM? AT+VLOCINFO? Thanks again!
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
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.
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.
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 ...
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.
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.
Argh, stupid mistake on my part. New build: http://koji.fedoraproject.org/koji/taskinfo?taskID=4479784
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. ...
Created attachment 224262 [details] Log of NetworkManager (with ModemManager 0.6.0.0-1.2.fc17)
Created attachment 224263 [details] Output of mm-test.py (with ModemManager 0.6.0.0-1.2.fc17)
Another stupid bug which was my fault. And another build for you to test: http://koji.fedoraproject.org/koji/taskinfo?taskID=4491857 Thanks!
Any luck with the latest build?
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.
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!
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!
Hi, Dan Williams. Sure, I'll try out the latest test builds when I am back home. Thanks.
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.