≡ Menu

USB Broadband: How to Connect USB Modem Devices on Linux

Most of the usb dongle in market today comes with the drivers and application to use it in a managed way. The setup of this application is stored in its inbuilt memory. For windows system it autoruns and prompts to install the setup as soon as you plug your USB dongle. But, that is not the case for Linux system.

This tutorial explains two solutions on how to setup USB broadband modem devices on your Linux system.

In US, Verizon (4G LTE USB Modem 551), AT&T (USB Force 4G – Aircard), Virgin (U600 3G/4G Prepaid USB Stick), and few others offer USB broadband modem dongle.

Also, Huawei covers indian market with major ISP’s like airtel, TATA, Vodafone, while EVDO covers china market.

Solution 1: Create New Connection

In ubuntu systems, drivers for almost all the types of USB modem are present. You just need to create a new “mobile broadband connection” following the steps below:

Step 1:

Plug the USB net connecter to the system and check for the “new mobile broadband connection” in top right corner, under the item with network icon. In latest version of Ubuntu ( 12.04 onwards ) you will find “Edit Connections” option.

USB Dongle Connections

Step 2:

Select for the “new mobile broadband connection” or “Edit Connections” (in newer versions). Now, click on “Add” new connection and select “mobile broadband” in the options.

USB Dongle Network Connections USB Dongle Coose Connection Type

Step 3:

Select the detected device and Select the “country and region” and continue. It will show you the list of providers according to the country you have selected. Now here you can select the provider of internet connection.

USB Dongle New Connection USB Dongle Country

Step 4:

Select your provider in the available options and continue. If provider is not present in the list, enter it manually as you wish and continue. On the next screen you can select your plan if you have selected your provider. According your plan the APN will be automatically set.

If you are doing manual setup of provider then put the number as *99#, give appropriate APN and leave username, password field blank.

USB Dongle Provider USB Dongle Select Plan

Step 5:

Save your connection and continue.
USB Dongle Save Connection

Step 6:

Now you will see the newly created connection available in top right corner, under the item with network icon, which you can use to connect the dongle. You have successfully connected to web now.

Solution 2: Execute Vendor’s Shell Script

For all linux flavour in general, most of the usb dongle vendors have the set up for it in form of “.sh” file, which is basically a shell script file. It can be executed in linux terminal using sh command. Follow the steps below to get it installed:

Step 1:

Find the “.sh” file in the inbuilt memory of the device. For example in airtel 3g usb dongle you will find it in the folder named “Linux”. If there is no such file we cannot proceed.

Step 2:

There is high probability that this “.sh” is invoking other files in the same folder. So it will be a good approach to copy the complete folder in your system.

Step 3:

For ensuring that the files are having full permissions, change the permission of the folder in your local system to 777 using the command “chmod”.

In ubuntu system use the following command to change the permission:

sudo chmod -R 777 /path/to/the/setup/folder

In other systems you can login as admin user to the terminal and use the following command:

chmod -R 777 path/to/the/setup/folder

Step 4:

Now get into the folder and execute the “.sh” file present there as super user or with admin privilege. Use the following command to do so:

In ubuntu systems:

sudo sh filename.sh

In other systems login as admin user in terminal and do:

sh filename.sh

Step 5:

The application in now successfully installed on your linux system which you can use to connect to the web in a well managed way than the previous solution. It is well managed in the sense that you can track your datausage, use the phone dialer interface , edit the connection setting and many more.

Add your comment

If you enjoyed this article, you might also like..

  1. 50 Linux Sysadmin Tutorials
  2. 50 Most Frequently Used Linux Commands (With Examples)
  3. Top 25 Best Linux Performance Monitoring and Debugging Tools
  4. Mommy, I found it! – 15 Practical Linux Find Command Examples
  5. Linux 101 Hacks 2nd Edition eBook Linux 101 Hacks Book

Bash 101 Hacks Book Sed and Awk 101 Hacks Book Nagios Core 3 Book Vim 101 Hacks Book

Comments on this entry are closed.

  • Jalal Hajigholamali February 11, 2014, 8:03 am

    Hi,

    Thanks a lot for very useful article…

  • GarryG123 February 27, 2014, 10:40 pm

    I have an older Huawei 156E dongle, for supplied 3 years ago by the Sri Lankan telco Mobitel. The Windows software contains the capability to send/receive SMS. Mobitel sends usage information daily. Unfortunately, now that I have switched to LinuxMint 15, I can connect OK, but I miss the SMS capability.

    1) is there any software that has SMS capability with the Huawei dongle?

    Alternatively, I have installed an Oracle Virtualbox VMS running WinXP for those few must-have Windows Apps that won’t otherwise run under wine, but I am unable to locate, let alone share, the dongle. The appears to be two devices: a CD (“Huawei mass storage) and also a drive (Huawei mmc storage).

    2) is it possible to install the dongle in the VMS, and run the connection from there (temporarily) in order to send/receive SMS. I would log out and re-connect in Linux when finished.

    Thanking you,
    Harry

  • Harry Gondalf March 27, 2014, 7:10 am

    I’m running Linux Mint 15 Cinnamon on a I3 Desktop (4GB RAM) and I5 notebook with 4 GB R//am.

    I like the pointer about the shell script, so I’ll try it. What I’m looking to do is

    1) My notebook & desktop are already connected via peer-to-peer ethernet null modem cable. They can talk to each other, share files, etc. How can I get the notebook to connect to the internet via the dongle that is attached to the desktop? Couldn’t do it in Windows, either. I live in Sri Lanka and use a Huawei 3G dongle.

    2) I need a script that will dial my isp (Mobitel) at a certain time at night (can run it in cron, no prob) so I can download stuff when the rates are cheaper. Right now I have to set my bedside alarm to wake up after midnight, then manually connect. Another reason I need such a script is that if I connect earlier, my ISP disconnects me automatically for lack of activity. Even running ping -i 30 google.lk in a terminal window doesn’t guarantee the connection stays up.

    HarryG

  • joshua September 12, 2015, 12:23 pm

    Hi i am using reliance zte usb modem . my problem is, my usb modem is not mounting automatically or not mounting at all . I tried several way to mount in to my ubuntu 14.04 system but no luck . But i found an alternate way to mount the usb modem , i installed virtual box and i attach and detach my usb modem from virtualbox after that my usb modem showed up on . After that i again need to umount usb modem and mount it unless the driver shows device is not ready . this is my daily schedule for connecting internet . I want to cut out this mess and wanna do it in a simple way please help me .

  • nas May 28, 2016, 4:25 am

    when i am trying to connect HSPA MODEM to ubuntu 15.10 getting error like this ”
    Error mounting /dev/sr1 at /media/nitin/HSPA USB MODEM: Command-line `mount -t “iso9660” -o “uhelper=udisks2,nodev,nosuid,uid=1000,gid=1000,iocharset=utf8,mode=0400,dmode=0500” “/dev/sr1” “/media/nitin/HSPA USB MODEM”‘ exited with non-zero exit status 32: mount: /dev/sr1 is write-protected, mounting read-only
    mount: special device /dev/sr1 does not exist”

    so what i do????