Here’s how you can configure a BSNL CDMA data modem to work in Linux. The device I have is a HUAWEI EC325 meant for the 144 Kb/s connection, but this guide should work fine for other BSNL devices as well (2 Mb/s device, for eg.)
Let’s start off by installing the software. We’ll be needing wvdial and gnome-ppp. So let’s install that. On a Debian based system (Ubuntu, Mint, Elive etc.), do:
$ sudo aptitude update
$ sudo aptitude install wvdial gnome-ppp
Note: Since the net connection isn’t up and working just as yet (duh), make sure your installation CD/DVD is in the apt sources list before you issue the above commands. Use apt-cdrom add for that.
The next step is to setup wvdial. Follow these steps:
1. Make sure the device is plugged in.
2. Type the following command (as root)
# lsusb
3. You’ll see a bunch of lines of the form:
Bus XYZ Device XYZ: ID AAAA:BBBB [Name of Device]
4. Note down the AAAA and BBBB part of your BSNL device. In case no such device is listed, unplug all USB devices except your data card and run the command again. All entries except one will have AAAA and BBBB values of 0. Note this down.
5. Alright, now we have the vendor and product ID of the device. Type the following command:
#modprobe usbserial vendor=0xAAAA product=0xBBBB
(Here replace AAAA and BBBB with the ID you wrote down earlier)
6. Now we can configure wvdial. We’ll need to edit the wvdial.conf file. So do this:
$ sudo nano -w /etc/wvdial.conf
7. Edit it so that the [Dialer Defaults] section looks like this:
[Dialer Defaults]
Init1 = ATZ
Init2 = ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0
Stupid Mode = 1
Modem Type = USB Modem
ISDN = 0
Phone = #777
New PPPD = yes
Modem = /dev/ttyUSB0
Username = Your BSNL username here
Password = Your BSNL Password
Baud = 460800
There. Make sure you save the file
8. Let’s test if everything’s working. Type:
$ sudo wvdial
9. If everything’s configured properly, you should see a series of lines in the terminal and the connection should be successful. You might want to fire up the browser and visit a site to check if it’s working…
10. Now let’s configure gnome-ppp. Start it up by running Run -> ‘gnome-ppp’
11. Click Setup
12. In the Modem page, set Device to “/tty/USB0”, Type -> USB Modem, Speed -> 460800, Volume -> Off, Wait for Dialtone -> Checked.
13. Leave the Networking page as it is. The Options page should look something like this:
14. Close the Setup page, type your username and password in the respective boxes and click connect. If you did everything right, the connection should get established.
15. All done! Now you can create a shortcut to ‘gnome-ppp’ and configure it to start at system startup (using Sessions manager in Gnome/KDE).
There you go… configuring a BSNL data card is a piece o’ cake
In case you have any doubts/suggestions, please post it as a comment.
Filed under: Uncategorized | Tagged: bsnl, data card, ec325, evdo, gppp, huawei, linux, wvdial



hi i am dileep, i tried the methods you have given
and i am getting the following message
–> 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
–>Modem initialized.
–> Sending: ATDT#777
–> Waiting for carrier.
ATDT#777
CONNECT 230400
–> Carrier detected. Starting PPP immediately.
–> Starting pppd at Sun Jul 27 16:33:55 2008
–> Pid of pppd: 6769
–> Using interface ppp0
–> pppd: ��[06][08][10]�[06][08]
–> pppd: ��[06][08][10]�[06][08]
–> pppd: ��[06][08][10]�[06][08]
–> pppd: ��[06][08][10]�[06][08]
–> pppd: ��[06][08][10]�[06][08]
–> Disconnecting at Sun Jul 27 16:34:02 2008
–> The PPP daemon has died: Authentication error.
–> We failed to authenticate ourselves to the peer.
–> Maybe bad account or password? (exit code = 19)
–> man pppd explains pppd error codes in more detail.
–> I guess that’s it for now, exiting
–> The PPP daemon has died. (exit code = 19)
but i am able to login in windows(vista) using same username and password, pls help
pls mail me if you can
dineshdileep@gmail.com
Your wvdial seems to be configured properly. Something’s wrong with the Username and Password.
My guess is, you’ve put those square brackets in the wvdial.conf file
My mistake. I’ll correct it. The file should be something like:
[Dialer Defaults]
Init1 = ATZ
Init2 = ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0
Stupid Mode = 1
Modem Type = USB Modem
ISDN = 0
Phone = #777
New PPPD = yes
Modem = /dev/ttyUSB0
Username = XXXXXXXXXX
Password = YYYY
Baud = 460800
where XXXXXXXXXX is your username and YYYY is ur password. Hope that works.
hi,
i think that the settings are configured properly but on connecting it does not show any moving lines in the terminal
Sending: ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0
ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0
OK
–>Modem initialized.
–> Sending: ATDT#777
–> Waiting for carrier.
ATDT#777
CONNECT 230400
–> Carrier detected. Starting PPP immediately.
–> Starting pppd at Sun Jul 27 16:33:55 2008
–> Pid of pppd: 6769
–> Using interface ppp0
–> pppd: ��[06][08][10]�[06][08]
–> pppd: ��[06][08][10]�[06][08]
–> pppd: ��[06][08][10]�[06][08]
–> pppd: ��[06][08][10]�[06][08]
–> pppd: ��[06][08][10]�[06][08]
it shows only this much content iam using ubuntu 8.04 lts version of linux pleez help
Well that output seems ok to me… The output stops after displaying lines like this:
WvDial: pppd: [08]�[06][08][10]�[06][08]
WvDial: pppd: [08]�[06][08][10]�[06][08]
WvDial: pppd: [08]�[06][08][10]�[06][08]
WvDial: pppd: [08]�[06][08][10]�[06][08]
WvDial: pppd: [08]�[06][08][10]�[06][08]
WvDial: pppd: [08]�[06][08][10]�[06][08]
WvDial: local IP address X.X.X.X
WvDial: pppd: [08]�[06][08][10]�[06][08]
WvDial: remote IP address 10.64.64.64
WvDial: pppd: [08]�[06][08][10]�[06][08]
WvDial: primary DNS address 218.248.240.79
WvDial: pppd: [08]�[06][08][10]�[06][08]
WvDial: secondary DNS address 218.248.240.24
WvDial: pppd: [08]�[06][08][10]�[06][08]
After that you should be able to use the net.. Are you sure you’re unable to browse even after you see these lines?
Edit /etc/ppp/options with your favorite (or not so favorite) editor. Find and comment out the following line:
before:
lcp-echo-failure 4
after:
#lcp-echo-failure 4
As far as I understand this will disable LCP request/replies which can be very helpful in fringe coverage areas.
-Running `sudo gnome-ppp` will create the appropriate files in /etc/ppp. Without sudo it may error out since /etc/ppp can only be written to by root by default.
$ ls -ld /etc/ppp
drwxr-xr-x 8 root dip 4096 2007-09-04 21:59 /etc/ppp
-For effect I like using the “dock in notification area” option. It can be found at gnome-ppp -> Setup -> Options -> Dock in notification area
While executing following command , I found some error message as network unreachable, pls give me the proper instruction in this regard
sudo aptitude install wvdial gnome-ppp
Hi
It seems gnome-ppp is not available in the Ubuntu CD. You could try:
sudo aptitude install wvdial
Setup Wvdial as discussed in the post, go online using ’sudo wvdial’ and then give:
sudo aptitude install gnome-ppp
..and then follow the rest of the article.
Hello,
Very nice tut.. I would like to know that whether any drivers regarding BSNL NIC Modem are to be installed before following these statements. Coz for me im getting a error stating
/dev/modem directory not found… something like tat…
Plz clarify.. im in a desperate need
It’s not necessary to install any drivers since Linux will recognize the device when you plug it into your USB port. That’s the reason why we have told wvdial to look for the modem in /dev/ttyUSB0.
Follow the article carefully and please leave a comment if you encounter any errors.
I tried it..
Ok.. Let me come from the beginning..
when i give sudo aptitude update, should i be connected to any internet..
Im a newbie to Ubuntu & Linux Platform.. pls help e sortout this problem..
You don’t need to.. you could just use the installation CD repos.
But to make it simpler, skip the ’sudo aptitude update’ step (and even the ‘aptitude install’ step if you want to, since wvDial comes preinstalled with Ubuntu if I remember correctly) and follow the rest of the tutorial..
Hurray to saurav…
My problem is solved. May be you should consider adding in the tutorial about saving the file after setting the Dialer Defaults. All these time i have been trying out without saving the file Lolz..
Thanks…
Could i know how to set up the gnome-ppp dialer on start up so that it starts up automatically..
Thanks again tekguru
Glad I was of help. I’ll update the post soon
As for gnome-ppp, you can use the Sessions manager to make it start up automatically (See point no. 15 in the post).
I would like to know whether there is any way of knowing the signal strength, coz i blindly have to browse even without knowing whether im in a place of strong signal or a weak one.
Please do help with this..
Now that’s an issue I haven’t payed much attention to.. So I have no idea how to get a signal strength monitor up and running. Maybe you should look for apps that monitor a mobile phone’s signal strength and then work your way up. Afterall, it is a CDMA device right?
Excellent s stuff..I am also connected to net…But if u provide a way to monitor the signal it ll be very useful…i searched in net..but didnt get anything useful…..
I get the same error as dileep.. Authentication failed. I double-checked my username and password .. Is it BSNL specific..
i cant configure after step 8 ther is no
Sir I followed all the steps above mentioned properly even I have saved the file.
But my system crashes after few minutes of connecting to the net. It connects though.
I am using ubuntu 7.04 what should I do??
Hi,
Excellent, I got my internet working on OpenSUSE in minutes using this guide.
Thank you!
hi i am new to linux i dont even know the basics of it but i followed as you said but i am getting a error messege as “/tty/USB0” file not found
It’s /dev/ttyUSB0, not /tty/USB0 (in 7th step).. Maybe a typo. You could also try /dev/ttyUSB1 or 2 etc if 0 doesn’t work. Alternatively, you could plug it into a different USB port.
Let me know if that worked..
hi iam sunil iam using unbuntu 8.04 iam using bsnl cdma20000 ix EV-DO wireless data terminal .but iam not able to install gnome-pp
after doing rest of steps i got
hacker@hacker-laptop:/$ sudo 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
–> Modem initialized.
–> Sending: ATDT#777
–> Waiting for carrier.
ATDT#777
CONNECT
–> Carrier detected. Starting PPP immediately.
–> Starting pppd at Sat Jan 3 23:02:55 2009
–> Pid of pppd: 6958
–> Using interface ppp0
–> local IP address 10.2.0.15
–> remote IP address 10.64.64.64
–> primary DNS address 218.248.240.79
–> secondary DNS address 218.248.240.135
but still iam not connected please help me
I tried the script. the connection log shows the following message and does not get connected can any one help.
I am using xubuntu – hardy heron
Krishnakant
–> Ignoring malformed input line: “;Do NOT edit this file by hand!”
–> WvDial: Internet dialer version 1.60
–> Cannot get information for serial port.
–> Initializing modem.
–> Sending: ATX3
ATX3
OK
–> Sending: ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0
ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0
OK
–> Modem initialized.
–> Configuration does not specify a valid phone number.
It seems there’s some problem in your wvdial.conf. Please post its contents here..