Auto connect to 3G network only works after manually enabling mobile broadband after modem inserted/bootup/resume

Bug #848164 reported by Anders Feder
508
This bug affects 133 people
Affects Status Importance Assigned to Milestone
NetworkManager
Fix Released
Medium
network-manager (Debian)
Fix Released
Undecided
Unassigned
network-manager (Ubuntu)
Fix Released
Medium
Unassigned

Bug Description

NetworkManager does not connect to my 3G provider at login, even though it is configured for automatic connection.

What I expect:
- When selecting the option "connect automatically" in the network-setting for a mobile connection, it should connect automatically, like it has until Ubuntu 11.04.

What happens:
- When I plug in the modem (USB; e.g. "UMTS-Stick"), it appears as available connection, but does not connect;

ProblemType: Bug
DistroRelease: Ubuntu 11.10
Package: network-manager 0.9.0-0ubuntu3
ProcVersionSignature: Ubuntu 3.0.0-11.17-generic 3.0.4
Uname: Linux 3.0.0-11-generic x86_64
ApportVersion: 1.22.1-0ubuntu2
Architecture: amd64
CRDA: Error: [Errno 2] No such file or directory
Date: Mon Sep 12 20:32:01 2011
IfupdownConfig:
 auto lo
 iface lo inet loopback
InstallationMedia: Ubuntu 11.04 "Natty Narwhal" - Release amd64 (20110427.1)
IpRoute:
 default via 10.0.0.1 dev wlan0 proto static
 10.0.0.0/24 dev wlan0 proto kernel scope link src 10.0.0.6
 169.254.0.0/16 dev wlan0 scope link metric 1000
Keyfiles: Error: [Errno 2] No such file or directory
NetworkManager.state:
 [main]
 NetworkingEnabled=true
 WirelessEnabled=true
 WWANEnabled=true
ProcEnviron:
 PATH=(custom, no user)
 LANG=da_DK.UTF-8
 SHELL=/bin/bash
SourcePackage: network-manager
UpgradeStatus: Upgraded to oneiric on 2011-09-12 (0 days ago)

Revision history for this message
Anders Feder (afeder) wrote :
Revision history for this message
Anders Feder (afeder) wrote :

For what it is worth, this the debug output from modem-manager at startup.

Revision history for this message
Mathieu Trudel-Lapierre (cyphermox) wrote :

AFAIK, autoconnection for mobile broadband is not yet supported.

Marking Wishlist/Confirmed. Some work will be needed there.

Changed in network-manager (Ubuntu):
status: New → Confirmed
importance: Undecided → Wishlist
summary: - NetworkManager fails to autoconnect to 3G network
+ autoconnect to 3G network
Revision history for this message
Anders Feder (afeder) wrote : Re: autoconnect to 3G network
Revision history for this message
Daniel Holm (danielholm) wrote :

Same here but also when I resume the computer after suspend.

Revision history for this message
Russell Faull (rfaull) wrote :

This is a kinda annoying bug in 11.10. If my connection drops-out (fairly regular event), I can't reconnect without a reboot. I have tried sudo killall modem-manager (worked in 11.04), disable networking and sudo restart network-manager without effect. Am I missing something? Is there an easy workaround? Can I downgrade network manager or other package?

Revision history for this message
Russell Faull (rfaull) wrote :

I tried sudo restart modemmanager and that seems to work after waiting 30 seconds or so.

I wonder, though, if there is a dropout, why does this process not get automatically triggered if auto connection is set in network manager?

Revision history for this message
Angelos Vlassopoulos (avlass) wrote :

What I do is put the computer to sleep (suspend) and then when it wakes up everything is ok.

Revision history for this message
Anders Feder (afeder) wrote :

Russell, your issue seems unrelated to autoconnection. You may want to file a separate bug report.

Revision history for this message
Russell Faull (rfaull) wrote :

Anders, thanks for your help. I have filed bug report at LP#905622

summary: - autoconnect to 3G network
+ autoconnect to 3G network in Ubuntu 11.10 Oneiric
description: updated
Changed in network-manager:
importance: Unknown → Medium
status: Unknown → Confirmed
Revision history for this message
Zane Zakraisek (doublezane) wrote : Re: autoconnect to 3G network in Ubuntu 11.10 Oneiric

Is this the kind of bug to get fixed in 12.04, or is this looked at as a pretty low priority? This bug is getting pretty annoying. I leave my computer on 24/7 now connected to mobile broadband. Every day the connection drops and I have to go into Netowrk Manager and disable/reenable Mobile Broadband and dial in again. PLEASE FIX THIS!!!

Revision history for this message
Zane Zakraisek (doublezane) wrote :

Can someone please fix this????

summary: - autoconnect to 3G network in Ubuntu 11.10 Oneiric
+ Autoconnect to 3G network only works after manually enabling mobile
+ broadband after modem inserted
tags: added: precise
summary: Autoconnect to 3G network only works after manually enabling mobile
- broadband after modem inserted
+ broadband after modem inserted/bootup/resume
Changed in network-manager:
status: Confirmed → Invalid
Revision history for this message
Thomas Hood (jdthood) wrote : Re: Autoconnect to 3G network only works after manually enabling mobile broadband after modem inserted/bootup/resume

Hey yo, Bug Watcher, it's not "Invalid" upstream. The linked report is a duplicate of upstream #554538 which still has status NEW.

Revision history for this message
Marius B. Kotsbak (mariusko) wrote :

Updated to correct upstream bug report.

Changed in network-manager:
importance: Medium → Unknown
status: Invalid → Unknown
Changed in network-manager:
importance: Unknown → Medium
status: Unknown → Confirmed
Changed in network-manager:
importance: Medium → Unknown
status: Confirmed → Unknown
Changed in network-manager:
importance: Unknown → Medium
status: Unknown → Confirmed
Revision history for this message
Vladimir Dobriakov (vladimir-geekq) wrote :

If the bug is really annoying for you and you can not wait for a proper fix, you can use a full automation workaround (bit complicated) http://www.thefanclub.co.za/how-to/how-auto-connect-ubuntu-1204-gsm-mobile-broadband-connection-on-boot-startup-service#version2

I decided for a less complicated workaround creating a script

    #!/bin/bash
    nmcli -t con up id "simyo"

Note: "simyo" is the name of my GSM/UMTS provider and the name of the connection in the NetworkManager. See `man nmcli` for documentation.

Then I bound that simple script to a keyboard shortcut (WindowsKey+F5).

tags: added: quantal
Revision history for this message
Miles Sharpe (msdomdonner) wrote : Re: [Bug 848164] Re: Autoconnect to 3G network only works after manually enabling mobile broadband after modem inserted/bootup/resume

-----Original Message-----
From: Marius Kotsbak <email address hidden>
Reply-to: Bug 848164 <email address hidden>
To: <email address hidden>
Subject: [Bug 848164] Re: Autoconnect to 3G network only works after
manually enabling mobile broadband after modem inserted/bootup/resume
Date: Tue, 30 Oct 2012 08:37:09 -0000

** Tags added: quantal

Hi Marius, this worked for me on 12.04. Have got to next release yet
http://www.thefanclub.co.za/how-to/how-auto-connect-ubuntu-1204-gsm-mobile-broadband-connection-on-boot-startup-service

Miles

Revision history for this message
Marius B. Kotsbak (mariusko) wrote : Re: Autoconnect to 3G network only works after manually enabling mobile broadband after modem inserted/bootup/resume

Japp, it still works as a workaround, but we should have a proper implementation of something like this.

Revision history for this message
rpr nospam (rpr-nospam) wrote : Re: [Bug 848164] Re: Autoconnect to 3G network only works after manually enabling mobile broadband after modem inserted/bootup/resume

On Tue, Oct 30, 2012 at 1:06 PM, Marius Kotsbak wrote:
> Japp, it still works as a workaround, but we should have a proper
> implementation of something like this.

More precisely, a user friendly GUI implementation.

-- rpr.

Revision history for this message
Shannon Black (shannon-netforge) wrote : Re: Autoconnect to 3G network only works after manually enabling mobile broadband after modem inserted/bootup/resume

nah, if it needs an extended GUI then its still a bug .. needs to work like a built in connection of the dialog needs to be adjusted.. not too sure why it worked OOTB in 10.10 but if it worked in a previous version its a regression that can be remedied? :)

Revision history for this message
TheHobbit (the-hobbit) wrote :

Thr attached script is a work around (tested on 12.04LTS) put into /etc/init.d as mm_monitor and execute
$ sudo uptate-rc.d mm_monitor defaults

The script run as a daemon ensuring that nmcli nm wwan on is called whenever modem manager adds a device. Beside solving the bug as described it also ensure that auto-connect system-accessible WWAN devices are connected on startup (which was my original problem)

Hoping it helps
TH

summary: - Autoconnect to 3G network only works after manually enabling mobile
+ Auto connect to 3G network only works after manually enabling mobile
broadband after modem inserted/bootup/resume
Revision history for this message
Mark Wentland (wentland) wrote :

The problem with 3G network support is not only in autoconnection but also in auto reconnection as described in
https://bugs.launchpad.net/ubuntu/+source/network-manager/+bug/1158442
Kind Regards

Revision history for this message
Marius B. Kotsbak (mariusko) wrote :

There is some code upstream that I am testing now that probably solves this problem, and possibly the reconnection issue too.

Revision history for this message
Leonardo Borda (lborda) wrote :

@mariusko

Hi, did you have a chance to test the upstream patch ?

Leonardo

Revision history for this message
Rafał Rzepecki (divided-mind) wrote :

I actually tracked it down to ModemManager initially having any modem disabled (and NetworkManager just reflects this state, and can manipulate it). `mmcli -e` enabled a modem and also causes the NetworkManager to connect, which confirms this. So the right solution would be to somehow persuade ModemManager to enable modem by default.

Revision history for this message
Marius B. Kotsbak (mariusko) wrote :

Yes, upstream patch works, but for me it did not work after sleep of laptop.

Revision history for this message
K Sriram (sriramkannan95) wrote :

Simplest solution to this problem:

open with root permission:
sudo gedit /etc/rc.local

Now add this line above exit 0

(while :; do nmcli -t nm wwan on; sleep 1; done)&

Save the file and exit.

This is the best solution i have tried, it works in all situations.

Revision history for this message
Tamir (sugip) wrote :

It may seem strange, but the bug persists in Ubuntu 14.04

Changed in network-manager:
status: Confirmed → Invalid
Changed in network-manager:
importance: Medium → Unknown
status: Invalid → Unknown
Changed in network-manager:
importance: Unknown → Medium
status: Unknown → Confirmed
Revision history for this message
Cleanrock (cleanrock) wrote :

Someone tried 0.9.8.10 to see if its fixed ?

Changed in network-manager:
status: Confirmed → Fix Released
Revision history for this message
Art Edwards (edwardsah3-3) wrote :

I am running 12.10 on Dell inspiron 14-z, and I'm using the novatel M760 over virgin mobile. I still have the problem that the system doesn't see the device if I remove, and re-insert it. I have tried the solution suggested in #27, and, now, the modem does autoconnect. However, it has not solved the re-insertion problem. I note the Bug Watch updater that there is a new network-manager as of 2014-05-07. Will this be back-ported to 12.10?

Revision history for this message
Miles Sharpe (msdomdonner) wrote : Re: [Bug 848164] Re: Auto connect to 3G network only works after manually enabling mobile broadband after modem inserted/bootup/resume

On Wed, 2014-06-04 at 16:57 +0000, Art Edwards wrote:
> I am running 12.10 on Dell inspiron 14-z, and I'm using the novatel
> M760 over virgin mobile. I still have the problem that the system
> doesn't see the device if I remove, and re-insert it. I have tried the
> solution suggested in #27, and, now, the modem does autoconnect.
> However, it has not solved the re-insertion problem. I note the Bug
> Watch updater that there is a new network-manager as of 2014-05-07. Will
> this be back-ported to 12.10?
>

Try this. It was all that helped me get 12.04 to auto-connect.
sudo gedit /etc/init.d/mobile-broadband-connect
Copy/paste the following script in and where you see 8ta (2 places) you
have to enter your service provider. Then save and close gedit.
then
sudo chmod +x /etc/init.d/mobile-broadband-connect
sudo update-rc.d mobile-broadband-connect defaults
Then reboot and lets hope it works for you too.
Good luck
Miles

#!/bin/sh
# Mobile Broadband Startup Service script v0.1 alpha by The Fan Club -
April 2012
# acts as startup service script for nmcli to fire up Mobile Broadband
Connections
# NOTE: Use the name of the Mobile Connection in the Network Manager as
the 'id'
# USAGE: start|stop|status
#
### BEGIN INIT INFO
# Provides: mobile-broadband-connect
# Required-Start: $remote_fs $syslog
# Required-Stop: $remote_fs $syslog
# Should-Start: $network
# Should-Stop: $network
# Default-Start: 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Autoconnect 3G GSM
### END INIT INFO

NAME="mobile-broadband-connect"
DESC="Autoconnect 3G/4G GSM USB modem at startup"

test -x $DAEMON || exit 0

case "$1" in
 start)
    echo "Starting Mobile Broadband Connection."

    while true; do
        # testing...
       LC_ALL=C nmcli -t -f TYPE,STATE dev | grep -q "^gsm:disconnected
$"
       if [ $? -eq 0 ]; then
          break
        else
          # no GSM modem detected yet, sleeping for a second
          sleep 1
        fi
    done

    # Once GSM modem detected, run the script
    nmcli -t con up id 8ta
 ;;
 stop)
    echo "Stopping Mobile Broadband Connection."
    nmcli -t con down id 8ta
    nmcli -t nm wwan off
 ;;
 status)
    # Check to see if the process is running with nmcli
       nmcli -p dev
 ;;

 *)
    echo "Mobile Broadband Startup Service"
    echo $"Usage: $0 {start|stop|status}"
    exit 1
esac
exit 0

Revision history for this message
Marius B. Kotsbak (mariusko) wrote :

Version 0.9.10.0 which contains the fix is released to Debian unstable. Please update the Ubuntu package too.

Changed in network-manager (Debian):
status: New → Fix Released
Revision history for this message
Gianfranco Costamagna (costamagnagianfranco) wrote :

Hi Marius, since the ubuntu delta is quite big (didn't check, but the package has been reuploaded more than 20 times) and the package is so important I suggest you to talk directly with some ubuntu maintainer e.g. on freenode/#ubuntu-devel

Revision history for this message
Marius B. Kotsbak (mariusko) wrote :

I might try to backport it. I guess the Debian package builds for Utopic, there were some too old deps when I tried for Trusty.

Revision history for this message
Alberto Salvia Novella (es20490446e) wrote :

Since this bug makes the connection to have to be manually reconnected each time the network goes down, it's a usability issue that doesn't limit the functionality of a core package. So of an importance of 'medium'.

Changed in network-manager (Ubuntu):
importance: Wishlist → Medium
status: Confirmed → Triaged
Changed in network-manager (Ubuntu):
status: Triaged → Fix Released
Revision history for this message
Deniz (deniz-dezigner) wrote :

Issue still here in 14.04 in network-manager 0.9.8.8-0ubuntu7.3.
3g stick doesn't auto reconnect after hibernation.

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

Other bug subscribers

Remote bug watches

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