Yesterday, I got a HSDPA/UMTS USB modem. It's a Huawei e220, shipped standard with a KPN (and probably also an xs4all) HSDPA subscription. I hooked it up, but didn't seem to work out of the box with Linux. I run Ubuntu 7.10 (gutsy) on my laptop. After some research I found out that there were more people having problems with using the device in Linux. Some suggested that kernels > 2.6.20 shouldn't have a problem, but that's not what I experienced.
After trying many options, I got it working. First some background. The device holds both a GSM modem and a flash drive. The flash drive contains the installation bloatware for use on windows (and maybe even mac) systems. When you connect the device, the usb-mass-storage driver is loaded and you can mount the thing, but that's not what we want.
For some reason, when connecting the device, one serial port (managed by the usbserial driver) is found at /dev/ttyUSB0. However, for the device to work, you need to have 3 serial interfaces; ttyUSB0, ttyUSB1 and ttyUSB2. If it only gives you the first one (0), it won't work, not even a simple "ATZ" on the serial port. I'm not sure why you need three, because (we'll see that later) you just use ttyUSB0 to dial out.
Anyway, the following steps allowed me to use the device:
1. Download HuwaweiAktBbo tool from http://www.kanoistika.sk/bobovsky/archiv/umts/ and run (or fist compile and then run) it. This tool does some magic with the usb library and will enable the extra 2 ports on the device.
2. rmmod usbserial and then run "modprobe usbserial vendor=0×12d1 product=0×1003″. This will force the driver to get things going well. (Check with lsusb if the product is 0×1003, since I read it could also be 0×1001)
3. Run the tool you just downloaded. You should now find ttyUSB0-2 in you /dev directory.
To execute the tool (I renamed it to e220setup), I put the following in /etc/udev/rules.d/51-mobiledata.rules:
#/etc/udev/rules.d/51-mobiledata.rules
# Rules for HAUWEI e220
SUBSYSTEM=="usb", SYSFS{idVendor}=="12d1", SYSFS{idProduct}=="1003",
RUN="/usr/local/bin/e220setup"
KERNEL=="ttyUSB0", SYMLINK="modem", GROUP="dialout", MODE="0660"
KERNEL=="ttyUSB1", GROUP="dialout" MODE="0660"
KERNEL=="ttyUSB2", GROUP="dialout" MODE="0660"
Now the device is setup and you can use /dev/ttyUSB0 to setup your connection. I use wvdial and my config looks like this:
[Modem1] Modem = /dev/ttyUSB0 Baud = 460800 SetVolume = 0 Dial Command = ATDT Init1 = ATZ Init3 = ATM0 FlowControl = crtscts [Dialer kpn] Username = KPN Password = KPN Phone = *99# Init2 = AT&F Init3 = ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0 Init4 = AT+CGDCONT=1,"IP","fastinternet","",0,0 Stupid Mode = 1 Inherits = Modem1 New PPPD = yes Dial Command = ATDT ISDN = 0 Modem Type = Analog Modem
Recent Comments