Finally I got my HUAWEI E220 HSDPA USB 3G MODEM to work in Ubuntu. I've tried lots of things in Ubuntu 7.10, but it just wouldn't work.
Now that I've installed Ubuntu 8.04 I gave it a try again, and I figured it out pretty easily. Next to follow is a HOWTO to get the USB modem to work. Notice this guide is based on my experience with a modem from the Danish part of the mobile telephone company 3.
Basics
- Use the short USB to USB mini cable provided in the package. The long cable with 2 USB sticks is said not to work. I haven't tried my configuration with the long cable yet, so I don't know if it will work. Stick to the short cable to start with.
- Open a terminal (xterm is nice and have a small font) and type tail -f /var/log/kern.log . Now you have a window where you can see what the kernel is fiddling with. This window I now call Kernel status window.
- Open a new terminal. This is where you'll be working in the next steps.
sudo gedit /etc/wvdial.conf
- - -
[Dialer Defaults]
Phone = *99***1#
Username = username
Password = password
Stupid mode = 1
Dial Command = ATDT
[Dialer hsdpa]
Modem = /dev/ttyUSB0
Baud = 460800
Init2 = ATZ
Init3 = ATE0V1&D2&C1S0=0 +IFC=2,2
ISDN = 0
Modem Type = Analog Modem
Init5 = AT+CGDCONT=1,"IP","data.tre.dk";
[Dialer pin]
Init1 = AT+CPIN=****
- - -
replace **** with your own personal PIN code. Alternatively you can disable the PIN code with the modem driver application in Windows. I disabled my PIN code, and now the USB modem blinks a blue color as soon as its connected to a USB port and signal strength is good.
You can tweak your security by changing your Init5 command string. I recommend that you type all the strings in as comments (with a "#" first), and leave the one you need uncommented.
Like this:
Init5 = AT+CGDCONT=1,"IP","data.3.dk"; //bag en firewall
#Init5 = AT+CGDCONT=1,"IP","vip.3.dk"; //delvis bag firewall
#Init5 = AT+CGDCONT=1,"IP","bredband.3.dk"; //ingen firewall
Now that you've set up all the basic stuff its time to plug the USB modem into an empty USB port in your PC.
The USB modem is both a modem and an CD-ROM drive. In Linux we don't need the CD-ROM part, that only contains the Windows drivers and applications.
When in modem state, the box offers three serial USB devices:
/dev/ttyUSB0
/dev/ttyUSB1
/dev/ttyUSB2
You should see the devices being created in the Kernel status window.
If there is more ttyUSB devices created its still fine.
Alternativly you can unplug your USB modem, remove the usb-storage kernel module, and reconnect your USB modem:
sudo rmmod usb-storage
Now its time to wake up the modem and get connected to the internet:
if you specified your PIN code in the wvdial.conf you'll have to execute the PIN code command string first. Otherwise skip this step.
sudo wvdial pin
run the following command and keep an eye on the LED on the USB modem:
sudo wvdial hsdpa
You'll notice a lot of reply information from the modem over the serial link.
If the LED stays constant blue you're connected to the 3 network. Open your browser and try to access a web page.
Trobleshooting
If you get a brand new HUAWEI E220 modem you somehow need to initiate it in Windows first. This sets up some default modem settings.
Firefox starts in offline mode
Workaround 1:
This workaround works on Firefox 3.0.1 or greater.
1. open Firefox
2. type in "about:config" in the address line
3. type in "toolkit." in the Filter box
4. find "toolkit.networkmanager.disable, and set it to "true" by double clicking on it
Workaround 2:
This workaround makes NetworkManager to be always online as we add a non existing interface. Firefox will then be in online mode when it starts.
1. open a terminal
2. sudo nano /etc/network/interfaces
3. add "iface eth1000 inet dhcp" to the end of the file
4. save and quit
Monitor applications
If you want to monitor signal strength and network statistics you can play around with these applications:
http://umtsmon.sourceforge.net/
http://oozie.fm.interia.pl/pro/huawei-e220/

1 comments:
Hi there. I found your tutorial insteresting... however, as I am a newbie in Linux and Ubuntu, I just could not follow your steps. To be precise, Ijust didn't know how to edit whatever, using whatever, and then I got lost.
Would it be possible to break down you r tutorial in such a way that even people like me can follow it step by step?
Thanks.
Jeff
Post a Comment