GNU/Linux and 3G HSDPA USB Modems
Despite what you may have been told by the stores, they just work!
Huawei 3G USB Modems such as the K3565 (sold by Vodafone, at least)
and appearing in lsusb as 12d1:1003; the Huawei E220 and
many more just appear as ordinary USB Serial devices.
The Linux Kernel typically likes to be told this information, but
if it doesn't know, then you can use udev event triggers to fool
things, like this:
Create a file /etc/udev/rules.d/99-huawei.rules with the following
contents, substituting the USB device info (lsusb) if appropriate:
##
#
# udev rule for HUAWEI E220 3G HSDPA Modem
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# (c)opyleft OOZIE < oozie@poczta.fm >
#
# This file prevents the pseudo scsi cdrom device from enabling,
# thus providing a workaround for kernel versions < 2.6.20
#
##
SUBSYSTEM=="block", \
ACTION=="add", \
SYSFS{idVendor}=="12d1", \
SYSFS{idProduct}=="1003", \
IMPORT{program}="huawei-mobile.sh", \
OPTIONS="ignore_device"
Create a second file /lib/udev/huawei-mobile.sh:
#!/bin/bash
#
# (c)opyleft 2007 by 00ZIE
#
# This software gives you no warranty whatsoever, you can copy and modify
# it under terms and conditions of GPLv2 or later available at
#
# http://www.gnu.org/licences/gpl.txt
#
# This is the executable part of the workaround udev-rule for
# HUAWEI 220 modem on kernels prior to 2.6.20
#
# The latest version of this script and many more can be found there:
# http://oozie.fm.interia.pl/pro/huawei-e220/
#
####
export LOG=/dev/null
#
# If you experiece a wierd problem and want to contribute
# please change the value of $LOG variable to /tmp/huawei.log
# or so and send the file to me. Thanks!
#
export CONFIGFILE=/root/.huawei-config
#
# the $CONFIGFILE variable is created to give a possibility
# of executing arbitrary commands just after the device is
# enabled. (e.g. wvdial --config /etc/wvdial-3ireland.conf)
#
(
uname -a
/sbin/modprobe usbserial vendor=0x12d1 product=0x1003
test -e $CONFIGFILE && ( . $CONFIGFILE ) &
#
# If found $CONFIGFILE will be executed in the background,
# otherwise it could possibly slow down execution of other
# udev rules.
#
) 2>&1 >> $LOG
...actually, you could just do the /sbin/modprobe line if you really
wanted to. Again, check the vendor and product ID.
Next, to get actual "dialup", you should find out the APN, and create a
wvdial.conf such as this:
# wvdial for Vodacom Data. Created by Tazz_tux
# Version 1.0
# Change Log:
#
# Added support for HSDPA.
# Added Headers and version control.
[Dialer hsdpa]
Phone = *99***1#
Username = web
Password = web
Stupid Mode = 1
Dial Command = ATDT
Modem = /dev/ttyUSB0
Baud = 460800
Init2 = ATZ
Init3 = ATE0V1&D2&C1S0=0+IFC=2,2
ISDN = 0
Modem Type = Analog Modem
Init5 = AT+CGDCONT=1,"IP","pp.internet";
where the APN in the case of Vodafone 3G PAYG is "pp.internet" and
the username and password are both "web". I found these after some
random searches for "3G APN", but I believe that they were listed
as GPRS settings as well (which the USB 3G modems all support as well).
Then all you need do is type "wvdial hsdpa", making sure that the user
is in the "dialout" group, and checking that /dev/ttyUSB0 has been created
in the group "dialout". Debian GNU/Linux has some fancy rules somewhere
on USB Serial devices that automatically results in duh USB Serial devices
being in group "dialout".
If you want to use a "GUI" then look on Betavine, there is some great
software there that was created for netbooks - sadly specifically for
Ubuntu and even more sadly, specifically for Gnome desktops, despite it
saying "only needs GTK". There are various dependencies that can be
removed with judicious hacking, and I've notified the developers so stuff
should get updated. xfce4-notify-daemon can be used instead of
gnome for example - it's a bit of a mess if you dislike Gnome, but
should work. Auto-detection of the type of modem; presentation of the
choices of APNs etc. etc. all worked great.
So basically, if ever you get told by a shop that GNU/Linux does not
support 3G modems, they are talking crap: refer them to me. It is
however assumed that you have a brain, can do Internet Searches, and
are not afraid to install either random bits of software or to create
a few files on your system. Allocate yourself a couple of hours to
experiment and get over any trepidation you might feel; ask around if
you're not sure, but there's nothing in the world stopping you from
using Free Software Operating Systems to get connected to the Internet,
from anywhere that you can get a 3G signal!