Ubuntu

USB Modem wont connect after modem hangup -- Huawei E620

Reported by Tristan S on 2010-04-19
134
This bug affects 24 people
Affects Status Importance Assigned to Milestone
ModemManager
Incomplete
Undecided
Unassigned
network-manager (Ubuntu)
Undecided
Unassigned

Bug Description

Binary package hint: network-manager

Running my Huawei USB modem (Bus 002 Device 007: ID 12d1:1001 Huawei Technologies Co., Ltd. E620 USB Modem) in Lucid Beta 2 amd64 (uname -a = Linux laptop-hostname 2.6.32-19-generic #28-Ubuntu SMP Thu Apr 1 10:39:41 UTC 2010 x86_64 GNU/Linux) and, after the same usb_modeswitch used in Intrepid, connection is fine.

If signal is lost causing modem hangup, reconnection is not possible without unplugging modem, replugging, usb_modeswitch and then reconnect.

Logs:

Apr 19 18:03:42 laptop-hostname pppd[1751]: Sent 91110 bytes, received 298361 bytes.
Apr 19 18:03:42 laptop-hostname pppd[1751]: Modem hangup
Apr 19 18:03:42 laptop-hostname pppd[1751]: Connection terminated.
Apr 19 18:03:42 laptop-hostname NetworkManager: <info> (ttyUSB0): device state change: 8 -> 9 (reason 13)
Apr 19 18:03:42 laptop-hostname NetworkManager: <info> Activation (ttyUSB0) failed.
Apr 19 18:03:42 laptop-hostname NetworkManager: <info> (ttyUSB0): device state change: 9 -> 3 (reason 0)
Apr 19 18:03:42 laptop-hostname NetworkManager: <info> (ttyUSB0): deactivating device (reason: 0).
Apr 19 18:03:42 laptop-hostname modem-manager: (ttyUSB0) closing serial device...
Apr 19 18:03:42 laptop-hostname modem-manager: Modem /org/freedesktop/ModemManager/Modems/0: state changed (connected -> disconnecting)
Apr 19 18:03:42 laptop-hostname modem-manager: Modem /org/freedesktop/ModemManager/Modems/0: state changed (disconnecting -> connected)
Apr 19 18:03:42 laptop-hostname NetworkManager: SCPlugin-Ifupdown: devices removed (path: /sys/devices/virtual/net/ppp0, iface: ppp0)
Apr 19 18:03:44 laptop-hostname NetworkManager: <debug> [1271696624.001843] ensure_killed(): waiting for ppp pid 1751 to exit
Apr 19 18:03:44 laptop-hostname NetworkManager: <debug> [1271696624.003285] ensure_killed(): ppp pid 1751 cleaned up
Apr 19 18:04:19 laptop-hostname NetworkManager: <info> Activation (ttyUSB0) starting connection '3 Internet'
Apr 19 18:04:19 laptop-hostname NetworkManager: <info> (ttyUSB0): device state change: 3 -> 4 (reason 0)
Apr 19 18:04:19 laptop-hostname NetworkManager: <info> Activation (ttyUSB0) Stage 1 of 5 (Device Prepare) scheduled...
Apr 19 18:04:19 laptop-hostname NetworkManager: <info> Activation (ttyUSB0) Stage 1 of 5 (Device Prepare) started...
Apr 19 18:04:19 laptop-hostname NetworkManager: <info> Activation (ttyUSB0) Stage 1 of 5 (Device Prepare) complete.
Apr 19 18:04:19 laptop-hostname NetworkManager: <WARN> stage1_prepare_done(): GSM modem connection failed: (32) Sending command failed: device is not enabled
Apr 19 18:04:19 laptop-hostname NetworkManager: <info> (ttyUSB0): device state change: 4 -> 9 (reason 1)
Apr 19 18:04:19 laptop-hostname NetworkManager: <info> Marking connection '3 Internet' invalid.
Apr 19 18:04:19 laptop-hostname modem-manager: Modem /org/freedesktop/ModemManager/Modems/0: state changed (connected -> disconnecting)
Apr 19 18:04:19 laptop-hostname modem-manager: Modem /org/freedesktop/ModemManager/Modems/0: state changed (disconnecting -> connected)
Apr 19 18:04:19 laptop-hostname NetworkManager: <info> Activation (ttyUSB0) failed.
Apr 19 18:04:19 laptop-hostname NetworkManager: <info> (ttyUSB0): device state change: 9 -> 3 (reason 0)
Apr 19 18:04:19 laptop-hostname NetworkManager: <info> (ttyUSB0): deactivating device (reason: 0).
Apr 19 18:04:31 laptop-hostname NetworkManager: <info> Activation (ttyUSB0) starting connection '3 Internet'
Apr 19 18:04:31 laptop-hostname NetworkManager: <info> (ttyUSB0): device state change: 3 -> 4 (reason 0)
Apr 19 18:04:31 laptop-hostname NetworkManager: <info> Activation (ttyUSB0) Stage 1 of 5 (Device Prepare) scheduled...
Apr 19 18:04:31 laptop-hostname NetworkManager: <info> Activation (ttyUSB0) Stage 1 of 5 (Device Prepare) started...
Apr 19 18:04:31 laptop-hostname NetworkManager: <info> Activation (ttyUSB0) Stage 1 of 5 (Device Prepare) complete.
Apr 19 18:04:31 laptop-hostname NetworkManager: <WARN> stage1_prepare_done(): GSM modem connection failed: (32) Sending command failed: device is not enabled
Apr 19 18:04:31 laptop-hostname NetworkManager: <info> (ttyUSB0): device state change: 4 -> 9 (reason 1)
Apr 19 18:04:31 laptop-hostname NetworkManager: <info> Marking connection '3 Internet' invalid.
Apr 19 18:04:31 laptop-hostname NetworkManager: <info> Activation (ttyUSB0) failed.
Apr 19 18:04:31 laptop-hostname NetworkManager: <info> (ttyUSB0): device state change: 9 -> 3 (reason 0)
Apr 19 18:04:31 laptop-hostname NetworkManager: <info> (ttyUSB0): deactivating device (reason: 0).
Apr 19 18:04:31 laptop-hostname modem-manager: Modem /org/freedesktop/ModemManager/Modems/0: state changed (connected -> disconnecting)
Apr 19 18:04:31 laptop-hostname modem-manager: Modem /org/freedesktop/ModemManager/Modems/0: state changed (disconnecting -> connected)
Apr 19 18:04:44 laptop-hostname NetworkManager: <info> Activation (ttyUSB0) starting connection '3 Internet'
Apr 19 18:04:44 laptop-hostname NetworkManager: <info> (ttyUSB0): device state change: 3 -> 4 (reason 0)
Apr 19 18:04:44 laptop-hostname NetworkManager: <info> Activation (ttyUSB0) Stage 1 of 5 (Device Prepare) scheduled...
Apr 19 18:04:44 laptop-hostname NetworkManager: <info> Activation (ttyUSB0) Stage 1 of 5 (Device Prepare) started...
Apr 19 18:04:44 laptop-hostname NetworkManager: <info> Activation (ttyUSB0) Stage 1 of 5 (Device Prepare) complete.
Apr 19 18:04:44 laptop-hostname NetworkManager: <WARN> stage1_prepare_done(): GSM modem connection failed: (32) Sending command failed: device is not enabled
Apr 19 18:04:44 laptop-hostname NetworkManager: <info> (ttyUSB0): device state change: 4 -> 9 (reason 1)
Apr 19 18:04:44 laptop-hostname NetworkManager: <info> Marking connection '3 Internet' invalid.
Apr 19 18:04:44 laptop-hostname modem-manager: Modem /org/freedesktop/ModemManager/Modems/0: state changed (connected -> disconnecting)
Apr 19 18:04:44 laptop-hostname modem-manager: Modem /org/freedesktop/ModemManager/Modems/0: state changed (disconnecting -> connected)
Apr 19 18:04:44 laptop-hostname NetworkManager: <info> Activation (ttyUSB0) failed.
Apr 19 18:04:44 laptop-hostname NetworkManager: <info> (ttyUSB0): device state change: 9 -> 3 (reason 0)
Apr 19 18:04:44 laptop-hostname NetworkManager: <info> (ttyUSB0): deactivating device (reason: 0).

I have the same problem. This error appears after reconnecting a few times. The error is more frequent if the connection fails once due to GSM network problems. After the error appears the modem does not work again until I kill the "modem-manager".

IMHO following log message is the most important one:
Apr 19 18:04:44 laptop-hostname NetworkManager: <WARN> stage1_prepare_done(): GSM modem connection failed: (32) Sending command failed: device is not enabled

I have no clue what "device is not enabled" means, but it apparently prevents the modem from being used.

Using Network Manager? What happens if you right-click on it and untick the "Enable Mobile Broadband" box? For me, that allows reconnection without unplugging - although not ideal of course. (I guess it kills modem-manager, from what ehasenle said.)

The really annoying thing is that with Ubuntu 9.10 I had the whole mobile broadband thing set up and working perfectly - plug in modem, pc would connect, and keep reconnecting silently in the background every time the signal dropped as my train journey proceeded. Upgrading to 10.4 put a stop to all that, sadly...

Rolf Kutz (vzsze) wrote :

I have the same problem with two Huawei umts sticks and an internal umts modem (Samsung). The modem connects for the first time, but won't a second time most of the times. Killing modem-manager solves the problem.

Rocklobster (jhecker) wrote :

I am also having this problem with Ubuntu 10.04 and a Huawei E1762 modem. My provider likes to terminate the PPP session for no reason anywhere from 1 minute to 2 days after a connection eg:

Aug 31 08:25:30 myth pppd[2313]: LCP terminated by peer
Aug 31 08:25:30 myth pppd[2313]: Connect time 127.7 minutes.
Aug 31 08:25:30 myth pppd[2313]: Sent 2547370 bytes, received 16321521 bytes.
Aug 31 08:25:30 myth pppd[2313]: Modem hangup
Aug 31 08:25:30 myth pppd[2313]: Connection terminated.
Aug 31 08:25:31 myth pppd[2313]: Exit.

Doing a "sudo killall modem-manager" seems to kill the old process and somehow it automatically restarts - by which mechanism I don't know. After that I can manually restart the connection again using the network manager GUI. I'd love it if network-manager and modem-manager worked in concert to allow automatic reconnects, with an upper limit of reconnections if so desired.

I'll happily pass along more debug information if so required.

Rocklobster (jhecker) wrote :

Sorry, I should clarify the problem above. I can connect to my 3G ISP using the E1762 modem but after a disconnect from the provider an attempt at connecting again fails. Either power cycling the modem by unplugging it or restarting modem-manager then allows network manager to once again establish a connection.

Kevin Hudson (kevinlhudson) wrote :

This affects me too Modem Pantech UM150VW.
I'd bee happy I I could just reconnect without having to unplug and re plug the modem.

Rolf Kutz (vzsze) wrote :

On 17/02/11 04:01 -0000, Kevin Hudson wrote:
>This affects me too Modem Pantech UM150VW.
>I'd bee happy I I could just reconnect without having to unplug and re plug the modem.

Try

sudo killall modem-manager

Paulo Matias (paulo-matias) wrote :

The problem is that when a device switches from any state besides the final CONNECTED state to the FAILED state, networkmanager marks the connection as invalid to avoid it from reconnecting over and over. However, this behavior is not sane when the connection type is mobile broadband, as the intermediate states have no meaning, as they are not informed by the modem. So the sane behavior is to let networkmanager reconnect and let the user to unplug the modem or "disable mobile broadband" if desired.

The attached patch was tested applied against network-manager 0.8.2-0ubuntu1~nmt2 from ppa:network-manager/ppa in maverick, and solved the issue, allowing to reconnect without hacks after pppd hanged up, and even to setup networkmanager to reconnect automatically (just set the connection as automatic).

tags: added: patch
Roman Vorobets (roman-vorobets) wrote :

I have tested the patch by Paulo and it works for me. Thank you!

Marius B. Kotsbak (mariusko) wrote :

Is the patch submitted upstream?

Rolf Kutz (vzsze) wrote :

Can this be backported to 10.04!?

Rolf Kutz (vzsze) wrote :

Backport the patch to network-manager_0.8-0ubuntu3.2 (the version in 10.04).

Changed in network-manager (Ubuntu):
status: New → Confirmed

Does this patch work in Natty? I have the same problem with my Qualcomm Gobi 2000 module. It disconnects and the device disappears for a little while (30 seconds or so) and then reappears and I have to re-connect my mobile broadband connection manually.

And if it works in Natty – someone got a .deb with this patch in a PPA or something?

It doesn't seem to be fixed in Oneiric either. I've looked into the source code in oneiric, and it doesn't look like the patch has been submitted.

I would very much like to test this and get it fixed somehow.

Marius B. Kotsbak (mariusko) wrote :

Please send the patches to network manager mailing list.

There's at least one issue with such a patch, which makes it unacceptable as it is: using this, if a device is marked failed because of an invalid PIN, you'd end up locking the device and requiring PUK entry -- not all that good ;)

Let's keep figuring out how this can be dealt with in a better manner.

tags: added: patch-needswork
removed: patch

Could the importance of this bug be set to high? Ubuntu is basically unusable, when you have to reboot on every disconnect.

Rolf Kutz (vzsze) wrote :

You don't have to reboot, killing modem-manager will be enough most of the times.

Gabriel Couto (gabrielrcouto) wrote :

I use a script to reconnect my ONDA 3G modem, because the solution above doesn't work for me. My script is executed by cron, every 5 minutes.

#!/bin/bash

MCHECK=`lsusb | grep ONDA`

if ! [ -n "$MCHECK" ]; then
echo "3G/GPRS modem not in use, ignoring..."
exit 0
fi

NCHECK=`/sbin/ifconfig ppp`
NCHECK1=`echo $NCHECK | cut -d " " -f 1`

if [ "$NCHECK1" = "ppp0" ]; then
echo "Connection up, reconnect not required..."
exit 0
else
echo "Connection down, reconnecting..."
#/etc/init.d/networking restart
killall modem-manager
modem-manager
killall NetworkManager
fi

Marius B. Kotsbak (mariusko) wrote :

Same problem in Precise.

tags: added: precise
Thomas Hood (jdthood) on 2012-06-29
summary: - USB Modem wont connect after modem hangup
+ USB Modem wont connect after modem hangup -- Huawei E620
Thomas Hood (jdthood) wrote :

The Huawei E620 is not listed

    https://live.gnome.org/NetworkManager/MobileBroadband/

as a supported modem. Please file a request in the upstream bug tracking system

    https://bugzilla.gnome.org/browse.cgi?product=NetworkManager

asking for this modem to be supported.

Changed in network-manager (Ubuntu):
status: Confirmed → Invalid
Tristan S (tristanstevens) wrote :
Download full text (114.6 KiB)

Still occurring in 12.04, although logs are different now. It will also reconnect (sometimes) just by replugging in the modem, although killing modem-manager is required sometimes.
Logs:

tristan@laptop-hostname:~$ sudo su -
[sudo] password for tristan:
root@laptop-hostname:~# cd /usr/lib
root@laptop-hostname:/usr/lib# ls -l netbeans
ls: cannot access netbeans: No such file or directory
root@laptop-hostname:/usr/lib# which netbeans
root@laptop-hostname:/usr/lib# cd ../local/
root@laptop-hostname:/usr/local# ls -l netbeans-
netbeans-7.0/ netbeans-dev-201106140600/
root@laptop-hostname:/usr/local# du -hs netbeans-7.0/
529M netbeans-7.0/
root@laptop-hostname:/usr/local# du -hs netbeans-dev-201106140600/
372M netbeans-dev-201106140600/
root@laptop-hostname:/usr/local# rm -rf netbeans-*
root@laptop-hostname:/usr/local# exit
logout
tristan@laptop-hostname:~$ tail -1000f /var/log/syslog
Jul 16 07:13:31 laptop-hostname kernel: [ 1.187241] pci 0000:00:1c.0: PME# supported from D0 D3hot D3cold
Jul 16 07:13:31 laptop-hostname kernel: [ 1.187245] pci 0000:00:1c.0: PME# disabled
Jul 16 07:13:31 laptop-hostname kernel: [ 1.187275] pci 0000:00:1c.1: [8086:3b44] type 1 class 0x000604
Jul 16 07:13:31 laptop-hostname kernel: [ 1.187370] pci 0000:00:1c.1: PME# supported from D0 D3hot D3cold
Jul 16 07:13:31 laptop-hostname kernel: [ 1.187375] pci 0000:00:1c.1: PME# disabled
Jul 16 07:13:31 laptop-hostname kernel: [ 1.187403] pci 0000:00:1c.3: [8086:3b48] type 1 class 0x000604
Jul 16 07:13:31 laptop-hostname kernel: [ 1.187501] pci 0000:00:1c.3: PME# supported from D0 D3hot D3cold
Jul 16 07:13:31 laptop-hostname kernel: [ 1.187505] pci 0000:00:1c.3: PME# disabled
Jul 16 07:13:31 laptop-hostname kernel: [ 1.187542] pci 0000:00:1d.0: [8086:3b34] type 0 class 0x000c03
Jul 16 07:13:31 laptop-hostname kernel: [ 1.187566] pci 0000:00:1d.0: reg 10: [mem 0xd7428000-0xd74283ff]
Jul 16 07:13:31 laptop-hostname kernel: [ 1.187671] pci 0000:00:1d.0: PME# supported from D0 D3hot D3cold
Jul 16 07:13:31 laptop-hostname kernel: [ 1.187675] pci 0000:00:1d.0: PME# disabled
Jul 16 07:13:31 laptop-hostname kernel: [ 1.187698] pci 0000:00:1e.0: [8086:2448] type 1 class 0x000604
Jul 16 07:13:31 laptop-hostname kernel: [ 1.187780] pci 0000:00:1f.0: [8086:3b07] type 0 class 0x000601
Jul 16 07:13:31 laptop-hostname kernel: [ 1.187907] pci 0000:00:1f.2: [8086:3b2f] type 0 class 0x000106
Jul 16 07:13:31 laptop-hostname kernel: [ 1.187933] pci 0000:00:1f.2: reg 10: [io 0x6048-0x604f]
Jul 16 07:13:31 laptop-hostname kernel: [ 1.187943] pci 0000:00:1f.2: reg 14: [io 0x605c-0x605f]
Jul 16 07:13:31 laptop-hostname kernel: [ 1.187954] pci 0000:00:1f.2: reg 18: [io 0x6040-0x6047]
Jul 16 07:13:31 laptop-hostname kernel: [ 1.187964] pci 0000:00:1f.2: reg 1c: [io 0x6058-0x605b]
Jul 16 07:13:31 laptop-hostname kernel: [ 1.187974] pci 0000:00:1f.2: reg 20: [io 0x6000-0x601f]
Jul 16 07:13:31 laptop-hostname kernel: [ 1.187984] pci 0000:00:1f.2: reg 24: [mem 0xd7427000-0xd74277ff]
Jul 16 07:13:31 laptop-hostname kernel: [ 1.188050] pci 0000:00:1f.2: PME# supported from D3hot
Jul 16 07:13:31 laptop-hostname kernel: [ ...

Changed in modemmanager:
status: New → Incomplete
Marius B. Kotsbak (mariusko) wrote :

This RedHat bug indicates that it might have been fixed in newer versions:

https://bugzilla.redhat.com/show_bug.cgi?id=517442

Has anyone experienced this in Ubuntu 12.10/Quantal?

Paulo Matias (paulo-matias) wrote :

I think the RedHat bug (517442) may not be related to this bug at all. This bug was not specific to the E620. In fact, it appeared to be a general issue affecting users of any GSM modem.

Most people commented here or marked "this bug affects me" only to avoid reporting duplicate bugs. For instance, I had this issue with Huawei E156B and with a ZTE modem I forgot the model. People reported having this problem with modems from other manufacturers (like Samsung and Pantech) in previous comments.

Unfortunatelly, I don't use those modems anymore, so I can't test if the issue was solved in recent releases.

Marius B. Kotsbak (mariusko) wrote :

Okay, seems like you are right. But it is not correct that all modems have troubles reconnecting. It works fine with most of my modems. I have just experienced it with an Ericsson module. So please add debug logs of this specific modem, or report new bug reports for other modems:

https://wiki.ubuntu.com/DebuggingModemmanager

no longer affects: network-manager (Fedora)
Changed in network-manager (Ubuntu):
status: Invalid → New
Marius B. Kotsbak (mariusko) wrote :

I open the Ubuntu task again, as the RedHat bug report referred to above indicate that upstream supports the modem.

Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in network-manager (Ubuntu):
status: New → Confirmed
Marius B. Kotsbak (mariusko) wrote :

Someone having this problem, please add debug logs as described in comment #26.

Changed in network-manager (Ubuntu):
status: Confirmed → Incomplete
Prateek Chaba (prateekchaba) wrote :

Dear All, I am facing the same problem i am using Huawei Cdma EC150 MOdem in Ubuntu 13.10 Saucy Salamander netwok manager version 0.9.8.0 lsusb output :
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 014: ID 12d1:140b Huawei Technologies Co., Ltd. EC1260 Wireless Data Modem HSD USB Card
Bus 002 Device 003: ID 0e8f:0022 GreenAsia Inc.
Bus 002 Device 008: ID 04ca:0061 Lite-On Technology Corp.
Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub

I was a Windows user 2-3 months back for about 15 years and now i am new to linux (ubuntu/fedora/opensuse/chrome os) and yes i don't know how to apply a patch kindly help me i'll be grateful to you

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.