Using Airtel Edge/GPRS Micromax MMX 610U USB device to surf the internet from Linux
This has been a major headache for me to reboot to Windows just to surf my net, and to update my Linux machine I had to forward the internet connection from a Windows computer to my Linux machine. None-the-less I eventually managed to make it work to day. 🙂
Note that I managed to make it work, and I provide no guarantee that it will work on your computer, but I will share my computer’s configuration so that it may help you.
So, first my computer’s configuration. I have Kubuntu Hardy Heron installed (8.04). My current kernel is 2.6.24-19-generic (installed from the official Ubuntu server). Mine is a 32-bit system. The USB modem I have is Micromax MMX 610U.
Now the steps to setup your USB modem:-
- Plug-in your USB modem. A green light will start blinking. If the light is blue then you have PIN set and I have no idea how to enter PIN code from Linux. In that case, reboot to Windows and from the provided Airtel’s software enter the PIN code and reboot to Linux or disable the PIN altogether.
- Now run the command lsusb in the console the output will be like as below.Bus 005 Device 003: ID 0d49:7410 Maxtor
Bus 005 Device 001: ID 0000:0000
Bus 004 Device 001: ID 0000:0000
Bus 003 Device 002: ID 046d:c016 Logitech, Inc. M-UV69a Optical Wheel Mouse
Bus 003 Device 001: ID 0000:0000
Bus 002 Device 001: ID 0000:0000
Bus 001 Device 004: ID 12d1:1001 Huawei Technologies Co., Ltd. E620 USB Modem
Bus 001 Device 001: ID 0000:0000
Note the bolded text above. That’s your modem.
- Now run sudo wvdialconf. This will create the file /etc/wvdial.conf with some of the necessary values.
- Now whatever values the file /etc/wvdial.conf keep that as such except for the ones shown below. If any settings shown below already existed then replace that with the ones below, if they didn’t exist then just add them to the file, but they must appear below the line [Dialer Defaults]. Note that will need to open the file /etc/wvdial.conf as a root. Try using sudo nano /etc/wvdial.conf.Init1 = AT+CGDCONT=1,”IP”,”airtelgprs.com”,””,0,0
Baud = 460800
stupid mode = 1
Phone = *99#
Password = a ;No need to change this to anything else. This is immaterial, and note that no semicolon before Password =.
Username = a ;No need to change this to anything else. This is immaterial, and note that no semicolon before Username =.
- Now create a file connAir in your home directory. Copy and paste the following code into it and give it execute permission.
#!/bin/bash # BY AppleGrew @ http://blog.applegrew.com (All rigths # reserved) pid=`pgrep wvdial` if [ -z $pid ] then sudo route del default echo "CONNECTING TO Airtel..." wvdial & sleep 10s IP=`ifconfig ppp0|grep -o 'inet addr:\([.0-9]*\)'` IP=`echo $IP|sed 's/inet addr:\([.0-9]*\)/\1/g'` echo "YOUR CURRENT IP IS '$IP'". if [ -z $IP ] then echo "CONNECTION TO Airtel TIMED-OUT........ : (" else echo "CONNECTED TO Airtel. : )" fi sudo route add default gw $IP else echo "A CONNECTION IS ALREADY IN PROGRESS." fi
- Now create another file disconnAir in your home directory. Copy and paste the following code into it and give it execute permission.
#!/bin/bash # BY AppleGrew @ http://blog.applegrew.com (All rigths # reserved) pid=`pgrep wvdial` if [ -z $pid ] then echo "NO CONNECTION IN PROGRESS." else echo "DISCONECTTING FROM Airtel..." kill -INT $pid sleep 6s pid=`pgrep wvdial` if [ -z $pid ] then echo "DISCONNECTED." else echo "DISCONNECTION MAY HAVE FAILED." fi fi
Connecting to Airtel:-
- Open console and type ./connAir.
Disconnecting from Airtel:-
- Open console and type ./disconnAir.
Hope this helps.