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.
Often these devices will have two modes (1) USB flash memory storage (2) USB Modem. The first mode, sometimes known as ZeroCD, is often used to deliver an internet communications program for another operating system and is generally of no interest to Linux users. Additionally some have a slot into which the user can insert an additional flash memory card.
A useful utility for switching these devices into modem mode is usb_modeswitch, available in
pacman -S usb_modeswitch
Udev rules are supplied with the package in Template:Filename. This contains entries for many devices, which it will switch to modem mode upon insertion.
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
Udev itself included a utility called Template:Filename. In udev 157 this was renamed to Template:Filename and morphed into a tool that only switches Mobile Action cables. For other devices use
After installing usbutils and usb_modeswitch you just need to install modemmanager to make the modem work with NetworkManager:
# pacman -S modemmanager
After you restart the NetworkManager-applet and plug the modem in again NetworkManager should recognize the modem in the menu without further configuration. Setting up the modem in NetworkManager is self-explanatory, you should only need the login-information provided by your network provider.
- See main article: wvdial
# pacman -S wvdial
The configuration file /etc/wvdial.conf will in general depend on (a) which device you have (b) which mobile network you are connecting to. A single wvdial.conf file can be defined with named sections to be usable with several USB modems and networks, should you need them.
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 or use /dev/gsmmodem (a link set up by usb_modeswitch) which should point to the correct one. Once the configuration files are prepared, the internet connection is established by running
$ wvdial <section>
If necessary additional setup commands can be placed 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".
Low connection speed
Someone claims that the connection speed under linux is lower than Windows. https://bbs.archlinux.org/viewtopic.php?id=111513
A short summary for possible solutions which are not fully verified. In most of conditions, the low speed is caused by bad receiver signals and too many people in cell. But you still could use the following method to try to improve the connection speed.
AT+CGEQMIN and AT+CGEQREQ command could used to set the Qos command. And also it should be possible to used to decrease and limit the connect speed. Add the following Init command in wvdial.conf.
Init6 = AT+CGEQMIN=1,4,64,640,64,640 Init7 = AT+CGEQREQ=1,4,64,640,64,640
Baud parameter in wvdial.conf could be used to increase the connection speed.
Baud = 460800
But the official Huawei E261 windows application set the Baud=9600 under Windows Vista. More verifications are needed to double check this point.
This was tested on a Huawei EM770W (GTM382E) 3g card integrated into an Acer Aspire AS3810TG laptop.
$ pacman -Sy gnokii $ mkdir -p $XDG_CONFIG_HOME/gnokii
$ cp /etc/gnokiirc ~/.config/gnokii/config
edit ~/.config/gnokii/config as follows:
port = /dev/ttyUSB0
You may have to use a different port depending on your config, i.e. /dev/ttyUSB1 or something else.
model = AT connection = serial
You need to be part of the uucp group to use /dev/ttyUSB0, for example if your user is called "x" and assuming you have sudo rights:
$ sudo gpasswd -a x uucp $ newgrp uucp
The newgrp command allows you to take advantage of the new group assignment immediately without having to logout/login.
Then launch gnokii:
Click on the "SMS" icon button, a window opens up. Then click: "messages->activate sms reading". Your messages will show up in the window.
command line script
A small command line script using gnokii to read SMS on your SIM card (not phone memory) without having to start a GUI:
$ gnokii --getsms SM 0 end 2>&1|grep Text -A1 -B3|grep -v Text
What it does:
gnokii # invoke gnokii --getsms SM 0 end # read SMS from SM-memory location (=SIM card) starting at 0 and reading all occupied memory locations ("end") 2>&1 # connect STDERR to STDOUT to make sure the output from the --getsms command can be piped to grep |grep Text # pipe output from gnokii to grep, anchoring at output containing "Text" -A1 -B3 # print one line after the matched pattern and three lines before the matched pattern |grep -v Text # grep result to another grep to exclude the "Text" line (-v for inverting the pattern)