Mobile broadband connection doesn't connect automatically

Connection sharing, Firewall, Samba..etc
Forum rules
Before you post please read this

Mobile broadband connection doesn't connect automatically

Postby maXmo on Fri Jan 04, 2013 12:29 pm

In connections settings I have 2 connections: wired and mobile broadband. I reset autoconnect option for wired connection in case they could conflict and set the autoconnect option for mobile connection, but when I insert usb modem it gets detected, the connection shows up in the network manager for connection, but it doesn't connect on its own. Is it supposed to work?

system is mint 14.1 mate 32bit

When I insert the modem, syslog looks this way:

Jan 4 20:23:39 kira usb_modeswitch: switched to 1bbb:0017 on 002/060
Jan 4 20:23:39 kira kernel: [68291.890498] scsi 56:0:0:0: >Direct-Access ALCATEL Mass Storage 2.31 PQ: 0 ANSI: 2
Jan 4 20:23:39 kira kernel: [68291.891190] sd 56:0:0:0: >Attached scsi generic sg2 type 0
Jan 4 20:23:39 kira kernel: [68291.894528] sd 56:0:0:0: >[sdb] Attached SCSI removable disk
Jan 4 20:23:40 kira usb_modeswitch[21097]: usb_modeswitch: switched to 1bbb:0017 on 2/61
Jan 4 20:23:40 kira modem-manager[714]: <info> (ttyUSB3) closing serial port...
Jan 4 20:23:40 kira modem-manager[714]: <info> (ttyUSB3) serial port closed
Jan 4 20:23:40 kira modem-manager[714]: <info> (X22X): GSM modem /sys/devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.1 claimed port ttyUSB3
Jan 4 20:23:41 kira modem-manager[714]: <info> (ttyUSB4) closing serial port...
Jan 4 20:23:41 kira modem-manager[714]: <info> (ttyUSB4) serial port closed
Jan 4 20:23:41 kira modem-manager[714]: <info> (X22X): GSM modem /sys/devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.1 claimed port ttyUSB4
Jan 4 20:23:51 kira modem-manager[714]: <info> (ttyUSB2) closing serial port...
Jan 4 20:23:51 kira modem-manager[714]: <info> (ttyUSB2) serial port closed
Jan 4 20:23:51 kira modem-manager[714]: <info> (ttyUSB2) opening serial port...
Jan 4 20:23:51 kira modem-manager[714]: <info> (ttyUSB0) closing serial port...
Jan 4 20:23:51 kira modem-manager[714]: <info> (ttyUSB0) serial port closed
Jan 4 20:23:51 kira modem-manager[714]: <info> (ttyUSB0) opening serial port...
Jan 4 20:23:51 kira modem-manager[714]: <info> (ttyUSB1) closing serial port...
Jan 4 20:24:21 kira modem-manager[714]: <info> (ttyUSB1) serial port closed
Jan 4 20:24:21 kira modem-manager[714]: <info> (ttyUSB1) opening serial port...
Jan 4 20:24:27 kira modem-manager[714]: <info> (ttyUSB2) closing serial port...
Jan 4 20:24:27 kira modem-manager[714]: <info> (ttyUSB2) serial port closed
Jan 4 20:24:27 kira modem-manager[714]: <info> (ttyUSB0) closing serial port...
Jan 4 20:24:27 kira modem-manager[714]: <info> (ttyUSB0) serial port closed
Jan 4 20:24:27 kira modem-manager[714]: <info> (ttyUSB1) closing serial port...
Jan 4 20:24:57 kira modem-manager[714]: <info> (ttyUSB1) serial port closed
Jan 4 20:24:57 kira modem-manager[714]: <info> (ttyUSB4) opening serial port...
Jan 4 20:24:57 kira modem-manager[714]: <warn> (ttyUSB4): port attributes not fully set
Jan 4 20:24:57 kira NetworkManager[754]: <warn> (ttyUSB4): failed to look up interface index
Jan 4 20:24:57 kira NetworkManager[754]: <info> WWAN now disabled by management service
Jan 4 20:24:57 kira NetworkManager[754]: <info> (ttyUSB4): new GSM/UMTS device (driver: 'generic' ifindex: 0)
Jan 4 20:24:57 kira NetworkManager[754]: <info> (ttyUSB4): exported as /org/freedesktop/NetworkManager/Devices/14
Jan 4 20:24:57 kira NetworkManager[754]: <info> (ttyUSB4): now managed
Jan 4 20:24:57 kira NetworkManager[754]: <info> (ttyUSB4): device state change: unmanaged -> unavailable (reason 'managed') [10 20 2]
Jan 4 20:24:57 kira NetworkManager[754]: <info> (ttyUSB4): deactivating device (reason 'managed') [2]
Jan 4 20:24:57 kira NetworkManager[754]: <info> (ttyUSB4): device state change: unavailable -> disconnected (reason 'none') [20 30 0]
Jan 4 20:24:57 kira modem-manager[714]: <info> (ttyUSB4) closing serial port...
Jan 4 20:24:57 kira modem-manager[714]: <info> (ttyUSB4) serial port closed
----
At this point the connection shows up in the netwok manager, but doesn't connect automatically. I connect and syslog continues:
----
Jan 4 20:26:05 kira NetworkManager[754]: <info> Activation (ttyUSB4) starting connection 'mobile1'
Jan 4 20:26:05 kira NetworkManager[754]: <info> (ttyUSB4): device state change: disconnected -> prepare (reason 'none') [30 40 0]
Jan 4 20:26:05 kira NetworkManager[754]: <info> Activation (ttyUSB4) Stage 1 of 5 (Device Prepare) scheduled...
Jan 4 20:26:05 kira NetworkManager[754]: <info> Activation (ttyUSB4) Stage 1 of 5 (Device Prepare) started...
Jan 4 20:26:05 kira NetworkManager[754]: <info> (ttyUSB4): device state change: prepare -> need-auth (reason 'none') [40 60 0]
and so on

what's the problem?
maXmo
Level 1
Level 1
 
Posts: 13
Joined: Tue Jan 24, 2012 4:57 pm

Linux Mint is funded by ads and donations.
 

Re: Mobile broadband connection doesn't connect automaticall

Postby mank_in on Fri Jan 04, 2013 9:07 pm

search network connection from menu. select mobile broadband tab select add or edit connection. At least you need insert APN, username and password
Image
Sorry for my bad English , I am Indonesian.
User avatar
mank_in
Level 6
Level 6
 
Posts: 1346
Joined: Wed Nov 16, 2011 2:29 pm
Location: Bali

Re: Mobile broadband connection doesn't connect automaticall

Postby maXmo on Sat Jan 05, 2013 6:14 am

The connection was created and works if I connect it manually, APN, username and password are correct. It just doesn't autoconnect even if I set the "autoconnect" checkbox in the connection properties.
maXmo
Level 1
Level 1
 
Posts: 13
Joined: Tue Jan 24, 2012 4:57 pm

Re: Mobile broadband connection doesn't connect automaticall

Postby mank_in on Mon Jan 07, 2013 8:10 am

I didn't bother anyway with that. if you select connect automatically you still need select enable mobile broadband in network connection applet . Maybe this help : http://askubuntu.com/questions/82255/ho ... nd-on-boot
Image
Sorry for my bad English , I am Indonesian.
User avatar
mank_in
Level 6
Level 6
 
Posts: 1346
Joined: Wed Nov 16, 2011 2:29 pm
Location: Bali

Re: Mobile broadband connection doesn't connect automaticall

Postby maXmo on Mon Jul 01, 2013 2:39 pm

Well, anyway, this is the bug report: https://bugs.launchpad.net/ubuntu/+sour ... bug/848164
maXmo
Level 1
Level 1
 
Posts: 13
Joined: Tue Jan 24, 2012 4:57 pm

Re: Mobile broadband connection doesn't connect automaticall

Postby Zorba on Thu Nov 07, 2013 7:33 pm

Image Image
User avatar
Zorba
Level 7
Level 7
 
Posts: 1990
Joined: Tue May 29, 2012 10:12 pm
Location: Tunisia

Re: Mobile broadband connection doesn't connect automaticall

Postby maXmo on Sat Dec 21, 2013 10:58 am

I resorted to an udev rule, that's a little more technical.
maXmo
Level 1
Level 1
 
Posts: 13
Joined: Tue Jan 24, 2012 4:57 pm

Re: Mobile broadband connection doesn't connect automaticall

Postby Zorba on Sun Dec 22, 2013 8:15 am

Solution 1:

1- create a shell script as follows (Replace "Tunisie Télécom / TUNTEL WEB DATA" with the name of your Mobile Broadband connection name):

Code: Select all
#!/bin/bash

while true; do
    LC_ALL=C nmcli -t -f TYPE,STATE dev | grep -q "^gsm:disconnected$"
    if [ $? -eq 0 ]; then
        #jdownloader is still in the download status so stop it because
        #internet is disconnected and jdownloader won't resume download
        #when connected again
        #jdownloader --stop-download
        #sometimes I can not get connected after disconnection when
        #I click on <name of the network connection>. I have to disable
        #and enable Mobile Broadband
        nmcli -t nm wwan off
        sleep 1
        nmcli -t nm wwan on
        sleep 1
        nmcli -t con up id "Tunisie Télécom / TUNTEL WEB DATA"
        #wait approximately 15 sec to get connected
        #if anyone can add better command to check for it just comment it :-p
        sleep 15
        #now connected to internet so start download
        #jdownloader --start-download
    fi
    #it does not worth keep it checking every millisecond.
    #my connection will be reestablished within 5-15 seconds
    sleep 2
    #if anyone can code it better please feel free to comment
    #TO-DO:: check for data received. if data < 15 KB after 20 seconds of connection
    #reconnect mobile broadband connection 
done



2- Save it and give it execution permission then add it to Startup Applications.

Image


Now it will connect automatically at startup and if connection is dropped.


Solution 2 :

1- get the attached script below

2- extract it to your home folder (or somewhere safe) and make it hidden by placing a dot before it like this .network-autoconnection.sh (so that you won't accidently delete it)

3- Give it execution permission like this: rightclick on it, go to "properties", then navigate to "permissions" then tick "Allow executing file as program"


Image


Image



4- go to the Mint menu and type "startup applications"


5- click on "add" then "browse" opposite to "command" field to give the directory of the script (your home folder or wherever you've placed it) then give it a name in the "name" field, for example mine is "Tunisie Télécom / TUNTEL WEB DATA".

Image



That's it guys!

Script attached below!
Attachments
network-autoconnection.sh.tar.gz
(741 Bytes) Downloaded 20 times
Image Image
User avatar
Zorba
Level 7
Level 7
 
Posts: 1990
Joined: Tue May 29, 2012 10:12 pm
Location: Tunisia

Linux Mint is funded by ads and donations.
 

Return to Other networking topics

Who is online

Users browsing this forum: No registered users and 12 guests