Modem functionality of the Huawei E173 and E3131 doesn't work

Bug #1057186 reported by Hanine HAMZIOUI on 2012-09-26
128
This bug affects 24 people
Affects Status Importance Assigned to Milestone
ModemManager
Fix Released
Undecided
Unassigned
modemmanager (Ubuntu)
Medium
Unassigned

Bug Description

Modem functionality of Huawei E173 works in 12.04 but not in later releases, although it can be read as a drive.

Otherwise, the modem itself is recognized by the modem-manager but fails to connect to Internet.

ProblemType: Bug
DistroRelease: Ubuntu 12.10
Package: modemmanager 0.6~git201206221719.8289a64-0ubuntu1
ProcVersionSignature: Ubuntu 3.5.0-13.14-generic 3.5.3
Uname: Linux 3.5.0-13-generic x86_64
ApportVersion: 2.5.1-0ubuntu4
Architecture: amd64
Date: Wed Sep 26 23:37:21 2012
InstallationMedia: Ubuntu 12.10 "Quantal Quetzal" - Alpha amd64 (20120905.2)
ProcEnviron:
 TERM=xterm
 PATH=(custom, no user)
 LANG=en_US.UTF-8
 SHELL=/bin/bash
SourcePackage: modemmanager
UpgradeStatus: No upgrade log present (probably fresh install)

There is a potential fix in upstream branch "06-huawei".

Related branches

Hanine HAMZIOUI (hanynowsky) wrote :
summary: - Modem Huawei E173 works in 12.04 but not work in 12.10
+ Modem Huawei E173 works in 12.04 but not in 12.10

Please follow the steps at:
    https://wiki.ubuntu.com/DebuggingModemmanager
and provide debug logs of ModemManager.

Thanks!

Hanine HAMZIOUI (hanynowsky) wrote :

Thanks for the feedback. Logs are attached.
Here is the output of : python mm-test.py :

GSM modem
Driver: 'generic'
Modem device: '/sys/devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.2'
Data device: 'ttyUSB0'
Vendor: huawei
Model: E173
Version: 21.017.09.00.00
IMEI: <private>
IMSI: <private>
Signal quality: 48
Scanning...
MOR MEDITEL: current (UMTS)
MOR MEDITEL: available (GSM)
60402: available (GSM)
MOR IAM: available (GSM)
MOR IAM: available (UMTS)

Hanine HAMZIOUI (hanynowsky) wrote :

nm-applet log.

Hanine HAMZIOUI (hanynowsky) wrote :

I downloaded sakis3g and used it and was able to connect the modem :

--------------------------------
wget http://www.sakis3g.org/versions/latest/$ARCH/sakis3g.gz # where $ARCH is either i386 or amd64
gunzip sakis3g.gz
chmod +x sakis3g
./sakis3g --interactive

------------------------

Then, I generated a success report from sakis3g :

-----------------------------------------------------------------
Sakis3G version: 0.2.0e
Using embedded Usb-ModeSwitch version:
 * Version 1.1.3 (C) Josua Dietze 2010
Kernel version: 3.5.0-13-generic
Architect: x86_64
Selected UI is: zenity
Interface: P-t-P (ppp0)
Network ID: 60400
Operator name: Meditel
APN: internet2.meditel.ma
Modem: E173
Modem type: USB
Kernel driver: option
Device: /dev/ttyUSB0
Variables: --interactive APN="CUSTOM_APN" USBDRIVER="option" USBMODEM="12d1:1c05" OTHER="USBMODEM" MODEM="OTHER" DISPLAY=":0" DESKTOP="Desktop" LOCALAUTHORITY="/tmp/libgksu-8T4iGa/.Xauthority"
--------------------------------------------------------------------------------------------

Is is it related to the version of usb_modeswitch which is different (1.1.3 vs 1.2.3) ? or kernel drivers changes (usbserial vs option) ?

------------------------

I was also able to connect the modem by editing /etc/modules and rebooting without unpluging the modem.

lsusb :

Bus 002 Device 005: ID 12d1:1c05 Huawei Technologies Co., Ltd. E173s 3G broadband stick (modem on)

sudo nano /etc/modules :
------------------------------------------------
# /etc/modules: kernel modules to load at boot time.
#
# This file contains the names of kernel modules that should be loaded
# at boot time, one per line. Lines beginning with "#" are ignored.

loop
lp
rtc
usbserial vendor=0x12d1 product=0x1c05
----------------------------------------------------------

Can you please try again on 12.10? This was likely caused by issues with the modemmanager uploads in Quantal.

Changed in modemmanager (Ubuntu):
status: New → Incomplete
importance: Undecided → Medium

Thans for the feedback.

I ve tried again and the problem remains (The machine has been updated 2
hours ago.). The usb_stick is switched to modem mode, broadband profile
appears in Network Manager applet, if I click on the profile in order to
get connected, network-manager starts searching for network but fails to do
so.
While in 12.04, it succeeds instantly.
With sakis3g utility, I also succeed instantly (notice sakis3g has an
embedded older version od usb_modeswitch package).
I still don't know if it's a modemmanager issue or a problem with the
network-manager or even the nm-applet, and there is nothing very useful in
the logs that helps me sport the problem.

I will generate again success logs from 12.04 tomorrow and compare them
with logs from 12.10 and attach them.

*--------------------------*

On Mon, Oct 8, 2012 at 5:53 PM, Mathieu Trudel-Lapierre <
<email address hidden>> wrote:

> Can you please try again on 12.10? This was likely caused by issues with
> the modemmanager uploads in Quantal.
>
> ** Changed in: modemmanager (Ubuntu)
> Status: New => Incomplete
>
> ** Changed in: modemmanager (Ubuntu)
> Importance: Undecided => Medium
>
> --
> You received this bug notification because you are subscribed to the bug
> report.
> https://bugs.launchpad.net/bugs/1057186
>
> Title:
> Modem Huawei E173 works in 12.04 but not in 12.10
>
> To manage notifications about this bug go to:
>
> https://bugs.launchpad.net/ubuntu/+source/modemmanager/+bug/1057186/+subscriptions
>

Seems like it's a duplicate of this bug : https://bugs.launchpad.net/ubuntu/+source/usb-modeswitch/+bug/990337

and the fix is being uploaded. Not sure though.

I'll feedback as soon as it land son my machine.

Thanks.

Danillo (danillo) wrote :

I've just tested the Ubuntu 12.10 live USB final release with this same modem model and I'm having this issue. I'll try Sakis3G when I have some time.

Changed in modemmanager (Ubuntu):
status: Incomplete → Confirmed

I cannot see any ModemManager debug logs attached to this bug...

https://wiki.ubuntu.com/DebuggingModemmanager

Oh, I'm mistaken, there's a log there; sorry for the noise.

Something is really wrong here; GETPORTMODE properly replies with the information about which port does what; but then only ttyUSB0 gets detected as an AT port, the modem doesn't reply to AT commands in the other ports. Can anyone test with ModemManager 0.5 (the previous version) in 12.10? Just to see if we are the culprits with the 0.5->0.6 update or if the culprit is the environment (the other updates between Ubuntu 12.04 and 12.10).

Hanine HAMZIOUI (hanynowsky) wrote :

As suggested, I removed 0.6.0.0 version of ModemManager and installed this one ():
---------------------------------------------
dpkg -s modemmanager
----------------------------------------------
Package: modemmanager
Status: install ok installed
Priority: optional
Section: net
Installed-Size: 1155
Maintainer: Alexander Sack <email address hidden>
Architecture: amd64
Version: 0.5.1.97-0ubuntu1
Depends: libc6 (>= 2.14), libdbus-glib-1-2 (>= 0.88), libglib2.0-0 (>= 2.31.2), libgudev-1.0-0 (>= 147), upstart-job
Recommends: usb-modeswitch
Conffiles:
 /etc/dbus-1/system.d/org.freedesktop.ModemManager.conf a2a61104bf3fc6aef138de420243f06b
 /etc/init/modemmanager.conf 46dc92ed2060d5db99d5f0c336aaa6f1
Description: D-Bus service for managing modems
 Provides a D-Bus interface to communicate with mobile broadband (GSM, CDMA,
 UMTS, ...) cards. Implements a loadable plugin interface to add work-arounds
 for non standard devices. Also provides patches to use networkmanager (and
 the applet) with modem manager.
 .
 Git Repository: http://cgit.freedesktop.org/ModemManager/ModemManager/
---------------------

I rebooted and now everything is working fine.
Thanks @Aleksander for this hint.
Might be a packaging issue for 0.6 version of ModemManager as you said!!!

Hanine HAMZIOUI (hanynowsky) wrote :

If there is complementary tests to achieve to help spot the issue, please don't hesitate to ask.

hanynowsky: please grab ModemManager debug logs of the run with the 0.5 version.

Hanine HAMZIOUI (hanynowsky) wrote :

Attached debug log for modem-manager 0.5 in Quantal AMD64 as asked.

Fábio Nogueira (fnogueira) wrote :

This is my nm-test log:

ubuntuser@Jarvis:~$ python ./mm-test.py
GSM modem
Driver: 'option1'
Modem device: '/sys/devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.1'
Data device: 'ttyUSB2'
Vendor: huawei
Model: E173
Version: 21.014.00.02.150
IMEI: <private>
IMSI: <private>
Signal quality: 67
Scanning...
Claro: current (UMTS)
VIVO: available (UMTS)
TIM BRASIL: available (UMTS)
Oi: available (UMTS)
Claro: available (GSM)
VIVO: available (GSM)
Oi: available (GSM)
TIM BRASIL: available (GSM)

Fábio Nogueira (fnogueira) wrote :

Attached debug log for modem-manager 0.6 in Quantal i386.

Marius B. Kotsbak (mariusko) wrote :

The logs are not complete, please include all from modem insertion and to failure. And to me it seems fine:

modem-manager[11952]: <debug> [1350866877.477417] [mm-manager.c:313] check_export_modem(): Exported modem /sys/devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.1 as /org/freedesktop/ModemManager/Modems/0
modem-manager[11952]: <debug> [1350866877.477544] [mm-manager.c:327] check_export_modem(): (/org/freedesktop/ModemManager/Modems/0): VID 0x12D1 PID 0x1C05 (usb)
modem-manager[11952]: <debug> [1350866877.477573] [mm-manager.c:328] check_export_modem(): (/org/freedesktop/ModemManager/Modems/0): data port is ttyUSB2

Changed in modemmanager (Ubuntu):
status: Confirmed → Incomplete
Hanine HAMZIOUI (hanynowsky) wrote :

@Marius Kotsbak (mariusko)
Whose logs are incomplete? Fabio's or me?

If mine, what version 0.6 or 0.5?

Marius B. Kotsbak (mariusko) wrote :

Fabio's. Yours seems fine, but it seems it fails with modemmanager 0.5 also (or at least failing in another way, or the signal is just too weak)?

Marius B. Kotsbak (mariusko) wrote :

Related to bug #875455?

hanynowsky: Does it work for you with modemmanager 0.5 or not? Would you recommend a downgrade to 0.5 to use the huawei 3g modem?

Fábio Nogueira (fnogueira) wrote :

And now?

Hanine HAMZIOUI (hanynowsky) wrote :

@Marius Signal quality is 48 in my place but it's fine. Relatively good speed. I will try to grad debu ogs for 0.5 again and attach them right away.

@mrequalizer yes it's working for me with 0.5. You can downgrade with no problem. There is no 0.5 in quantal repos, so you have to download the 0.5 version packaged for precise (choose the one for your arch, i368 or amd64).
Just uninstall modemmanager (sudo apt-get remove modemmanager) and install the download version (0.5). Reboot.

Marius B. Kotsbak (mariusko) wrote :

Would anyone of you be able to test the upstream version by adding this ppa (it can be removed afterwards with ppa-purge):

https://launchpad.net/~network-manager/+archive/trunk

If it is reproducable there too, we could add an upstream bug report about this.

Changed in modemmanager (Ubuntu):
status: Incomplete → Confirmed
Hanine HAMZIOUI (hanynowsky) wrote :

I have just added this ppa. Updated and upgraded. The problem remains.
I was not able to connect the usb modem.

I purged the PPA and reverted back to *modemmanager* 0.5 and it working fine.

----------------------------------------------------------------------------------------------------------

Hanine HAMZIOUI (hanynowsky) wrote :

New Network-Manager debug log from plugging to connection.
Version: 0.9.6.0+git201210171712.5843-0~pkg596~quantal1

Hanine HAMZIOUI (hanynowsky) wrote :

new ModemManager_debug_Log_0.5.1.97-0ubuntu1

Hanine HAMZIOUI (hanynowsky) wrote :

Output of: python ~/mm-test.py (for modemmanager 0.5.1.97-0ubuntu1)

GSM modem
Driver: 'option1'
Modem device: '/sys/devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.2'
Data device: 'ttyUSB0'
Vendor: huawei
Model: E173
Version: 21.017.09.00.00
IMEI: <private>
IMSI: <private>
Signal quality: 45
Scanning...
Error scanning: org.freedesktop.ModemManager.Modem.SerialSendfailed: Sending command failed: device is connected

Hanine HAMZIOUI (hanynowsky) wrote :

Output of: python ~/mm-test.py (for modemmanager 0.5.1.97-0ubuntu1 - When MODEM IS DISCONNECTED)

GSM modem
Driver: 'option1'
Modem device: '/sys/devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.2'
Data device: 'ttyUSB0'
Vendor: huawei
Model: E173
Version: 21.017.09.00.00
IMEI: <private>
IMSI: <private>
Signal quality: 41
Scanning...
MOR MEDITEL: current (UMTS)
MOR MEDITEL: available (GSM)
60402: available (GSM)
MOR IAM: available (GSM)
MOR IAM: available (UMTS)

Marius B. Kotsbak (mariusko) wrote :

hanynowsky: sorry, the PPA was not updated. Until it is, you can find an updated modemmanager in my PPA:

https://code.launchpad.net/~mariusko/+archive/ppa

Please post the output of "apt-cache policy modemmanager" so that we can see the version you are using.

Marius B. Kotsbak (mariusko) wrote :

Btw, since you are using 64 bits, you wil need to wait for this build to finish first: https://code.launchpad.net/~mariusko/+archive/ppa/+build/3923051

@hanynowsky:

I 've been looking at both logs from you, the one from 0.5 and the one from 0.6, and the main difference I find is just in the APN being used to connect. With MM 0.5 you're using:

debug_log(): (ttyUSB0): --> 'ATD*99***1#<CR>'
debug_log(): (ttyUSB0): <-- '<CR><LF>CONNECT 7200000<CR><LF>'
mm_port_set_connected(): (ttyUSB0): port now connected

CID '1' corresponds to the "internet1.meditel.ma" APN.

While in the failing MM 0.6 you're using:
debug_log(): (ttyUSB0): --> 'ATD*99***2#<CR>'
debug_log(): (ttyUSB0): <-- '<CR><LF>ERROR<CR><LF>'

CID '2' corresponds to the "internet2.meditel.ma" APN.

This info comes directly from the NM settings used. In the 0.5 case you used:
              simple_connect(): (ttyUSB0): number => "*99#"
              simple_connect(): (ttyUSB0): username => "MEDINET"
              simple_connect(): (ttyUSB0): password => "MEDINET"
              simple_connect(): (ttyUSB0): apn => "internet1.meditel.ma"
              simple_connect(): (ttyUSB0): network_mode => 6
              simple_connect(): (ttyUSB0): allowed_mode => 2

While in the failing 0.6 case you used:
              simple_connect(): (ttyUSB0): number => "*99#"
              simple_connect(): (ttyUSB0): username => "MEDINET"
              simple_connect(): (ttyUSB0): password => "MEDINET"
              simple_connect(): (ttyUSB0): apn => "internet2.meditel.ma"
              simple_connect(): (ttyUSB0): network_mode => 0
              simple_connect(): (ttyUSB0): allowed_mode => 0

In addition to these differences, I can see that in the MM06 run I get 4 ttyUSB ports (ttyUSB0 to ttyUSB3), while in the MM05 run I only see 2 (ttyUSB0 and ttyUSB1). This is very very weird, as it is the kernel the one making the ports show up, not MM. So if the test is done in exactly the same setup just with 2 different MM versions, this should never happen.

More weird things: GETPORTMODE in MM 06 tells us that the PCUI port is the one with usbif 2; and also it doesn't report any MDM (modem) port. At the end it ends up being useless as of the 4 serial ports found only one of them (ttyUSB0) responds to AT. A wrong ttyUSB port used is probably not the issue here as in both runs ttyUSB0 is being used.

So, no clear idea the reason for the issue.

@hanynowsky or anyone else: can you run MM in debug mode in *exactly* the same setup but just with different MM versions (0.5 and 0.6)?

Hanine HAMZIOUI (hanynowsky) wrote :

@Aleksander the APN aliases (internet1.medital.ma & internet2.meditel.ma) have nothing to do with connection failure as they are only aliases for the same server address. Both of them succeed when using modemmanager 0.5 but both of them fail when using modemmanager 0.6.
I already checked with them both but same results in the end.
So to summarize : my comments #28 #29 #30 #31 contain logs for modem version 0.5 ( The APN used was internet1.meditel.ma)

And what follows are new debug logs for version 0.6.0.0 with the same APN : internet1.meditel.ma

-------------------- Here is the output of apt-cache policy modemmanager--------------------------

modemmanager:
  Installed: 0.6.0.0.really-0ubuntu1
  Candidate: 0.6.0.0.really-0ubuntu1
  Version table:
 *** 0.6.0.0.really-0ubuntu1 0
        500 http://archive.ubuntu.com/ubuntu/ quantal/main amd64 Packages
        100 /var/lib/dpkg/status

------ The output of python nm-test.py-------------version 0-6-0-0-----------------

GSM modem
Driver: 'option1'
Modem device: '/sys/devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.2'
Data device: 'ttyUSB0'
Vendor: huawei
Model: E173
Version: 21.017.09.00.00
IMEI: <private>
IMSI: <private>
Signal quality: 35
Scanning...
MOR MEDITEL: current (UMTS)
MOR MEDITEL: available (GSM)
60402: available (GSM)
MOR IAM: available (UMTS)
MOR IAM: available (GSM)

Hanine HAMZIOUI (hanynowsky) wrote :

Modem Debug Log - Version 0.6.0.0 (ubuntu) (same setup as for 0.5)

Hanine HAMZIOUI (hanynowsky) wrote :

network-manager debug log (version 0.6.0.0) - Same setup as for 0.5)

Ok, so after a discussion with Dan in IRC, we would need to know the result of the following commands sent directly to the AT port; you can do it with:

 $> sudo minicom -D /dev/ttyUSB2

And then execute:

    AT^U2DIAG?

and also:

    AT^SETPORT?

Then, outside of minicom, also:
 lsusb -v -d 12d1:1c05

Also try just:

    AT^U2DIAG

if AT^U2DIAG? fails

Hanine HAMZIOUI (hanynowsky) wrote :

apt-cache policy modemmanager

modemmanager:
  Installed: 0.6.1.0~git201210230934.1179-0~pkg164~quantal1
  Candidate: 0.6.1.0~git201210230934.1179-0~pkg164~quantal1
  Version table:
 *** 0.6.1.0~git201210230934.1179-0~pkg164~quantal1 0
        100 /var/lib/dpkg/status
     0.6.0.0.really-0ubuntu1 0
        500 http://archive.ubuntu.com/ubuntu/ quantal/main amd64 Packages

Hanine HAMZIOUI (hanynowsky) wrote :

Debug log for Modem Manager version : 0.6.1

IMPORTANT: The new packaged version of modemmanager 0.6.1 is working fine as well as version 0.5.

Hanine HAMZIOUI (hanynowsky) wrote :

Network Manager debug log.

Hanine HAMZIOUI (hanynowsky) wrote :

python /mnt/Shared/mm-test.py
--------------------------------------------
GSM modem
Driver: 'option1'
Modem device: '/sys/devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.2'
Data device: 'ttyUSB0'
Vendor: huawei
Model: E173
Version: 21.017.09.00.00
IMEI: <private>
IMSI: <private>
Error reading signal quality: org.freedesktop.ModemManager.Modem.General: Could not parse signal quality results
Scanning...
MOR MEDITEL: current (UMTS)
MOR MEDITEL: available (GSM)
60402: available (GSM)
MOR IAM: available (GSM)
MOR IAM: available (UMTS)

Marius B. Kotsbak (mariusko) wrote :

That is a bit strange, as I don't see any fixes directly related to this issue between the 0.6 and 0.6.1 alpha build. Are you sure that it works every time?

description: updated
Hanine HAMZIOUI (hanynowsky) wrote :
Download full text (7.6 KiB)

Hello.
Indeed it's strange. However, version 0.6.1 works everytime with no problems.

By the way should I still execute minicom command?

------------------- minicom:----------------

When executing the command AT^U2DIAG? : I get :

ATU2G?
^U2DIAG: 268

OK
AT+CSQAT^SYSINFO
+CREG: 1,"7850","5DE8"

+CGREG: 1,"7850","5DE8"
P
^RSSI: 15

+CREG: 1,"7850","0D0C"

+CGREG: 1,"7850","0D0C"

^RSSI: 12
AT+CSQ

......

When I execute the command : AT^SETPORT? I get:
Error. COMMAND NOT SUPPORT

-----------------------------
lsusb -v -d 12d1:1c05
---------------------------------

Bus 002 Device 022: ID 12d1:1c05 Huawei Technologies Co., Ltd. E173s 3G broadband stick (modem on)
Couldn't open device, some information will be missing
Device Descriptor:
  bLength 18
  bDescriptorType 1
  bcdUSB 2.00
  bDeviceClass 0 (Defined at Interface level)
  bDeviceSubClass 0
  bDeviceProtocol 0
  bMaxPacketSize0 64
  idVendor 0x12d1 Huawei Technologies Co., Ltd.
  idProduct 0x1c05 E173s 3G broadband stick (modem on)
  bcdDevice 1.02
  iManufacturer 2
  iProduct 1
  iSerial 0
  bNumConfigurations 1
  Configuration Descriptor:
    bLength 9
    bDescriptorType 2
    wTotalLength 131
    bNumInterfaces 5
    bConfigurationValue 1
    iConfiguration 0
    bmAttributes 0x80
      (Bus Powered)
    MaxPower 500mA
    Interface Descriptor:
      bLength 9
      bDescriptorType 4
      bInterfaceNumber 0
      bAlternateSetting 0
      bNumEndpoints 3
      bInterfaceClass 255 Vendor Specific Class
      bInterfaceSubClass 255 Vendor Specific Subclass
      bInterfaceProtocol 255 Vendor Specific Protocol
      iInterface 0
      Endpoint Descriptor:
        bLength 7
        bDescriptorType 5
        bEndpointAddress 0x8f EP 15 IN
        bmAttributes 3
          Transfer Type Interrupt
          Synch Type None
          Usage Type Data
        wMaxPacketSize 0x0040 1x 64 bytes
        bInterval 5
      Endpoint Descriptor:
        bLength 7
        bDescriptorType 5
        bEndpointAddress 0x8e EP 14 IN
        bmAttributes 2
          Transfer Type Bulk
          Synch Type None
          Usage Type Data
        wMaxPacketSize 0x0200 1x 512 bytes
        bInterval 32
      Endpoint Descriptor:
        bLength 7
        bDescriptorType 5
        bEndpointAddress 0x0f EP 15 OUT
        bmAttributes 2
          Transfer Type Bulk
          Synch Type None
          Usage Type Data
        wMaxPacketSize 0x0200 1x 512 bytes
        bInterval 32
    Interface Descriptor:
      bLength 9
      bDescriptorType 4
      bInterfaceNumber 1
      bAlternateSetting ...

Read more...

You just found another bug it seems; in the new MM logs the new VIA CP plugin is the one running the port probing; it should be Huawei doing it. I already fixed that, as the VIA plugin needs to be sorted last as it includes vendor/product string probing in addition to vendor/product ID probing.

@mariusko: are you able to prepare some PPA with the origin/06-huawei branch from upstream? Dan already prepared a patch that could fix the issue in the huawei modem, and I also cherry-picked the Via plugin fix in that branch.

Marius B. Kotsbak (mariusko) wrote :

I can try to do that, but do you understand why the 0.6 version in my ppa works too?

It works because due to the VIA probing it grabs ttyUSB0 as data port. But that VIA probing is not really valid for huawei modems, doesn't cover all huawei-related fixes. So the '06-huawei' branch upstream has both commits to try to fix the issue, Dan's original commit plus the via plugin fix (which is also in MM_06)

tags: added: patch
Marius B. Kotsbak (mariusko) wrote :

hanynowsky: I have prepared the two patches in the following PPA:

https://code.launchpad.net/~mariusko/+archive/network-manager-bugfixes

Could you please try:

1) ppa-purge on my PPA you already added
2) Add the PPA above
3) Post the result of apt-cache policy modemmanager and the debug log as before

This will help in the process of getting a proper fix of this bug.

Danila Sukharev (dan-sukharev) wrote :

For those who are interested: I have Huawei e353 and the patch from Marius Kotsbak helped me also.

Logs, please, logs... just saying 'it worked' doesn't mean anything :-) otherwise see previous comments...

Hanine HAMZIOUI (hanynowsky) wrote :

I have just updated the PPA and here is apt-cache output :

~$ apt-cache policy modemmanager
modemmanager:
  Installed: 0.6.0.0.really-0ubuntu2~fix~quantal1
  Candidate: 0.6.0.0.really-0ubuntu2~fix~quantal1
  Version table:
 *** 0.6.0.0.really-0ubuntu2~fix~quantal1 0
        500 http://ppa.launchpad.net/mariusko/network-manager-bugfixes/ubuntu/ quantal/main amd64 Packages
        100 /var/lib/dpkg/status
     0.6.0.0.really-0ubuntu1 0
        500 http://archive.ubuntu.com/ubuntu/ quantal/main amd64 Packages
------------------------------------------------------

PS: This fixed version is working fine just as the 0.6.1 from Marius's PPA.
Debug logs related to this fixed version are coming in few minutes.

Hanine HAMZIOUI (hanynowsky) wrote :

~$ python /mnt/Shared/mm-test.py

GSM modem
Driver: 'option1'
Modem device: '/sys/devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.2'
Data device: 'ttyUSB0'
Vendor: huawei
Model: E173
Version: 21.017.09.00.00
IMEI: <private>
IMSI: <private>
Signal quality: 38
Scanning...
MOR MEDITEL: current (UMTS)
MOR MEDITEL: available (GSM)
60402: available (GSM)
MOR IAM: available (GSM)
MOR IAM: available (UMTS)

Hanine HAMZIOUI (hanynowsky) wrote :

Modem Debugging log related to the fixed version :

~$ dpkg -s modemmanager

Package: modemmanager
Status: install ok installed
Priority: optional
Section: net
Installed-Size: 1285
Maintainer: Alexander Sack <email address hidden>
Architecture: amd64
Version: 0.6.0.0.really-0ubuntu2~fix~quantal1
Depends: libc6 (>= 2.14), libdbus-glib-1-2 (>= 0.88), libglib2.0-0 (>= 2.31.8), libgudev-1.0-0 (>= 147), upstart-job
Recommends: usb-modeswitch
Conffiles:
 /etc/dbus-1/system.d/org.freedesktop.ModemManager.conf 6a92263b78fc73d5252171dc0ff9c3ea
 /etc/init/modemmanager.conf 46dc92ed2060d5db99d5f0c336aaa6f1
Description: D-Bus service for managing modems
 Provides a D-Bus interface to communicate with mobile broadband (GSM, CDMA,
 UMTS, ...) cards. Implements a loadable plugin interface to add work-arounds
 for non standard devices. Also provides patches to use networkmanager (and
 the applet) with modem manager.
 .
 Git Repository: http://cgit.freedesktop.org/ModemManager/ModemManager/

Hanine HAMZIOUI (hanynowsky) wrote :

Corresponding Network manager_debug_logs.

Changed in modemmanager:
status: New → In Progress

Perfect! ttyUSB2 as primary, ttyUSB0 as data:

 (/sys/devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.2) tty/ttyUSB2 primary
 (/sys/devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.2) tty/ttyUSB0 data

Will ask Dan to merge this and will forward-port the patch to git master in the following days.

Peter Eisenhauer (peisenhauer) wrote :

I am still seeing the problem with:

$ python mm-test.py
GSM modem
Driver: 'option1'
Modem device: '/sys/devices/pci0000:00/0000:00:1a.0/usb1/1-1/1-1.3'
Data device: 'ttyUSB2'
Vendor: Vodafone (Huawei)
Model: E173s-1
Version: 21.023.05.00.35
IMEI: <private>
IMSI: <private>

as you can see: Data device: ttyUSB2 and connection failing.

modemmanager:
  Installed: 0.6.0.0.really-0ubuntu2~fix~quantal1
  Candidate: 0.6.0.0.really-0ubuntu2~fix~quantal1
  Version table:
 *** 0.6.0.0.really-0ubuntu2~fix~quantal1 0
        500 http://ppa.launchpad.net/mariusko/network-manager-bugfixes/ubuntu/ quantal/main amd64 Packages
        100 /var/lib/dpkg/status
     0.6.0.0.really-0ubuntu1 0
        500 http://de.archive.ubuntu.com/ubuntu/ quantal/main amd64 Packages

I can send logs later this day if needed. By the way: Is there a way to prevent modemmanager to log sensible information in debug mode? I am seeing IMEI, SIM ID and even SIM PIN in my case in plaintext in the log.

@Peter: please send debug logs, yes.

Regarding the 'sensible' information, I guess you can just remove those from the log manually? :-/

Peter Eisenhauer (peisenhauer) wrote :

network-manager log

Peter Eisenhauer (peisenhauer) wrote :

modemmanager log

@Peter: thanks, so, your device has a completely different firmware with completely different results. In your case we get:

 (/sys/devices/pci0000:00/0000:00:1a.0/usb1/1-1/1-1.3) tty/ttyUSB2 primary
 (/sys/devices/pci0000:00/0000:00:1a.0/usb1/1-1/1-1.3) tty/ttyUSB0 secondary
 (/sys/devices/pci0000:00/0000:00:1a.0/usb1/1-1/1-1.3) tty/ttyUSB2 data

Which is wrong.

In your modem AT^U2DIAG? actually fails and AT^SETPORT? doesn't, completely the opposite to what we had in @hanynowsky's log. But the bug ends up being that the modem says the NDIS port is enabled, while it seems it isn't. Reported the issue upstream, see the following thread for the discussion:

https://mail.gnome.org/archives/networkmanager-list/2012-October/msg00137.html

Can you guys test with the '06-huawei-simple' branch upstream? It has another solution which should also (hopefully) fix Peter's issue...

Marius B. Kotsbak (mariusko) wrote :

Looking to see if I can update my PPA with those patches.

Marius: great, thanks. Note that it is a single patch on top of git MM_06.

Hanine HAMZIOUI (hanynowsky) wrote :

@Aleksander Could you please provide a link, where to get the 06-huawei-simple ?

@hanynowsky: better use Marius' PPA; but if you're interested:

$> git clone http://anongit.freedesktop.org/git/ModemManager/ModemManager.git
$> cd ModemManager
$> git checkout -b 06-huawei-simple

Hanine HAMZIOUI (hanynowsky) wrote :

Thanks @Aleksander.

I confirm that the new package in Marius' PPA is working fine.

apt-cache policy modemmanager :

modemmanager:
  Installed: 0.6.0.0.really-0ubuntu2~fix.lp1057186ubuntu1~quantal1
  Candidate: 0.6.0.0.really-0ubuntu2~fix.lp1057186ubuntu1~quantal1
  Version table:
 *** 0.6.0.0.really-0ubuntu2~fix.lp1057186ubuntu1~quantal1 0
        500 http://ppa.launchpad.net/mariusko/network-manager-bugfixes/ubuntu/ quantal/main amd64 Packages
        100 /var/lib/dpkg/status
     0.6.0.0.really-0ubuntu1 0
        500 http://archive.ubuntu.com/ubuntu/ quantal/main amd64 Packages

@hanynowsky: great!

@Peter Eisenhauer: did it work for you?

Peter Eisenhauer (peisenhauer) wrote :

I can confirm that the new package is working for me.

$ apt-cache policy modemmanager
modemmanager:
  Installed: 0.6.0.0.really-0ubuntu2~fix.lp1057186ubuntu1~quantal1
  Candidate: 0.6.0.0.really-0ubuntu2~fix.lp1057186ubuntu1~quantal1
  Version table:
 *** 0.6.0.0.really-0ubuntu2~fix.lp1057186ubuntu1~quantal1 0
        500 http://ppa.launchpad.net/mariusko/network-manager-bugfixes/ubuntu/ quantal/main amd64 Packages
        100 /var/lib/dpkg/status
     0.6.0.0.really-0ubuntu1 0
        500 http://de.archive.ubuntu.com/ubuntu/ quantal/main amd64 Packages

Great! Thanks to everyone for packaging and testing this :-)

Already pushed to MM_06 branch upstream:
http://cgit.freedesktop.org/ModemManager/ModemManager/commit/?h=MM_06

Will get into the next 0.6 release.

Changed in modemmanager (Ubuntu):
status: Confirmed → Fix Committed
Marius B. Kotsbak (mariusko) wrote :

Fixed upstream in commit a9556289f0eea748e510edc3680e67395c876ed8

For the latest 0.6 branch, also commit 0efa72740f73479428a4a3e0056e04ff013e980f is needed.

Changed in modemmanager:
status: In Progress → Fix Committed
Changed in modemmanager (Ubuntu):
status: Fix Committed → Confirmed
Marius B. Kotsbak (mariusko) wrote :

Aleksander: committed upstream, not for Ubuntu. I also tested with my Huawei E1752 with MM master (containing the forwardported fix) without problems.

Great; thanks for checking git master; and sorry for the wrong status update... I blame Launchpad for letting me (anyone) change it :-9

Danillo (danillo) wrote :

I tested it with a live USB and the package in Marius PPA really fixes this issue for me. This bug was the major blocker for me upgrading to 12.10. I just wanna say thank you all very much for fixing this!

Cheers!

Hello,

I still get this problem on 12.10, even testing with ppa version and ubuntu 13.04 mm version. The only workarround that worked was to install 12.04 mm version (0.5.2). As the 13.04 vesion failed with my ubuntu, it might also fail when 13.04 releases.

The problem is that since 12.10, Data Device is detected as ttyUSB2 when the correct would be ttyUSB0.

I'll attach the patches of an 12.10 system using the ubuntu 12.04 mm version (modemmanager_0.5.2.0-0ubuntu2_amd64.deb) and 13.04 mm version (modemmanager_0.6.0.0.really-0ubuntu5_amd64.deb).

Hanine HAMZIOUI (hanynowsky) wrote :

@Luiz the working version in 12.10 and 13.04 is : modemmanager 0.6.1.0~git201210230934.1179-0~pkg164~quantal1

Upstream say the bug is fixed in version 0.9: https://bugzilla.gnome.org/show_bug.cgi?id=685148

You might need to add this PPA to install the working version for both 12.10 and 13.04: https://launchpad.net/~mariusko/+archive/ppa

Hello Hanine,

Thanks for your answer. Indeed, I tried to find 0.6.1-git before. However, I did not find it in launchpad. The mariusko packages are now at 0.7~git201301131925.3179-0~pkg167~quantal1 and they are failing to build since jan/2013.
The last built modemmanager at this ppa was at dec/2012 (version 0.6.1). However, I was not able to find the binary deb package. See: https://launchpad.net/~mariusko/+archive/ppa/+builds?build_text=modemmanager&build_state=built

The upstream bugreport says that it was fixed in MM 06. I supose it was referencing a future 0.6.1 version. So, we have no final fixed releases. I guess 0.9 wasn't the "real target".

I would love to have a fix for this problem for 12.10 and, specially, for 13.04 (which still uses a buggy 0.6.0). As this is a verified problem, why not backport the fix for 0.6.0? Maybe 0.6.1 could get released with some canonical help.

I really don't know what to do besides using 0.5.x version. Do I have any other possible solution? Using an old version package does not help very much as it gets overwritten on system upgrades.

We have in mind a new MM 0.6.x release in upstream one of these days...

Marius B. Kotsbak (mariusko) wrote :

Yes, the build is broken. We should get a daily build going again for 6.x. You might get it to build manually by installing package "libdbus-glib-1-dev".

Hanine HAMZIOUI (hanynowsky) wrote :

@Luiz Sorry, by 0.9, i Meant Network manager and the fixed version of modem manager is 0.6.1...

Actually, in my machine which is AMD64 i have 0.7 working fine and it was installed through @Aleksander ppa (So maybe you have an I368 architecture which still does not have a proper build):
$ dpkg -s modemmanager
Package: modemmanager
Status: install ok installed
Priority: optional
Section: net
Installed-Size: 1959
Maintainer: Alexander Sack <email address hidden>
Architecture: amd64
Version: 0.7.990~git201304122141.3398-0~pkg191~raring1
Depends: libc6 (>= 2.14), libglib2.0-0 (>= 2.31.8), libgudev-1.0-0 (>= 146), libmm-glib0, libqmi-glib0 (>= 1.0), upstart-job
Recommends: usb-modeswitch
Conffiles:
 /etc/init/modemmanager.conf 9f1575f76aa0c94466762cb2ca964cec
 /etc/dbus-1/system.d/org.freedesktop.ModemManager1.conf 91eb7792b1dd55d40bc36cff94c96aac
 /etc/dbus-1/system.d/org.freedesktop.ModemManager.conf 6a92263b78fc73d5252171dc0ff9c3ea obsolete
Description: D-Bus service for managing modems
 Provides a D-Bus interface to communicate with mobile broadband (GSM, CDMA,
 UMTS, ...) cards. Implements a loadable plugin interface to add work-arounds
 for non standard devices. Also provides patches to use networkmanager (and
 the applet) with modem manager.
 .
 Git Repository: http://cgit.freedesktop.org/ModemManager/ModemManager/

Denis (link011) wrote :

Hi all
I'm using 13.04. Which ppa is proper one to get fix ?
https://launchpad.net/~mariusko/+archive/ppa/+packages ??? this one does not have any good build for modemmanager.
Other ppa's I found contain 0.6.0 which is not candidate for 13.04...

BemNum (bemnum) wrote :

Hello,
The same problem exists in Kubuntu 13.10 with Huawei E173 and Dell Latitude E6430. Only storage is active.

See the following scenario:
1) turn on the computer, log in
2) connect the USB modem Huawei E173
3) The modem is not detected (see the following commands):
% lsusb|grep -i huawei
Bus 001 Device 005: ID 12d1:1c0b Huawei Technologies Co., Ltd. E173s 3G broadband stick (modem off)
% ls /dev/ttyUSB*
no matches found: /dev/ttyUSB*

To activate modem run:
4) remove the USB modem Huawei E173

5) Run the following command to load usbserial module (see correct vendor and product code):
# modprobe -v usbserial vendor=0x12d1 product=0x1c08

6) You can also turn on usb_modeswitch logging:
# diff /etc/usb_modeswitch.conf-ORG /etc/usb_modeswitch.conf
19c19
< EnableLogging=0
---
> EnableLogging=1

7) connect the USB modem Huawei E173 again

8) The modem is properly detected:
# lsusb|grep Huawei
Bus 001 Device 007: ID 12d1:1c08 Huawei Technologies Co., Ltd.
# ls /dev/ttyUSB*
/dev/ttyUSB0 /dev/ttyUSB1
# tail -n 20 /var/log/usb_modeswitch.log
Mode switch succeeded. Bye.

ok:12d1:1c08
--------------------------------
(end of usb_modeswitch output)
Checking success of mode switch for max. 20 seconds ...
 Reading attributes ...
USB dir exists: /sys/bus/usb/devices/1-1.2
Warning: USB attribute "serial" not readable.
 All attributes matched
Mode switching was successful, found 12d1:1c08 (HUAWEI: HUAWEI Mobile)
Now checking for bound driver ...
 driver has bound, device is known
Checking for AVOID_RESET_QUIRK kernel attribute
 AVOID_RESET_QUIRK activated

All done, exiting

9) Now you can correctly connect using e.g. wvdial via /dev/ttyUSB0.

10) However NetworkManager detects the wrong device /dev/ttyUSB1
# nmcli dev|grep ttyUSB
ttyUSB1 gsm rozłączono

and it is not possible to connect the internet using the graphical network manager in KDE (Kubuntu 13.10), but with wvdial and /dev/ttyUSB0 it works fine.

Regards,
Pawel.

PS. Sometimes running the following command works fine, but not always (I don't know why).
# usb_modeswitch --default-vendor 0x12d1 --default-product 1c0b --target-vendor 0x12d1 --target-product 0x1c08
However when it finally activates modem properly, the network manager finds the correct device /dev/ttyUSB0.

summary: - Modem Huawei E173 works in 12.04 but not in 12.10
+ Modem Huawei E173 and E3131 works in 12.04 but not in 12.10
summary: - Modem Huawei E173 and E3131 works in 12.04 but not in 12.10
+ Modem Huawei E173 works in 12.04 but not in 12.10
Changed in modemmanager (Ubuntu):
status: Confirmed → Fix Committed
summary: - Modem Huawei E173 works in 12.04 but not in 12.10
+ Modem functionality of the Huawei E173 and E3131 doesn't work
tags: added: raring regression-proposed saucy
description: updated
Danillo (danillo) wrote :

This is still happening in saucy. Marius, could you please update your PPA for saucy support?

Since this bug is still happening in Saucy, it isn't already fixed.

Changed in modemmanager (Ubuntu):
status: Fix Committed → Triaged
Steve Langasek (vorlon) on 2013-10-25
tags: removed: regression-proposed
Marius B. Kotsbak (mariusko) wrote :

It is released upstream:

t$ git tag --contains a9556289f0eea748e510edc3680e67395c876ed8
0.6.2.0

at Fri May 31 13:03:49 2013 -0500

so Ubuntu should just upgrade to use that one, but it seems the focus has been to integrate ofono for the Ubuntu touch devices recently.

Changed in modemmanager:
status: Fix Committed → Fix Released
tags: added: cherry-pick
Danillo (danillo) wrote :

Thank you Marius for updating you PPA. It's a pity the packages are failing to build. I tried building 0.6.2.0 from source, but I've found some errors, so I decided to workaround this bug by downgrading modemmanager. I've found a very simple way for that:

1- Download Precise's modemmanager 0.5.2.0: wget http://launchpadlibrarian.net/98148167/modemmanager_0.5.2.0-0ubuntu2_amd64.deb
2- Remove current modemmanager: sudo apt-get remove modemmanager
3- Install the downloaded package: sudo dpkg -i modemmanager_0.5.2.0-0ubuntu2_amd64.deb

Thank you, Danillo. This was the only thing that worked for me on Ubuntu 14.04 and Mint.

Yes, the bug is still happening in saucy and trusty. Haven't tested utopic yet but I bet it's the same there because every bug I have found on this topic has been marked as allegedly resolved or expired despite people commenting that it's still broken. This isn't just Huawei devices, it's ANY modem that spawns multiple /dev/ttyUSB interfaces - Sierra devices, for instance. Why can't at least an option be added to manually choose the correct port? Fedora Network Manager apparently has that, as indicated by Huawei's installation manual, and it's a very simple solution. Either way, it's unacceptable that this bug exists for so long and is ignored, forcing people to resort to wvdial or to buy another modem. Here is a list of related bugs:

https://bugs.launchpad.net/ubuntu/+source/modemmanager/+bug/819784
https://bugs.launchpad.net/bugs/504035
https://bugs.launchpad.net/ubuntu/+source/modemmanager/+bug/557449

Can something please be done about it?

Marius B. Kotsbak (mariusko) wrote :

Ubuntu 12.10 is now end of life. If anyone are able to still see any of the problems described here in a newer Ubuntu version, please run "ubuntu-bug modemmanager" in a terminal. Feel free to link to these bug reports from here.

Changed in modemmanager (Ubuntu):
status: Triaged → Invalid
To post a comment you must log in.