Every modem has its own application for connecting internet with a unique username and password – be it for broadband connection thought your Ethernet port or any wireless USB modem. Each service or device has its own log-in client for Windows system as well as for Linux. But the Linux versions of such applications are limited as there are lots of Linux distribution is available.
Due to lack of knowledge in Linux, the general users are some time are unable to use the Linux version of those applications. As a result they keep them at a long distance from internet when they are in Linux system.
Eventually, I’m also using BSNL EVDO wireless modem for internet in my computer. BSNL provides a CD containing the dialing client for windows system. But when I tried to find the same for my Ubuntu, I was quite frustrated.
Using BSNL EVDO in Linux requires some expertise and I made it for my Ubuntu. Though you can apply the method for any wireless USB modem in any Linux distribution.
The Procedure
1. Detecting the USB modem
Plug your USB modem into the USB port of your computer. Now check whether the device is being detected properly in your Linux distribution by running the following command at Console:
# sudo tail -f /var/log/messages
The out of the command should look like:
Mar 9 22:01:09 ttg-desktop kernel: [ 7245.633078] usb 1-1: new full speed USB device using uhci_hcd and address 11 Mar 9 22:01:09 ttg-desktop kernel: [ 7245.791998] usb 1-1: configuration #1 chosen from 1 choice Mar 9 22:01:09 ttg-desktop kernel: [ 7245.796434] usbserial_generic 1-1:1.0: generic converter detected Mar 9 22:01:09 ttg-desktop kernel: [ 7245.796648] usb 1-1: generic converter now attached to ttyUSB0 Mar 9 22:01:09 ttg-desktop kernel: [ 7245.799029] usbserial_generic 1-1:1.1: generic converter detected Mar 9 22:01:09 ttg-desktop kernel: [ 7245.799216] usb 1-1: generic converter now attached to ttyUSB1 Mar 9 22:01:09 ttg-desktop kernel: [ 7245.801038] usbserial_generic 1-1:1.2: generic converter detected Mar 9 22:01:09 ttg-desktop kernel: [ 7245.801225] usb 1-1: generic converter now attached to ttyUSB2 Mar 9 22:01:09 ttg-desktop kernel: [ 7245.803011] usbserial_generic 1-1:1.3: generic converter detected Mar 9 22:01:09 ttg-desktop kernel: [ 7245.803187] usb 1-1: generic converter now attached to ttyUSB3
Check the outputs in your computer and check if there is any line similar to “generic converter now attached to ttyUSB0”. That means the device is connected properly and your Linux distribution has detected it properly otherwise you would get an error. ttyUSB0 is the necessary file for your device.
Note: Those who are using Ubuntu 7.04 and Ubuntu 7.10 may face some problems while detecting the USB modem. But you can solve that issue by editing the file / etc/init.d/mountdevsubfs.sh
.
Open the file mountdevsubfs.sh
and find out the function do_start() which should exactly match with the code given at the following link:
Click this link to get the function code.
If not, the replace the existing code with the code obtained from the above link. Run / etc/init.d/mountdevsubfs.sh
from console or restart your computer.
This will create a file called as / proc/bus/usb/.usbfs/devices
which is unavailable at the new releases of Ubuntu.
That’s all you have done and your system can now recognize the device. To confirm, run the following command:
# lsusb
The out put in my computer is like this:
Bus 005 Device 005: ID 13fe:3600 Kingston Technology Company Inc. Bus 005 Device 001: ID 0000:0000 Bus 004 Device 001: ID 0000:0000 Bus 003 Device 001: ID 0000:0000 Bus 002 Device 004: ID 04f3:0230 Elan Microelectronics Corp. Bus 002 Device 001: ID 0000:0000 Bus 001 Device 011: ID 19d2:fffe Bus 001 Device 001: ID 0000:0000
Here Bus 002 Device 004: ID 04f3:0230 Elan Microelectronics Corp. indicates the BSNL EVDO modem.
2. Introducing the device driver with Linux Kernel
Most of the Linux distribution has all the known device drivers inbuilt. In case of any exception, you can insert the driver modules in your Linux kernel. To do so, follow the steps below.
In order to insert the driver module, run the following command at console:
# modprobe usbserial vendor=0x04f3 product=0xo230
Replace the value of “vendor” and “product” with your own device details adding 0x at starting of each id. You can find the above details from the previous line in the outputs which was indicating your device.
But you need to run this command after each time you restart your computer. To make your system ready for permanently loading the device driver, you can add the following line into the file / etc /modules:
usbserial vendor=0x04f3 product=0xo230
You are done with configuring your system to recognize the modem device and create a dialup connection with your Internet service provider.
Now you have to create your dialup profile to connect the internet connection.
3.Creating the Dialup profile
Creating a dialup profile is nothing but a simple task. To create your own, run the following command at the console:
# wvdialconf / etc/wvdial.conf
Which will give you the following output:
Editing `/ etc/wvdial.conf'. Scanning your serial ports for a modem. ttyS0<*1>: ATQ0 V1 E1 -- failed with 2400 baud, next try: 9600 baud ttyS0<*1>: ATQ0 V1 E1 -- failed with 9600 baud, next try: 115200 baud ttyS0<*1>: ATQ0 V1 E1 -- and failed too at 115200, giving up. ttyS1<*1>: ATQ0 V1 E1 -- failed with 2400 baud, next try: 9600 baud ttyS1<*1>: ATQ0 V1 E1 -- failed with 9600 baud, next try: 115200 baud ttyS1<*1>: ATQ0 V1 E1 -- and failed too at 115200, giving up. Modem Port Scan<*1>: S2 S3 WvModem<*1>: Cannot get information for serial port. ttyUSB0<*1>: ATQ0 V1 E1 -- OK ttyUSB0<*1>: ATQ0 V1 E1 Z -- OK ttyUSB0<*1>: ATQ0 V1 E1 S0=0 -- OK ttyUSB0<*1>: ATQ0 V1 E1 S0=0 &C1 -- OK ttyUSB0<*1>: ATQ0 V1 E1 S0=0 &C1 &D2 -- OK ttyUSB0<*1>: ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0 -- OK ttyUSB0<*1>: Modem Identifier: ATI -- Manufacturer: QUALCOMM INCORPORATED ttyUSB0<*1>: Speed 4800: AT -- OK ttyUSB0<*1>: Speed 9600: AT -- OK ttyUSB0<*1>: Speed 19200: AT -- OK ttyUSB0<*1>: Speed 38400: AT -- OK ttyUSB0<*1>: Speed 57600: AT -- OK ttyUSB0<*1>: Speed 115200: AT -- OK ttyUSB0<*1>: Speed 230400: AT -- OK ttyUSB0<*1>: Speed 460800: AT -- OK ttyUSB0<*1>: Max speed is 460800; that should be safe. ttyUSB0<*1>: ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0 -- OK WvModem<*1>: Cannot get information for serial port. ttyUSB1<*1>: ATQ0 V1 E1 -- failed with 2400 baud, next try: 9600 baud ttyUSB1<*1>: ATQ0 V1 E1 -- failed with 9600 baud, next try: 115200 baud ttyUSB1<*1>: ATQ0 V1 E1 -- and failed too at 115200, giving up. WvModem<*1>: Cannot get information for serial port. ttyUSB2<*1>: ATQ0 V1 E1 -- failed with 2400 baud, next try: 9600 baud ttyUSB2<*1>: ATQ0 V1 E1 -- failed with 9600 baud, next try: 115200 baud ttyUSB2<*1>: ATQ0 V1 E1 -- and failed too at 115200, giving up. WvModem<*1>: Cannot get information for serial port. ttyUSB3<*1>: ATQ0 V1 E1 -- failed with 2400 baud, next try: 9600 baud ttyUSB3<*1>: ATQ0 V1 E1 -- failed with 9600 baud, next try: 115200 baud ttyUSB3<*1>: ATQ0 V1 E1 -- and failed too at 115200, giving up. Found a modem on / dev / ttyUSB0. Modem configuration written to / etc/wvdial.conf. ttyUSB0<Info>: Speed 460800; init "ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0"
The / etc/ wvdial.conf
is created and it contains the following entries:
To edit that file run the following command:
# sudo gedit / etc/ wvdial.conf
This will open the file in a text editor. Remove the semi colons from the starting of the lines and enter the target phone number, username and password for your ISP and also add the following line there:
Stupid Mode = 1
Save the file and your are done.
Connecting Internet
It is time to connect the internet with your wireless modem. Open the terminal and run the following command:
# wvdial
You should be connected with the internet instantly. Whenever you want to disconnect the internet, just terminate the connection by pressing Ctrl + C.
Related: Hide Personal Files and Folders in Linux.
Leave a Comment