USB Broadband: How to Connect USB Modem Devices on Linux

by Luke P. Issac on February 9, 2014

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.


Linux Sysadmin Course Linux provides several powerful administrative tools and utilities which will help you to manage your systems effectively. If you don’t know what these tools are and how to use them, you could be spending lot of time trying to perform even the basic administrative tasks. The focus of this course is to help you understand system administration tools, which will help you to become an effective Linux system administrator.
Get the Linux Sysadmin Course Now!

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

{ 3 comments… read them below or add one }

1 Jalal Hajigholamali February 11, 2014 at 8:03 am

Hi,

Thanks a lot for very useful article…

2 GarryG123 February 27, 2014 at 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

3 Harry Gondalf March 27, 2014 at 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

Leave a Comment

Previous post:

Next post: