| « DF stinker | Keeping track of Trac wikis » |
Huawei E270 GSM modem with Danish 3 operator
Today I got to play with a Huawei E270 GSM USB modem AKA "Turbo 3G" from the Danish operator 3, so I'll just post a short writeup of how to get it working under Gentoo, with Gentoo style networking.
Note: This overlaps somewhat with HARDWARE_HUAWEI_E220_HSDPA_USB_MODEM on the gentoo-wiki.com.
First you'll have to enable the following kernel options:
CONFIG_USB_SERIAL_GENERIC=y
CONFIG_USB_SERIAL_OPTION=y
CONFIG_PPP=y
CONFIG_PPP_ASYNC=y
When plugging in the modem the option module should be automatically loaded, if you plug in it before you might see dmesg output like the following:
scsi 7:0:0:0: CD-ROM HUAWEI Mass Storage 2.31 PQ: 0 ANSI: 2
Unless you want to manually load the ppp_async module you'll have to convince udev to do the work for you.
Add the /etc/udev/rules.d/50-huawei.rules file with the following content:
SUBSYSTEM=="usb", SYSFS{idProduct}=="1003", SYSFS{idVendor}=="12d1", RUN+="/sbin/modprobe ppp_async"
If you use another GSM modem you might have to use lsusb -v to get the proper idProduct and idVendor.
Reload udev with udevcontrol reload_rules and plug in the modem.
Now dmesg should output something like:
usb 2-1: new full speed USB device using uhci_hcd and address 2
usb 2-1: configuration #1 chosen from 1 choice
scsi4 : SCSI emulation for USB Mass Storage devices
usb-storage: device found at 2
usb-storage: waiting for device to settle before scanning
PPP generic driver version 2.4.2
drivers/usb/serial/usb-serial.c: USB Serial support registered for GSM modem (1-port)
usbcore: registered new interface driver option
drivers/usb/serial/option.c: USB Driver for GSM modems: v0.7.1
Now emerge ppp if you haven't already done so (I had):
emerge net-dialup/ppp
Now you need to configure ppp the Gentoo way. Add the following to /etc/conf.d/net (note I'm using ppp1 as ppp0 is already used for another connection and Gentoo refuse to have ppp connections without the ppp name):
config_ppp1=( "ppp" )
link_ppp1=( "/dev/ttyUSB0" )
pppd_ppp1=(
"/dev/ttyUSB0"
"460800"
"crtscts"
"modem"
"noauth"
"usepeerdns"
"defaultroute"
"noipdefault"
"noccp"
"nobsdcomp"
"novj"
"user 'irrelevant'"
"password 'irrelevant'"
)
chat_ppp1=(
'ECHO' 'ON'
'ABORT' 'BUSY'
'ABORT' 'ERROR'
'ABORT' 'NO CARRIER'
'REPORT' 'CONNECT'
'TIMEOUT' '10'
'' 'ATZ'
'OK' 'AT+CGDCONT=1,"IP","data.tre.dk"'
'OK' 'ATE1V1&D2&C1S0=0+IFC=2,2'
'OK' 'AT+IPR=115200'
'OK' 'ATE1'
'TIMEOUT' '60'
'' 'ATD*99***1#'
'CONNECT'
)
Note: The first time you might have to add "OK" "AT+CPIN=<pin>" to the chat part. This was already done for me when I got the modem.
Create the needed init symlink:
cd /etc/init.d/
ln -s net.lo net.ppp1
Now you just need to start it with /etc/init.d/net.ppp1 start. If the ppp part is not working you might want to add "debug" to the pppd_ppp1 part.
Now happy mobile surfing!
I couldn't help testing download speed:
wget http://ftp.ing.umu.se/linux/gentoo/releases/x86/2008.0_beta1/install-x86-minimal-2008.0_beta1.iso -O /dev/null
--21:20:00-- http://ftp.ing.umu.se/linux/gentoo/releases/x86/2008.0_beta1/install-x86-minimal-2008.0_beta1.iso
=> `/dev/null'
Resolving ftp.ing.umu.se... 130.239.117.84
Connecting to ftp.ing.umu.se|130.239.117.84|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 63,625,216 (61M) [application/x-iso9660-image]100%[==================================================================>] 63,625,216 439.84K/s ETA 00:00
21:22:22 (443.56 KB/s) - `/dev/null' saved [63625216/63625216]
As you can see it downloaded the 60MB install-x86-minimal-2008.0_beta1.iso in just 2 minutes and 22 seconds.
Trackback address for this post
2 comments
Im trying to get the modem working under Kubuntu 8.04, but im a Linux noob. Could you be of any assistance?
Best regrard
Søren Wojtynka