HOWTO: Setup BSNL Data Card in Linux

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
Jus search gnome-ppp.deb file in net and download.Jus double click to install it.

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 Applications->Internet -> ‘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.Check the Ignore Terminal String option.

13. 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.

14. 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.

7 thoughts on “HOWTO: Setup BSNL Data Card in Linux

  1. hi,

    i followed the procedure, the gnome-ppp connects, but when i click the details link, it shows the status as ‘idle’. the download and upload speeds are zero respectively…. cant ping any site. i use a huawei usb modem.any help will be great.

    • Hai,
      First connect using the command “sudo wvdial” in terminal( I assume that u finished the other steps successfully ).It ll ask root user password.And then it ll show a list of bla bla lines.Even now If you can’t connect to net then there is some problem in your configuration steps.
      So post the result of every command so that i can easily figure out the problem.
      Sometimes if u have no signal these kind of things ll happen.So check ur signal first.You dont have any option in linux.Try to check using windows.

  2. After the sudo wvdial commands several lines are listed and after displaying the isp ip …and pppd ….
    the cursor waits.When i open the browser, its in the offline never connects…whats d problem..

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s