USB 3G Modem
pacman -S usbutils
and then examine the output of
which will show the vendor and product IDs of the device. Note that some devices will show two different product IDs at different times as explained below.
A useful utility for switching these devices into modem mode is usb_modeswitch, available in the AUR. Some devices are now supported in the USB serial kernel module called "option" (after the Option devices, but not limited to just those) and may be used without usb_modeswitch.
A configuration file /etc/usb_modeswitch.conf is supplied with the package. This contains entries for many devices, which are disabled by default. You need to find your device and uncomment the entry.
When a device is switched, its product ID may change to a different value. The vendor ID will remain unchanged. This can be seen in the output of lsusb.
pacman -S wvdial
Run (as root)
which will attempt to write /etc/wvdial.conf correctly. You will need to add the user, password and Access Point Name (APN). You can obtain these (i) from your network provider, (ii) from other users via published wvdial.confs, or (iii) by logging the USB tty traffic under another operating system (Sysinternals' Portmon).
A typical /etc/wvdial.conf looks like this:
[Dialer Defaults] Init1 = ATZ Init2 = ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0 Modem Type = Analog Modem ISDN = 0 Modem = /dev/ttyUSB2 Baud = 9600 [Dialer thenet] Phone = *99***1# Username = thenetuser Password = thenetpw Stupid Mode = 1 Baud = 460800 Init3 = AT+CGDCONT=1,"IP","apn.thenet.net" [Dialer mypin] Init4 = AT+CPIN=1234
Often there will be several devices (at /dev/ttyUSB0, /dev/ttyUSB1, /dev/ttyUSB2 for example). If in doubt about which to use, try each of them in turn. Once the configuration files are prepared, the internet connection is established with a simple script like this:
usbmodeswitch sleep 2 modprobe usbserial vendor=0xVVVV product=0xMMMM maxSize=4096 sleep 2 wvdial thenet
where VVVV is the hexadecimal vendor ID from lsusb, and MMMM is the hexadecimal product ID when in modem mode, and "thenet" is the name of the section in wvdial.conf which you wish to use. The maxSize option may or may not be necessary. It simplifies matters if you disable the SIM PIN, but if you require it, run "wvdial mypin" before "wvdial thenet".
The "Sakis3G" all-in-one connection script
The Sakis3G is a shell script containing all the necessary tools, including the latest usb_modeswith, allowing the user to easily connect to the internet with a 3G USB modem. It is very small in terms of size, plus it has few dependencies. You have to either install 9menu for menu driven connection and/or xosd for on screen display connection messages.
pacman -S wvdial ppp sharutils xosd cd /usr/local/bin wget "http://sakis.tel4u.gr/sakis3g/latest/sakis3g.gz" gunzip sakis3g.gz chmod +x sakis3g /usr/local/bin/sakis3g
Configuration can also be done directly to the script, if it is necessary:
Instructions on how to configure the script can be found here