Tag Archives: broadband

Huawei E3531s-2 on Ubuntu 14.04

The BroadBand modem Huawei E3531s-2 on Ubuntu 14.04 does not work out of the box.

Let’s make it work.

  • – Install supervisor:

sudo apt-get install supervisor -y

  • Add a supervisor configuration to a new program: A script we’ell shortly create, In /etc/supervisor/conf.d/broadband.conf


  • Write a script in /usr/bin/broadband and make it executable.

# Script to enable Mobile Broadband
# Author: (hanynowsky@gmail.com)
# Huawei E3531s-2
isBUP=$(nmcli con status | grep -i "${localcon}")
if [ -z "${isBUP}" ];then
echo "Broadband Connection Status is void: ${isBUP}"
nmcli nm wwan on;
sleep 1;
nmcli nm wwan off;
sleep 1;
if [ -n "${isBUP}" ];then
echo "Switching Off connection to ${localcon}"
nmcli con down id "${localcon}";
sleep 1;
echo "Trying to Connect to $localcon"
nmcli con up id "${localcon}";
if [ "$?" -eq 0  ]; then
echo "Connection Established."
sleep 1
#exit 0;

while true; do
if [ -n "$(lsusb | grep '12d1:15ce')" ]; then
# This will switch to modem mode : 12d1:15b1
sudo usb_modeswitch -v 12d1 -p 15ce -M '55534243123456780000000000000011062000000100000000000000000000'
echo "Activating modem, please wait ${WAIT} seconds."
notify-send -u normal -a broadband "Connecting Broadband" "Modem $(lsusb | grep -i huawei). \nPlease wait 25 seconds"
sleep $WAIT
isModem=$(lsusb | grep -iE '12d1:15b1|modem on')
if [ -n "${isModem}" ]; then
eval connector

  • Change ‘localcon=”Meditel2″‘ to the name of your BroadBand Connection (You should have already configured it using Network Manager Applet)
  • Restart Supervisor.
sudo service supervisor restart

Now everytime, you plug the broadband device, it will get connected through the BroadBand connection configuration you already set up. In our case it’s called “Meditel2”.

Please note that once you plug the device, you have to wait 30 seconds before the connection is established.

Mobile Broadband Modem Huawei e173 / e173s on Ubuntu 12.10 Quantal

Recently, I have been using the mobile broadband modem HUAWEI E173S in order to connect to Internet through 3G Cellular UMTS network.

It worked fine in Ubuntu 12.04 Precise Pangolin, but did not in 12.10 Quantal Quetzal.

I was though able to connect the modem thanks to the 3G utility : SAKIS3G and later through the Gnome Network Manager using a former version of Modem Manager packaged for Ubuntu.

  1. Download sakis3g : http://www.sakis3g.org/
  2. Uncompress the downloaded archive and put sakis3g file in your desktop directory.
  3. copy the sakis3g script to /usr/bin/ in order to execute it from Terminal: sudo cp ~/Desktop/sakis3g /usr/bin/
  4. Give it execution rights : sudo chmod 777 /usr/bin/sakis3g
  5. create a configuration file for your modem: gksudo gedit /etc/sakis3g.conf
  6. Append the following on the following on the newly created file:

    These settings are for the Operator Meditel so you have to modify the custom APN, the username, the password that correspond to your Mobile Operator and eventually the USBMODEN identification depending on whether you own the e173 or e173s model.

    To identify your moden while plugged (Notice that when you plug the modem, you need to wait for several seconds before it gets recognized – probably because modem-manager switches the USB stick key from USB Storage to USB Modem), type in Terminal :


    This will give you something like this :

    Bus 002 Device 008: ID 12d1:1c05 Huawei Technologies Co., Ltd. E173s 3G broadband stick (modem on)

    Copy the vendor ID and Product ID. (E173 & E173s have different product Ids).

  7. save the file and run sakis3g: sudo sakis3g connect
  8. In order to disconnect, run : sudo sakis3g disconnect
  9. If you want to be assisted through an interactive configuration, run: sudo sakis3g --interactive


However, if though you succeed in connecting with sakis3G, Ubuntu Software Center, Empathy IM and Software Updater will not be able to connect to Internet because they get Internet route from Network Manager. In order to loop the route, create a new Wireless Network and connect to it. This wireless network must be AD-HOC and SHARED to OTHER COMPUTERS.


And oh Gosh! In order to activate the Mobile Broadband Internet connection, I must send an SMS to a certain operator number. So how coud I send SMS with the Mobile Broadband Modem?

Hopefully, there is gammu and its graphical interface wammu.

So first thing to do is : sudo apt-get nstall gammu wammu
Then create a configuration file for gammu : gedit .gammurc
and append the following (reference : http://wammu.eu/phones/huawei/4562/):
port = /dev/ttyUSB0
connection = at115200
synchronizetime = yes
logfile = ~/gammu.log
logformat = textalldate
use_locking =
gammuloc =

Info: Make sure that the attached port is correct. You can use the command
dmesg|grep tty

Network Manager must be killed in order to liberate the port ttyUSB0:
sudo stop network-manager
then, start wammu:
gksudo wammu
Then, from the menu: PHONE -> Connect



Info: You can achieve a manual configuration through the Phone Wizard in WAMMU. But be sure before that Network-Manager is killed.


What if you did not like SAKIS3G and want to use the Network Manager.

For now Ubuntu Packaged version of ModemManager is buggy and is responsible for Huawei e173 connection failure.

All you need to do is replace this version by a former one. Get it from LAUNCHPAD, through this link (this amd64 package, if you have a 32bits system, replace amd64 by i368 in the link below):


– Uninstall the current installed version (0.6):

sudo apt-get remove modemmanager

and install the downloaded version (0.5.2) by double cliking on the debian file.
Reboot. Plug your modem, wait for 30 seconds. Connect through the Network Manager applet. You’re done.
You will be later prompted to update modemmanager. Don’t, untill the bug is fixed.
To make sure you installed version 5.2, run this command:
dpkg -s modemmanager