
I recently got myself a FONIC account for mobile Internet. This (German) prepaid-provider offers a "daily flatrate" for 2.50€ per day. After the 10th day of usage (i.e., 25€) you don't pay any more. This means, even if you need mobile Internet access 31 days a month, you only pay for 10 days. After 500MB/day or 5GB/month you're throttled down to GPRS speed (but you can still connect, and you don't pay more).
The FONIC account comes with the "FONIC Surf-Stick", a Huawei E1750 HSPA USB modem (apparently it supports GPRS, EDGE, UMTS, HSDPA (up to 7.2Mbit/s), HSUPA (up to 5.76 Mbit/s), and a SIM card.
In order to use the device on Linux you need two packages, usb_modeswitch and wvdial:
$ apt-get install usb-modeswitch wvdial
Recent versions of usb_modeswitch (and matching udev entries) already support the Huawei E1750 out of the box, a few seconds after attaching the device it's automatically switched into modem mode. After this has been done you should have three new serial devices, usually /dev/ttyUSB0, /dev/ttyUSB1, and /dev/ttyUSB2. You'll need /dev/ttyUSB0 for talking to the device using AT commands. The lsusb output should look like this (see here for full lsusb -vvv):
$ lsusb Bus 001 Device 045: ID 12d1:1436 Huawei Technologies Co., Ltd.
(before usb_modeswitch was run, the USB IDs were 12d1:1446)
The required settings for connecting are documented at fonic.de, specifically the APN (pinternet.interkom.de). A username and/or password is not required. You need to provide your FONIC PIN though. Dialing is done using the *99# number and using the ATDT command.
I'm using the following wvdial config file:
$ cat /etc/wvdial.conf [Dialer Defaults] Modem = /dev/ttyUSB0 Baud = 460800 [Dialer pin] Init1 = AT+CPIN=1234 [Dialer fonic] Phone = *99# Username = foo Password = foo Stupid Mode = 1 Dial Command = ATDT Init2 = ATZ Init3 = AT+CGDCONT=1,"IP","pinternet.interkom.de"
For mobile Internet access you would do the following:
$ wvdial pin --> WvDial: Internet dialer version 1.61 --> Initializing modem. --> Sending: AT+CPIN=1234 AT+CPIN=1234 OK --> Modem initialized. --> Configuration does not specify a valid phone number. --> Configuration does not specify a valid login name. --> Configuration does not specify a valid password.
$ wvdial fonic --> WvDial: Internet dialer version 1.61 --> Initializing modem. --> Sending: ATZ ATZ OK --> Sending: ATZ ATZ OK --> Sending: AT+CGDCONT=1,"IP","pinternet.interkom.de" AT+CGDCONT=1,"IP","pinternet.interkom.de" OK --> Modem initialized. --> Sending: ATDT*99# --> Waiting for carrier. ATDT*99# CONNECT --> Carrier detected. Starting PPP immediately. --> Starting pppd at Mon Aug 1 xx:xx:xx 2011 --> Pid of pppd: 18672 --> Using interface ppp0 --> local IP address xxx.xxx.xxx.xxx --> remote IP address yyy.yyy.yyy.yyy --> primary DNS address 193.189.244.225 --> secondary DNS address 193.189.244.206
If everything worked fine you should now have connected successfully.
There are other alternatives for achieving the same result, including umtsmon (Qt3 in the last release from 2009, looks a bit unmaintained), kppp, the GNOME NetworkManager, and others, but wvdial worked OK for me.
For more details about the Huawei E1750 device (e.g. lsusb -vvv and more photos), see my wiki page at
http://randomprojects.org/wiki/FONIC_Surf-Stick_Huawei_E1750
Update 2011-08-03: My measured download speed for a Debian ISO (over HTTP via wget, at night, roughly 22:00 o'clock) is 350-470 KB/s in case anyone is interested. During this download the blue LED on the stick was enabled, which denotes a UMTS connection (green == GPRS/EDGE, turquoise == HSDPA).
Comments
Kernel routing table and intefaces to get this to work
Thanks a lot Uwe,
finally the Telia E1750 modem is up on my Debian Squeeze/LXDE laptop (EEEPC 1000HE) and with usb-modeswith 1.2.3. (no configuration needed!)
To share my working configuration:
My 'wvdial.conf' (and I didn't need the PIN, since it is deactivated with the supplied Telia Windows dial-up utility), but the username/password is required. When playing with the PIN I had some difficulties with the wvdial.conf until I removed all whitespace like so 'Init1=AT+CPIN=XXXX'
[Dialer Defaults]
Modem=/dev/ttyUSB0
Baud=460800
[Dialer pin]
Init1=AT+CPIN=XXXX
[Dialer telia]
Phone=*99#
Username=**********
Password=**************
Stupid Mode=1
Dial Command=ATDT
Init2=ATZ
Init3=AT+CGDCONT=1,"IP","online.telia.se"
In my /etc/network/interfaces I addeed the ppp0 stanza:
# The primary PPP device
iface ppp0 inet wvdial
To ensure that the routing table default to the ppp0 and not the wired eth0 interface I wrote a small shell script in /usr/local/bin/
#
# Telia Mobile Broadband (Huawei E1750)
#
#!/bin/bash
echo "Insert the Telia Huawei E1750 modem and wait 5 seconds"
echo -n "Press Enter to continue..."
read
echo "Taking down eth0..."
ifdown eth0
echo "Bringing up ppp0..."
wvdial telia
Thus, the routing table should look like so (with some Destination address, after running the bash script:
root@eeepc:/etc/network# route -n
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
XX.XX.XX.XX 0.0.0.0 255.255.255.255 UH 0 0 0 ppp0
0.0.0.0 0.0.0.0 0.0.0.0 U 0 0 0 ppp0
Did you actually get 5.76
Did you actually get 5.76 Mbps with it?
NetworkManager is not useful with such devices
I've recently tested similar dongle (Alcatel X220L) in Bulgaria. From my experience and information over the net, I can say that NetworkManager is buggy and unable to find the correct serial device and establish the connection every time. Wvdial and the Sakis3G script just worked.