How to get online with Three Mobile (UK) and Linux (Ubuntu)
Thursday, January 31st, 2008Three Mobile have recently started offering mobile broadbands a deal from £10 a month. I signed up to their plan, but soon realised that it was quite tricky to get the connection working in linux.
The modem used is marked “ZTE MF622″. The usb ID is 19d2:0001 , the Manufacturer field is “Qualcomm, Incorporated”, and the product field is “ZTE CDMA Technologies MSM”.
The first challenge is to get the device recognised as a modem. When it’s first plugged in it presents itself as a mass storage device (presumably for updating firmware, or holding drivers or dialling settings). To get around this, an update to the udev rules is needed (thanks to UfSoft for this part!) .
I added a new file into /etc/udev/rules.d/ called 25-zte-mf622.rules . The contents are:
ACTION!="add", GOTO="ZTE_End"# Is this the ZeroCD device?
SUBSYSTEM=="usb", SYSFS{idProduct}=="2000",
SYSFS{idVendor}=="19d2", GOTO="ZTE_ZeroCD"
# Is this the actual modem?
SUBSYSTEM=="usb", SYSFS{idProduct}=="0001",
SYSFS{idVendor}=="19d2", GOTO="ZTE_Modem"
LABEL="ZTE_ZeroCD"
# This is the ZeroCD part of the card, remove
# the usb_storage kernel module so
# it does not get treated like a storage device
RUN+="/sbin/rmmod usb_storage"
LABEL="ZTE_Modem"
# This is the Modem part of the card, let's
# load usbserial with the correct vendor
# and product ID's so we get our usb serial devices
RUN+="/sbin/modprobe usbserial vendor=0x19d2 product=0x0001",
# Make users belonging to the dialout group
# able to use the usb serial devices.
MODE="660", GROUP="dialout"
LABEL="ZTE_End"
The next challenge is using the modem to connect to the internet.
Create a file called /etc/ppp/peers/three, and include:
/dev/ttyUSB0 nobsdcomp novj nodeflate ipcp-accept-local ipcp-no-address ipcp-no-addresses ipcp-max-configure 20 user guest password guest crtscts modem noipdefault replacedefaultroute defaultroute lock noauth connect '/usr/sbin/chat -f /etc/ppp/peers/three.chat' ipcp-restart 8 ipcp-max-configure 50 ipcp-accept-local ipcp-accept-remote usepeerdns
Now edit /etc/ppp/peers/three.chat
ABORT BUSY ABORT 'NO CARRIER' ABORT VOICE ABORT "NO DIALTONE" "" ATZ OK AT+CGDCONT=1,"IP","three.co.uk" OK ATDT*99***1# 'CONNECT' '\c' 'TIMEOUT' '20'
All being well, you can now connect using “pppd call three”, and disconnect with “killall pppd”