Comment 104 for bug 868034

Revision history for this message
Aleksander Morgado (aleksander-m) wrote : Re: Huawei E220 can't connect on Ubuntu 11.10

Mark: Thanks for the logs

I can find two main differences in the MM 0.4 (the one which worked) and MM 0.5 (the one which failed) log.

 1) In the MM 0.5 log, the secondary ttyUSB1 gets probed and grabbed as secondary port; while in the MM 0.4 log capability probing in that port is not even launched (just grep for "USB1" in both logs, and compare the results)

In the MM 0.4 log:
<debug> [mm-modem-base.c:155] mm_modem_base_add_port(): (ttyUSB1) type ignored claimed by /sys/devices/pci0000:00/0000:00:1a.1/usb4/4-2

In the MM 0.5 log:
<debug> [mm-modem-base.c:155] mm_modem_base_add_port(): (ttyUSB1) type secondary claimed by /sys/devices/pci0000:00/0000:00:1a.1/usb4/4-2

This is already pretty weird, as in MM 0.4 the ttyUSB1 port is grabbed but wasn't probed at all. I wonder if there is some kind of issue with the kernel driver which exposes two ports with usbif=0. Don't know if that is even possible.

2) MM 0.5 has some changes in the Huawei plugin. We now use "AT^CURC", "AT^GETPORTMODE" commands when it gets initialized. AT^CURC=0 when the first port is tried will disable unsolicited messages in the secondary port, and AT^GETPORTMODE tries to query

In any case, the problem seems to be that the modem gets rebooted at some point. This happens after we enable unsolicited messages in the secondary port with AT^CURC=1, and after we send the first commands to that secondary port. Last logs from the modem show this BOOT message.
<debug> [mm-at-serial-port.c:298] debug_log(): (ttyUSB1): <-- '<CR><LF>^BOOT:92988511,0,0,0,6<CR><LF>'

If someone can do more tests, I would now try:

A) Try the MM 0.4 version from Ubuntu 11.04 directly in Ubuntu 11.10. You should be able to dpkg --purge modem-manager (no package depends on it in Ubuntu) ad then dpkg -i the specific deb retrieved from the Ubuntu 11.04 archive. This would help to see if we do get ttyUSB1 grabbed also as secondary port in the newer kernel.

B) Hack the Huawei plugin in a custom MM 0.5 branch so that it ignores all ports except for the primary one grabbed. This can be done by changing the whole last else {} switch in grab_port() within plugins/mm-plugin-huawei.c, to just mm_modem_grab_port() passing ptype = MM_PORT_TYPE_IGNORED. This would help to see if we really are managing wrong the secondary port, and is just better to skip it in this specific modem, or try to refix it if we know how.