Posts Tagged ‘Huawel’

Recently I bought an Airtel 3G connection using Huawei E1731Bu-1 USB modem. As usual, I wanted to get it working in Debian GNU/Linux amd64 version. As a first step, installed the following packages using apt-get.

sudo apt-get install ppp pppconfig wvdial

Normally this modem is detected properly, but I was curious to know the extra modules loaded when it is connected. So, I tried lsmod before and after connecting the device and found the following extra modules.

cdc_ether, mii, option, usbnet, usbserial, usb_storage, usb_wwan

WvDial

First, I tried to configure wvdial since that seems to be the easiest thing to try. Google gave me reference to PJP’s website.

Pon and Poff

WvDial is great. But, I wanted to try Pon and Poff also. They offer a few advantages over wvdial. As an “original” command, many distributions support them out of the box where as wvdial has to be installed separately. There used be a lot of problems in using WvDial on ARM based systems because of getcontext/setcontext support on ARM.

Already I experienced that while using EC1261 Tata Photon, posted the following on Debian forum.

That is all. You could use pon/poff to connect and disconnect to the network.

pon airtel
poff airtel

MobilePartner Application

Surprisingly, I could get Airtel application to work. Note that we absolutely do not require this to connect to the network. But, it is good to have it, since it is easy to check 3G Balance using *123*11#. It is also helpful while sending and receiving SMS.

There is a CDROM device associated with the modem. It could be found using the “dmesg” command.

You may find a few errors because it is trying to install “NDIS” driver, but it could be ignored since we are not planning to use NDIS driver to connect to the network. By default it is installed in /usr/local/airtel directory. Start the “/usr/local/airtel/MobilePartner” application.

/etc/ppp/pap-secrets

cat /etc/ppp/pap-secrets
#
# /etc/ppp/pap-secrets
#
# This is a pap-secrets file to be used with the AUTO_PPP function of
# mgetty. mgetty-0.99 is preconfigured to startup pppd with the login option
# which will cause pppd to consult /etc/passwd (and /etc/shadow in turn)
# after a user has passed this file. Don't be disturbed therefore by the fact
# that this file defines logins with any password for users. /etc/passwd
# (again, /etc/shadow, too) will catch passwd mismatches.
#
# This file should block ALL users that should not be able to do AUTO_PPP.
# AUTO_PPP bypasses the usual login program so it's necessary to list all
# system userids with regular passwords here.
#
# ATTENTION: The definitions here can allow users to login without a
# password if you don't use the login option of pppd! The mgetty Debian
# package already provides this option; make sure you don't change that.

# INBOUND connections

# Every regular user can use PPP and has to use passwords from /etc/passwd
* hostname "" *

# UserIDs that cannot use PPP at all. Check your /etc/passwd and add any
# other accounts that should not be able to use pppd!
guest hostname "*" -
master hostname "*" -
root hostname "*" -
support hostname "*" -
stats hostname "*" -

# OUTBOUND connections

# Here you should add your userid password to connect to your providers via
# PAP. The * means that the password is to be used for ANY host you connect
# to. Thus you do not have to worry about the foreign machine name. Just
# replace password with your password.
# If you have different providers with different passwords then you better
# remove the following line.