Mobile broadband connection doesn't connect automatically

Questions about Wi-Fi and other network devices, file sharing, firewalls, connection sharing etc
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
maXmo

Mobile broadband connection doesn't connect automatically

Post by maXmo »

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?
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
mank_in

Re: Mobile broadband connection doesn't connect automaticall

Post by mank_in »

search network connection from menu. select mobile broadband tab select add or edit connection. At least you need insert APN, username and password
maXmo

Re: Mobile broadband connection doesn't connect automaticall

Post by maXmo »

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.
mank_in

Re: Mobile broadband connection doesn't connect automaticall

Post by mank_in »

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
Brahim Salem

Re: Mobile broadband connection doesn't connect automaticall

Post by Brahim Salem »

Solution here [url]http://forum.linuxmint.com/viewtopic.php?f=42&t=149560[/url] :D
maXmo

Re: Mobile broadband connection doesn't connect automaticall

Post by maXmo »

I resorted to an udev rule, that's a little more technical.
Brahim Salem

Re: Mobile broadband connection doesn't connect automaticall

Post by Brahim Salem »

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!
Locked

Return to “Networking”