Most efficient way to deal with 3G modems in Ubuntu
It's been a while since the last time I wrote on my blog. Today I thought I should talk about the issues met when using 3G USB modems on Ubuntu (Linux distros generally) since I noticed that it annoys many people because they don't work properly.
Some years ago I came up with a small workaround to this problem when I encountered it for the first time. I used usb_modswitch to properly recognise the device. Then I wrapped it in a script and started distributing it to my friends. Soon, I realized that this wasn't a solution, it did work sometimes, but it wasn't efficient.
So I started digging deeper to find alternative solutions, and I've seen the "sakis3g" project. This project, seemed immature for me in the first time, is script which uses usb_modswitch mainly to make these devices switch from mass storage mode to modem mode. After more releases of this project, it have been becoming more efficient and stable. I tried it on many machines and it worked on all cases so far.
Installing Sakis3g
there are 2 available options to get sakis3g working on your machine:
- compiling the source code (if you're geeky enough).
- installing it from a ppa.
Compiling sakis3g
To compile sakis3g , we need to get the source code from github and compile it. This is done using these commands:
git clone https://github.com/trixarian/sakis3g-source.git cd sakis3g-source mkdir build ./compile sudo cp build/sakis3gz /usr/bin/sakis3g
Installing from PPA
getting packages from PPAs saves up a great deal of time and effort. I found a ppa that holds sakis3g even for the latest release of ubuntu (saucy). To add the ppa and install sakis3g:
sudo add-apt-repository ppa:darklordpaunik8880/darksmsaucy sudo apt-get update sudo apt-get install sakis3g
Update for trusty tahr users (ubuntu 14.04)
Ubuntu 14.04 need to use a new ppa to grab the binary package.
sudo add-apt-repository ppa:darklordpaunik8880/darkminttrustytahr sudo apt-get update sudo apt-get install sakis3g
Here we go, sakis3g is now installed
Using Sakis3g
I will not go through command lines anymore, since saki3g offers us a nice graphical interface to use it. But to enable this interface we need to one last command
sudo sakis3g desktop
this command will create a launcher on the desktop. Go ahead and launch it, I'm pretty sure you will know how to use it ;)
I would recommend not to configure connection through sakis3g since it's a bit buggy, make a new broadband connection from your network manager and use sakis3g just to switch you modem, then connect using the previously created configuration.
Don't forget to share :)