Sunday, August 2, 2009

Internet for Linux(Ubuntu) users using BSNL WLL modem

This is a tutorial which illustrates how to connect to internet from Linux for those who are using Bsnl WLL modems to connect to the internet from Windows. At present Bsnl WLL modems have no driver support for Linux. Many users like me struggle a lot to connect to internet using WLL setup in Linux and many are left behind from using Linux as they don't find a way to connect to internet using WLL.

I have found a way sometime back to configure the WLL modem in order to connect to internet from Linux. I will be illustrating this with the help of Ubuntu 8.04LTS(Heron Hardy) as my Linux OS and the Bsnl WLL modem I have used is LG CDMA Fixed Wireless Terminal model : LST - 260B. I'm writing in the perspective that my readers have the basic knowledge in using Linux distros and are comfortable with the commands and technical terms I'm using here. This will not be much helpful to complete inexperienced Linux user.


So here goes :

1. Install wvdial packages if not installed. It will be already installed by Heron Hardy or later editions of Ubuntu by default installation.

2. Plug-in the USB of your modem to any of the USB port, the port number doesn't matter in my configuration method, as found in most of the other earlier methods written by many other users. Your USB modem will be detected as /dev/ttyACM0

3. Now in the Terminal run the command sudo wvdialconf
This will configure details about the modem connected and will store in the config file /etc/wvdial.conf

4. But we have to edit this wvdial.conf file to suite our needs. That is, the wvdialconf command will collect as much details about your modem and will list it in the wcdial.conf file. We have to provide some additional information as to configure the modem so as the work with Bsnl WLL settings. So edit this file with sudo :

sudo gedit /etc/wvdial.conf

5. The file content should be edited and should be made to look almost like this :

[Dialer Defaults]
Init1 = ATZ
Init2 = ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0
Init3 = at+crm=1;at$lgpkt=3
Password = 9400
Phone = #777
Idle Seconds = 90
Modem Type = USB Modem
Baud = 460800
New PPPD = yes
Modem = /dev/ttyACM0
ISDN = 0
Username = 4812469400
Auto Reconnect = off

  • Password and User name must be like this : for example, if your phone number is 0481-2469400. Then your Password will be the last four digits, that is 9400 in my example and User name will be 4812469400, thats your full phone number.
  • The initialization command for LG CDMA LST-260B is at+crm=1;at$lgpkt=3, which is specified as Init3 in my example. The Init1 and Init2 are automatically acquired by the wvdialconf command. For newer WLL modems the Init3 are also automatically generated. If it is not happening, either they are capable of working without Init3 command or you have to manually find this command from your Windows modem settings. You can find this from Windows in Control Panel > Phone and Modem and in the Modem tab select your modem from the list and click Properties to view the modem properties. In the Properties window under the Advanced tab you can find the Extra Initialization commands where the Initialization command for your modem is specified. For modems like LG CDMA LST-260B even in Windows you have to enter this initialization command manually, in that case you have to get this code sequence from you ISP.
  • Set Idle Seconds to the time that you wish to disconnect net if web activity is idle for the specified time period. For instance, set the value to 1800 for 30mins.

Now save the file and close it.

5. Now at Terminal, type wvdial to connect to internet.
Wait until all the following text appears in the terminal window:

jinmatt@jinmachine:~$ wvdial
--> WvDial: Internet dialer version 1.60
--> Cannot get information for serial port.
--> Initializing modem.
--> Sending: ATZ
ATZ
OK
--> Sending: ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0
ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0
OK
--> Sending: at+crm=1;at$lgpkt=3
at+crm=1;at$lgpkt=3
OK
--> Modem initialized.
--> Sending: ATDT#777
--> Waiting for carrier.
ATDT#777
CONNECT
--> Carrier detected. Waiting for prompt.
--> Don't know what to do! Starting pppd and hoping for the best.
--> Starting pppd at Sun Aug 2 09:25:30 2009
--> Warning: Could not modify /etc/ppp/pap-secrets: Permission denied
--> --> PAP (Password Authentication Protocol) may be flaky.
--> Warning: Could not modify /etc/ppp/chap-secrets: Permission denied
--> --> CHAP (Challenge Handshake) may be flaky.
--> Pid of pppd: 7442
--> Using interface ppp0
--> local IP address 10.1.0.37
--> remote IP address 10.64.64.64
--> primary DNS address 218.248.240.79
--> secondary DNS address 218.248.240.24

Now minimize the terminal window, and your are connect to internet!! So browse through your WLL!!

In the Termnial used for connecting internet, press Ctrl+C to disconnect later on if needed.

Note: This is an example I have shown how to connect a Ubuntu distro to the internet using a LG CDMA LST-260B WLL phone modem. You can modify this illustration to suite your needs. This method can be applied to any Linux distro with wvdial packages. All you have to do is, change the commands and settings according to the linux distro, modem, and the ISP you are using. And must be configuring the modem as a root user in other distros unlike in Ubuntu where the sudo command is used to attain the power of root user.

I must now start all over again...

Yeah, I have to start blogging again. It's been a long time since I have posted anything here after my last post about the release of Firefox 3 and its world record setting event. After that the time have passed a lot and here I'm posting something after a longtime...now it is FF 3.5 era!! I missed so much and technology went 2x faster ahead!!

So I guess this time, I think I'm really back at blogging. My B.Tech final year exams are now over and I have free time to improve myself a lot, until I can find a job at the right time. The final year was a nice time in my lifeline, but there wasn't much time for blogging and techy stuffs in between the fun we were having in the last year of the college life. So now for the time being I hope I can put aside my laziness and do and learn something useful.

As an ending note to this post I must say this is after all a good day to start again...the 2009 Friendship day. It was in deed a nice day for me and was happy to see all my friends' greetings, and so Happy Friendship day my blog readers!!...