Three Ireland USB Modem HOWTO
Three Ireland has recently unveiled a new HSDPA mobile broadband product. It
includes 10 gigabytes data transfer (note: received plus transmitted, not
just received!) for €20 per month. The modem is a Huawei E220, a nice little
white USB box that, unfortunately, has no external antenna attachment.
The quality is, in my experience, not as good as "conventional" broadband -
for example, a SIP VoIP service produced a latency of several seconds and
some disruptions. But it may be the fact that coverage is not perfect here...
Anyway, for some areas it can be the only real broadband option apart from
satellite - like where I live. And it's way better than dialup, and way
cheaper and probably better than satellite! Not to mention it being mobile.
The product will work within Three's 3G coverage only; Three has a map but
it's not really detailed enough. So the best option is probably to rely on
their 14 day return policy. Grab it and try it.
Preferrably, try it with the native Windows driver first - it shows the signal
strength, and under Linux this is not yet possible. Although you can possibly
see whether you're in coverage even on the modem itself - when trying to
connect (and sometimes even before that), it will flash blue if you are in 3G
coverage, but green if you are not. (But I don't know what it will do if it
is in Vodafone's 3G coverage but not in Three's!) . By the way, if you are in
coverage, and do see signal strength, but keep getting "Connection failed"
messages, see the note at the bottom.
OK, let's say it works in your area, and you want to use it under Linux. The
instructions here are for Debian; I think they will apply unchanged to Debian
derivatives including Ubuntu; in other distros file locaton and security may
vary. I am only using pppd, which should be present on all systems; wvdial is
not used.
First, we will need to set up DNS addresses. Unfortunately, the DNS servers
provided in the PPP protocol don't work right; I don't know how Three
provides correct DNS later but Linux does not catch it - so we'll just make
DNS static. For this, as root, edit /etc/resolv.conf; it should contain one
or more "nameserver" entries with DNS addresses. You may have a favourite DNS
of your own; or to use Three's ones, put the following in /etc/resolv.conf :
nameserver 172.31.140.69
nameserver 172.30.140.69
Next we create the configuration files for pppd.
In /etc/ppp/peers/provider :
user "user"
connect "/usr/sbin/chat -v -f /etc/chatscripts/pap -T *99#"
# Serial device to which the modem is connected.
/dev/ttyUSB0
# Speed of the serial line.
460800
# Assumes that your IP address is allocated dynamically by the ISP.
noipdefault
# Try to get the name server addresses from the ISP.
#usepeerdns
# Use this connection as the default route.
defaultroute
# Makes pppd "dial again" when the connection is lost.
persist
# Do not ask the remote to authenticate.
noauth
# pppd will detach from controlling terminal when connection is up
updetach
# no compression - ppp is used only until the modem
novj
novjccomp
nopcomp
nodeflate
# put in a default gateway even if one was present before
replacedefaultroute
# if connection has failed, redial in this number of seconds
# don't use too low - 3 seems to drive modem crazy
holdoff 5
In /etc/chatscripts/pap :
ABORT BUSY
ABORT VOICE
ABORT "NO CARRIER"
ABORT "NO DIALTONE"
ABORT "NO DIAL TONE"
"" ATZ
OK ATE0V1&D2&C1S0=0+IFC=2,2
OK AT+CGDCONT=1,"IP","3ireland.ie"
OK ATDT*99#
CONNECT ""
Now our pppd is ready.
To connect, we will need to attach the modem, and execute, as root:
modprobe usbserial vendor=0x12d1 product=0x1003
Note that we will need to do it on every new boot as well - after the modem is
attached. (Of course we can keep it attached permanently - but still execute
this command every boot). Also, the modem possibly does not work if unplugged
and then replugged within the same session (i.e. no reboot between). There
may be a way to fix this all but I have not yet discovered it; advice would
be most welcome!
After this, connecting is easy. Either as root, or as a user that is in
the "dip", execute this command:
pon
And watch the terminal. Once it reports your IP address, you are online! If it
reports "Timeout" something instead, either you are out of coverage (check
using the Windows driver) or you have hit APN problems - see note at the
bottom.
To get offline, either just shut down your system or type:
poff
NOTE: Three APN issues
Apparently Three has APN (Access Point Name) issues. At peak usage times, you
try connecting with good coverage and it just fails, In Windows, you
see "Connection failed"; in Linux, it's "Timeout" something.
The way around this is just to try and try again.Sooner or layer you get in.
But don't try *very* often; when I tried every 3 seconds the modem stopped
blikning its blue "coverage available" light.
In Windows, all you can do is click that button over and over again. In Linux,
pppd just redials automatically; but it's highly advisable to always run pppd
("pon") in a terminal window, so you can see what's going on in teh
redialling process.
I hope somebody will persuade Three to fix this. Tech support was not helpful
for me - they just blame bad coverage in my area, but probably they are
wrong.
Related: Connection Scripts Setting up a modem in Linux Setting up a ppp internet connection
About the author, Mikhail Ramendik.
USERS COMMENTS
I'm happy to announce that it IS possible to see the RSSI
(signal strength) in Linux. I just published it.
http://oozie.fm.interia.pl/pro/huawei-e220/
Package name is he220stat.tar.bz2
Have a lot of phun!
I wrote twice before to thank Michael for his advice. But the problem with Huawei is that there is latency. I didn't know I was online when I vented my frustration.
Michael mentioned the lack of an aerial in the Huawei device and I found it useful to get a couple of USB extensions. It works.
I was going to say something about low watt desktops but I've had enough already.
Donal
I used this HOWTO to configure my Nokia N95 phone as a USB HSPDA modem for my Ubuntu system (Gutsy). Basically everything was the same, I don't have to load any modules though and the phone it recognised as /dev/ttyACM0. Works great, thanks for the info.
As an different solution, possibly an easier way, for this problem i would suggest editing the wvdial config file and using wvdial to make the connection. i took my lead from this ubuntu post http://ubuntuforums.org/showpost.php?p=1772796&postcount=8 and am currently using an edited wvdial.conf that looks like this:
----------------
start
----------------
# wvdial for Vodacom Data. Created by Tazz_tux
# Version 1.0
# Change Log:
#
# Added support for HSDPA.
# Added Headers and version control.
# Added trial settings for 3ireland.ie
[Dialer Defaults]
Phone = *99#
Username = 3ireland
Password = 3ireland
Stupid Mode = 1
Dial Command = ATDT
[Dialer hsdpa]
Modem = /dev/ttyUSB0
Baud = 460800
Init2 = ATZ
Init3 = ATE0 V1 &D2 &C1 S0=0 +IFC=2,2
ISDN = 0
Modem Type = Analog Modem
Init5 = AT+CGDCONT=1,"IP","3ireland.ie"
------------------
end
------------------
ps. hope this posted ok
edit - it did after adding break tags
I had some trouble getting the O2 broadband modem to work on my Ubuntu installation, I found many links including this one but could not get it to work.
I found this article:
http://www.tectonic.co.za/view.php?src=rss&id=1596
and this application great.
https://forge.vodafonebetavine.net/projects/vodafonemobilec
It is for Vodafone but I changed the DNS address and it works great for O2. After installing the Vodafone application I plugged in the modem but the application did not recognise the modem, after a restart it was fine.
Hope this helps
Before you undertake a contract with Three you may want to have a look at the follwing thread
http://www.boards.ie/vbulletin/showthread.php?t=2055115306
I am grateful to Michael for his method. I use SimplyMEPIS 64 and have found that I do not need to give the command:
modprobe usbserial vendor=0x12d1 product=0x1003
I simply su (sudo to you) and then pon.
I have some difficulty with Debian 4 though.
Donal
Hi I have a vodafone account and have installed debian 4.0 etch and I seem to have a different file structure than what is above and could not find the files mentioned. If any one can help me get rid of ms because the only reason I use it is to get on line.
Thanks in advance.
Just for the record, using simplyMEPIS 64 I added the modprobe and pon commands to /etc/rc.local as in:
#!/bin/sh -e
#
# rc.local
#
# if macpro and snd not configured
if [ `hal-get-property --udi /org/freedesktop/Hal/devices/computer --key system.product | grep -c 'MacPro'` = "1" ]; then
if [ `grep -c 'macpro' /etc/modprobe.d/snd-hda-intel` = "0" ]; then
sed -i "s/model=.*/model=macpro/g" /etc/modprobe.d/snd-hda-intel
rmmod snd-hda-intel >/dev/null 2>&1
modprobe snd-hda-intel >/dev/null 2>&1
fi
fi
modprobe usbserial vendor=0x12d1 product=0x1003
pon
# make sure splashy stops
service splashy-init stop || true
service splashy-init stop || true
exit 0
The 3ireland is connected automatically when the system is booted. No problems so far.
Your system may have /etc/rc.d instead of /etc/rc.local.
Well, I'm happy with it.
Thanks for the ppp and connection stuff for this 3G modem thing. Trying to get the internet up and running through Xubuntu. Run pon as root after configuring according to above post. the modem light goes to blue like when its connected in windows and mac but cant get to internet in firefox or to get apps from repository. Any suggestions? much appreciated.
tim@tim-laptop:~$ modprobe usbserial vendor=0×12d1 product=0×1003
tim@tim-laptop:~$ pon
Serial connection established.
Using interface ppp0
Connect: ppp0 <--> /dev/ttyUSB0
PAP authentication succeeded
Could not determine remote IP address: defaulting to 10.64.64.64
Cannot determine ethernet address for proxy ARP
local IP address 10.206.155.11
remote IP address 10.64.64.64
primary DNS address 10.11.12.13
secondary DNS address 10.11.12.14
You need to change your dns servers after you connect,
edit /etc/resolv.conf and put back in
nameserver 172.31.140.69
nameserver 172.30.140.69
I have tried both methods suggested here but find that my three modem is not creating /dev/ttyUSB0 so when I run 'pon' I get "In file /etc/ppp/peers/provider: unrecognized option '/dev/ttyUSB0'"
and something similar when I try wvdial
The modem does mount as a cd but if I unmount and unplug and then re-insert the modem is just mounts as a cd again without creating /dev/ttyUSB0
I was able to replug and continue using my modem by doing the following as root:
(unplug the modem)
modprobe -r option
modprobe -r usbserial
(replug the modem)
modprobe usbserial
modprobe option
I don't know what the option module is, but it depends on usbserial, so I can't remove usbserial while option is loaded.
I never had to specify the vendor and product ids when inserting the module. I'm not entirely sure why, but I do remember reading something once about associating them with a specific driver in some file. If any actually useful memories surface, I'll be back to let you know :)
Hi, quick note!
Most of this works if you have a handset with a a built in modem, the Nokia E51 (6280 should work too) via a (EDR) bluetooth dongle/usb connectioin will give you a pretty good connection. O2 have informed me that 1.0Mb is about as good as you are going to get with their 3g network.
Try sdptool search DUN to check if you have a modem built into your handset.
Hi I have the same problem than John Murphy. Does anybody have a solution?
Note /dev/ttyUSB0 was created out of the box, when I plugged into my fedora 8 laptop. However with an acer aspire one
sub-notebook (which has a fedora 8 derived distro) I was getting:
"error -71" in `dmesg`.
I installed the patch from here to fix:
https://bugs.launchpad.net/ubuntu/+source/linux-source-2.6.20/+bug/105545/comments/25
Hey Padraig, how did you install that patch?
Did you use alien?
Thx
Hi,
I changed from the e51 modem to a Huawei E270 - All was trivial, except that I kept getting "Voice Line Detected Trying Again". I popped the sim into my handset, disabled the pin request and i was set. Could send it to the modem for better security.
|