3

When you insert your mobile broadband modem usb stick, it gets activated within 5 seconds or almost, and then modem is on (Modem manager); after several seconds, mobile broadband is enabled through the Network Manager (Network manager applet indicator); hence you manually click your setup connection to connect the modem to your provider network. That's cool.

I changed the settings of a connection to AUTOMATICALLY CONNECT thinking that it would connect automatically to the network once the modem is inserted and on, and the network recognized. Unfortunately it it did not.

Is it possible to achieve the above request? Something like setting the modem-manager to notify the network-manager automatically when the first is on or execute a script instead..... like this one:

    #!/bin/bash

    # Script to enable Mobile Broadband 
    # Author: hanynowsky

    # Activate : nmcli con up id "Meditel 2"
    # Deactivate : nmcli con down id "Meditel 2"
    isModemOn=$(lsusb | grep modem\ on)

# Deactivating then Activating the broadband triggers the automatic connection
    if [ -n "${isModemOn}" ]; then
    nmcli nm wwan off #De activate mobile broadband
    nmcli nm wwan on # Activate mobile broadband
    else echo "Modem is off";
    fi

    exit 0;

I thought about adding a startup command : nmcli nm wwan on to enable broadband once my session is opened. This way, I get connected to Internet automatically. But I am afraid mobile broadband cannot be enabled unless there is a modem plugged in. Thanks

Hanynowsky
  • 2,801

1 Answers1

0

This youtube video suggests an approach that I would consider using myself on Ubuntu 12.04 LTS