![]() |
||||||
|
This page was last modified: April 29 2008 00:40:51 | |||||
Online with Huawei E220 and Gnome PPPI recently got a USB modem with a 1 Mbit/s flatrate connection. The modem is a Huawei E220 with support for 7.2 Mbit/s, but I decided that 1 Mbit/s is good enough for my purposes. I chose "3" as my provider, since no one else can match their coverage in Denmark (around 97%). This is how I got it working with Fedora Core 8 (it may work for other distros too):You need ...
Step 1 - Remove the pin It is possible to get things working with the pin code, but believe me, it is not worth the effort. Plugin the usb modem to a Windows machine. The installation runs automatically. When it's finished, start the software and turn off the pin code. There may be other methods of turning off the pin, but I found this way to be quick and easy. Another tutorial pointed out that the installation on Windows changes some of the settings in the modem, and these changes may be necessary to get the modem working on Linux. Step 2 - Test the modem Plugin the usb modem on your Fedora. To start with, the light will flash green. Wait a few seconds until it changes to a blue color (indicating that the system has correctly detected the device as a usb modem). If it stays green, it has been detected as a usb storage device. This has been a problem on kernel 2.6.19 and older, so if your kernel is too old, you should update it. In the /dev directory you should see this:
# ls /dev/ttyUSB* The ttyUSB2 which is mentioned in a lot of tutorials is not necessary when you have a kernel with native support. Step 3 - Connect with wvdial Connecting the modem with wvdial while keeping an eye on /var/log/messages is a great way of detecting and solving any problems. Create /etc/wvdial.conf with the following content:
[Dialer Defaults] Make sure that you replace "data.tre.dk" with the address of your own provider. For example, if you are using "3" in the UK, you would use "three.co.uk" instead. The entries for Username and Password are irrelevant. You can write anything you like (it has nothing to do with the PIN and PUK codes of your SIM card). You are now ready for your first attempt of connecting, fire up a terminal, become root and use the wvdial command:
$ su If everything works out, you should get output similar to this:
--> WvDial: Internet dialer version 1.60 I ran into a couple of errors: If the daemon dies like this, something isn't right with your configuration: The PPP daemon has died. (exit code = 2) The log file /var/log/messages is very helpfull - this is what I found: In file /etc/ppp/peers/wvdial: unrecognized option 'replacedefaultroute' I commended out the "replacedefaultroute" line in /etc/ppp/peers/wvdial and the error disappeared. I also encountered a DNS problem in the wvdial output:
--> warning, can't find address for `www.suse.de` I fixed this by adding the DNS servers manually in /etc/resolv.conf. Step 4 - Connect using Gnome PPP If you succeed with wvdial, chances are that Gnome PPP will not give you too much trouble. Gnome PPP is available from the Applications -> Internet menu after installation. These are screenshots of my settings:
When Gnome PPP connects, it minimizes to an icon in the panel:
I Googled and did foolish mistakes for two days, so I hope this page will save someone a lot of time and headache. Many thanks to BlueC from Fedoraforum for giving some important pointers. He is using FC8 on a MacBook, check it out. Less usefull stuff I would like to remember... Vodafone has developed a driver for Linux, a manager for GPRS/UMTS/HSDPA devices. It was initially developed for Vodafone's own customers, but it should work with other providers too. The 1.99 version of the driver depends on gksu, but there is no gksu package for Fedora at the moment. Version 2.0 of the Vodafone driver does not have this dependency, and I was able to install and run it, but it failed to connect. The installation reported a few errors:
# rpm -i vodafone-mobile-connect-card-driver-for-linux-2.0.beta1.i386.rpm As mentioned, I was able to start it, but nothing happened when I pressed the "Connect" button. I have no idea why, and I never got around to try and debug the problem, since at that time, I was also messing with Gnome PPP and as you know by now, it works like a charm. People with kernels older than 2.6.20 can use huaweiAktBbo. Basically it's a
hack which will trick your system to handle the device as a modem instead of a usb storage. I cannot emphasize enough, that you do NOT need
it if your kernel is 2.6.20 or newer. Many tutorials will mention huaweiAktBbo and I was foolish enough to waste time on it... If your
kernel is new enough, and you still have a green light blinking instead of a blue light, you probably just forgot to remove the pin. At one point I was not sure if my sim card had been locked (due to too many trial/error attempts with the pin code). I found that minicom is a great tool for debugging in these cases:
If you did it correct, the message "Initializing modem" should appear shortly followed by this:
Welcome to minicom 2.2 If you got this far, the modem is working correctly. You can now type in AT commands, here's an example of asking whether or not the modem expects a PIN, PUK or both:
Welcome to minicom 2.2 In this example the answer is CPIN: READY indicating that the modem does not expect either PIN or PUK code at this moment. If instead the answer was CPIN: SIM PUK, the modem probably has been locked (it locks if the pin has been wrong or given too many times). Simply adding the PUK code with AT+CPIN=12345678 didn't work for me. I had to add both PUK and PIN to unlock the SIM card: AT+CPIN=12345678,1234 Press [CTRL]+[A] followed by [X] to leave minicom. This minicom mini-tutorial was inspired by this thread and these notes |
||||||