Notes on Huawei E220 and mobile connections

Posted on . Updated on .

I’d like to start this post with an apology for not writing anything for several months. My job and other issues have kept me busy and I didn’t find a good moment to write a long post about something interesting.

As I have written in the past, I live in a place with very unusual circumstances from the telecommunications point of view, for several reasons. I can’t get DSL or cable here, and we’re almost in 2009, and the only proper way to get Internet access until some months ago has been a dial-up connection.

You may remember some time ago I became interested in the possibility of getting mobile internet access using a 3G modem. At that moment I went to a Vodafone shop, which was the only available option, and asked if I had 3G coverage in my area, and a nice lady told me it wasn’t available instead of convincing me into signing the contract and pay.

Fortunately for me, due to my job I had the possibility of testing one of those Vodafone modems by myself and see if it worked or not, and it turned out it worked. I tested both the Huawei E220 modem as well as the Huawei E172 modem. Both worked without any problems and gave me good connection speeds, at least compared to the dial-up connection I had been using! Knowing Vodafone worked, I studied other providers, and eventually settled with Orange if only because, for the same price as the other major operators here in Spain, the traffic limit is 5GB per month instead of 1GB, which is what most other providers are offering. I’m close to finishing my second month with them and I can tell you last month I downloaded about 2GB of data, so the choice has been mostly correct and my prediction that 1GB wouldn’t be enough became true.

Prices and connection quality

However, I’d like to share my opinion and observations now that I’ve been using it for two months. The first thing I’d like to share is that the prices are steep with most providers. You end up paying 45 euros a month for a connection that usually gives you around 1.x Mbps instead of the advertised 3.6 or 7.2 Mbps, and on top of that you are limited to 5GB a month. Compared to a DSL connection it’s very expensive, even if you can carry your connection around with you.

In my own experience with Orange (this may not apply to other providers or even areas of the country), connection quality varies a lot depending on the time of the day. Many times I start my connection at 20:00 or 21:00 and it works without any problems. However, from Monday to Friday and without moving the modem or touching it or doing anything special, the connection degrades a lot when it’s between 23:00 to 00:00, probably because at that moment many people connect to the Internet using the service. I know several people who, after a busy day, connect for some minutes at 23:00 to check their email and browse the web a bit before going to bed. That would explain why the service quality drops at that time, so I avoid downloading large files in those hours. The same happens during weekends as lunch time approaches. Early in the morning the connection is fine. Yes, this is a shame and upsetting, but I’d like to remind you that I need more than 1 GB and there’s no other method to get broadband here, so I’m stuck.

I also noticed in some cases, and mine in particular, the exact position of the modem and its orientation make a lot of difference in the link quality. Unfortunately, these modems are usually distributed with one very short USB-to-miniUSB cable or even no cable at all in the case of modem E172. That makes it very difficult to play with it to achieve gains. That’s why I bought a USB extension cable 3 meters long and, with a little bit of do-it-yourself, I managed to put the modem always in a high position close to a window. With these, I usually get four or five signal bars (out of five) instead of one or two if I put the modem on the floor next to the computer.

I took a picture of the final result. I used a long and extensible pole (2 meters of height), stuck a cube of cork on top, and used adhesive tape to attach the modem to it. Cheap and ugly, but it works wonders. Thank you very much to the guy who game me that advice. The extension cable cost me about 3 euros and if you have link quality problem it’s probably worh trying. With adhesive tape you can stick it to the window crystal temporarily and test if it improves your signal before using other more aggressive methods.

3G modem

Linux

The modem works flawlessly in Linux, as it has been widely reported around the web. It’s true that many of these modems work better with the PIN disabled. I had no problem with the PIN set and modem E220, but modem E172 works better without it. With the PIN enabled, it only established a connection once every several attempts. My personal advice is, then, to disable the PIN to make sure it works if you don’t mind. Take into account you should then make sure your modem is not stolen or anyone could use it for free.

It can be configured to work with wvdial, kppp and many other dialing tools. I set it up using bare pppd and sample scripts I found on the web. For most of these modems, the scripts are all the same and you only need to change the username and password, which vary from provider to provider and are usually the provider name (in my case, orange/orange), and the so-called "Internet APN", which varies from provider to provider too. In my case and some others, it’s "internet", but in Vodafone Spain it’s "ac.vodafone.es", for example. You’ll have to find out with a web search.

As an example, I’m going to post my two pppd files.

/etc/ppp/peers/3gmodem:

/dev/ttyUSB0
460800
crtscts
modem
noauth
#usepeerdns
defaultroute
noipdefault
debug
#noccp
#nobsdcomp
#novj
#mtu 500
user "orange"
password "orange"
connect '/usr/sbin/chat -f /etc/ppp/chat-3gmodem'

/etc/ppp/chat-3gmodem:

ABORT BUSY
ABORT ERROR
ABORT 'NO CARRIER'
REPORT CONNECT
TIMEOUT 10
"" "ATZ"
OK AT+CGDCONT=1,"ip","internet"
OK "ATE1V1&D2&C1S0=0+IFC=2,2"
OK "AT+IPR=115200"
OK "ATE1"
TIMEOUT 60
"" "ATD*99***1#"
CONNECT \c

I would then connect calling pppd call 3gmodem nodetach as root, or maybe set up a loop to make it redial when the connection is lost.

Load comments