Skip to main content

Accessing Internet on Fedora 10 using 3G Huawei USB broadband Modem from Nawras

Its been more than a month since i started to configure my Huawei modem for internet connectivity in Linux. Finally today i am logged in F10 and editing this post.

1. Firstly one has to check if the modem is being detected on the USB port.
dmesg | grep USB should show entries for 2 or 3 USB ports. (ttyUSB0-ttyUSB2). My system shows 2 entries. Look the messages of following type:
/***************************************************************************/
usb 4-3: GSM modem (1-port) converter now attached to ttyUSB1
scsi18 : SCSI emulation for USB Mass Storage devices
usb 4-3: New USB device found, idVendor=12d1, idProduct=1003
usb 4-3: New USB device strings: Mfr=1, Product=2, SerialNumber=0
usb 4-3: Product: HUAWEI Mobile
usb 4-3: Manufacturer: HUAWEI Technologies
usb-storage: device found at 6
/****************************************************************************/
The kernel should be able to identify the modem as a usb-storage device.
If you have problems with this , workarounds for the problem from internet.

2. Enable FTDI module.
Issue the command :/sbin/modprobe ftdi_sio
Now unplug/plug the modem.
check with dmesg |grep "ftdi"
Later on we are going to put this command in some script to be executed at startup.

3. Download wvdial and wvstreams.

http://en.wikipedia.org/wiki/Wvdial
http://alumnit.ca/wiki/index.php?page=WvDial

A few dependencies were required by wvstreams, so i had to install them
also by transporting them from pen drive.
Install wvstream (.configure,make, make install).
Install wvdial (make, make install).

4. The following files and directories are created
/etc/wvdial.conf
/etc/ppp/peers/wvdial

5. Configure wvdial. This will populate the file /etc/wvdial.conf.
You can either directly edit the file or download genome PPP (GUI based interface.)
Using Genome PPP is helpful if you are not able to establish a connection. (Help on using GPP for wvdial :-http://www.nerdgirl.dk/linux/fc8/huawei_e220.php).

-->wvdial conf /etc/wvdial.conf
Now open the file and see. A few entries for the modem can be seen.
After numerous amount of trials i added the following entries to wvdial
/********************wvdial.conf*********************************************/
[Dialer pin]
Modem=/dev/ttyUSB0
Baud=460800
Init1=AT+CPIN=**** (enter your pin number here)

[Dialer Tele2]
Modem=/dev/ttyUSB0
Baud=460800
Init2=AT+CGDCONT=1,"IP","isp.nawras.com.om"
Phone=*99#
Username =one
Password =One
New PPPD=yes
Auto DNS=1
#The settings for your ISP (like baud rate / phone number ) can be seen from windows modem settings.
/*********************************************************************************/

To understand the commands in this file:
http://www.gsm-modem.de/gsm-modem-faq.html

6. Edit /etc/resolv.conf to add domain and IP address for primary and secondary domain of your ISP. The IP address can be resolved by ipconfig in windows cmd line

/********************************resolv.conf*****************************/
domain om16.omantel.net.om
nameserver 212.72.1.186
nameserver 212.72.23.4
/*************************************************************************/

7. Issue the command wvdial pin from CLI (you can give any name in wvdial.conf)
The standard output messages are:
/***************************************************************************/
WvDial: Internet dialer version 1.60
--> Cannot get information for serial port.
--> Initializing modem.
--> Sending: AT+CPIN=****
AT+CPIN=****
OK
--> Modem initialized.
--> Configuration does not specify a valid phone number.
--> Configuration does not specify a valid login name.
--> Configuration does not specify a valid password.
/*****************************************************************************/


8. Next issue the command wvdial Tele2. The standard output messages are:
/******************************************************************************/
WvDial: Internet dialer version 1.60
--> Cannot get information for serial port.
--> Initializing modem.
--> Sending: ATZ
ATZ
OK
--> Sending: AT+CGDCONT=1,"IP","isp.nawras.com.om"
AT+CGDCONT=1,"IP","isp.nawras.com.om"
OK
--> Modem initialized.
--> Sending: ATDT*99#
--> Waiting for carrier.
ATDT*99#
CONNECT
--> Carrier detected. Waiting for prompt.
--> Don't know what to do! Starting pppd and hoping for the best.
--> Starting pppd at Tue Jul 28 18:33:42 2009
--> Pid of pppd: *****
--> Using interface ppp0
--> local IP address *.*.*.*
--> remote IP address 10.64.64.64
--> primary DNS address 212.72.1.186
--> secondary DNS address 212.72.23.4
/***********************************************************************************/

If the command wvdial pin is not issued before wvdial Tele2 then the following messages are issued
/**********************************************************************************/
--> WvDial: Internet dialer version 1.60
--> Cannot get information for serial port.

--> Initializing modem.
--> Sending: ATZ
ATZ
OK
--> Sending: AT+CGDCONT=1,"IP","isp.nawras.com.om"
AT+CGDCONT=1,"IP","isp.nawras.com.om"
+CME ERROR: SIM PIN required
--> Bad init string.

/**********************************************************************************/
8. Finally, i was able to use yum, wget and elinks to install, save and browse, but i was not being able to open firefox. A lot of head banging and finally discovered that by default firefox is in offline mode and it has to be disabled by unchecking File->Work offline in firefox browser page.

Comments

Popular posts from this blog

Intel Core Multi core line of processors introduced around 2006. Replaced the Pentium line of processors. The line up of intel core processors includes low end-i3 (entry level consumer), mid end-i5 (mainstream consumer), high end-i7  and enthusiast-i9. Xeon refers to workstation and server brands. Instead, its better to differentiate generation by technical features. For example, intel core i7 of 12th, 13th and 14th generation differ in base speed, number of performance and efficiency cores,  cache size and micro-architecture technology.  This naming scheme was introduced in 2008 and does not correspond to specific technical features like  number of cores in a processor.  What is multi core processor? A multi core processor is a processor on a single Integrated circuit with two or more execution units called cores. So the processing tasks can be executed in parallel on the separate cores. It might involve data parallelism or task parallelism or hybrid involving ...

Pinging the Host

Our devices require a GPRS connection to the service provider(SP). Recently, we had a problem in which the connection to SP was lost after a certain period of time. So we had to reset the connection to the SP and resetting the connection takes a a few seconds which can be irritable to the customer. So we had to maintain the connection with the SP. Our CTO suggested that the devices number should be maintained in the APN routing table of the SP. Because the SP clears the table after some time to accomodate more incoming connection requests and clear out the ones which are inactive. So the solution was a "ping" to the SP every few minutes, so that the devices entry is maintained in the routing table of the APN. Now the device can connect to SP even after staying idle for the whole night!!

Installing Fedora 10 on External Western digital USB drive for X86_64 AMD processor.

I am putting forward the steps to install F10 on AMD Athlon -X2 Presario CQ60 laptop and my experiences while installing it, so that anyone who reads it can benefit maybe in a small way. 1. Download Fedora iso for architechture suitable to your PC (see fedora installation notes) and create a DVD. Verify the dvd as given in http://fedoraproject.org/en/verify . You have to download a tool for checksum generation (sha1) for the dvd and compare it with the checksum listed on the fedora website for verification. http://docs.fedoraproject.org/readme-burning-isos/en_US/sn-validating-files.html 2. The WD drive should be unformatted. So i had to do that from windows vista->computer(right click)->Manage->Disk Management->WD drive (right click)->Delete partition. Otherwise i got an error that amount of space selected was not available when trying to partition the WD drive during installation. 3. Insert the WD drive and boot into the DVD. Select the default option of install. Do a c...