This HOWTO explains how you can make Vodafone’s 3G Datacard work with a Linux laptop. It is based on experiences with the card and the experiences of others.
[Note: 2005/2006 Vodafone now also ship Option Fusion, Fusion+, 3G, 3G/EDGE and HSDPA cards USB modems under the same product name of Vodafone 3G. This Howto only deals with the original Vodafone 3G card. The serial numbers of the original cards start with CL . You can see also 3G modem
For some background and a different perspective see this site http://www.kuix.de/umts/vodafone/
- For simplicity I refer to the Vodafone 3G Datacard as the V3G.
- For clarity all commands typed at a command terminal are indicated like this : Some_command with parameters
- Modem AT commands are indicated like this in text or this: AT
If the V3G is installed correctly on your Linux system you will have three USB serial ports. Only two ports (#0 and #2) can be used.
The advantage of having two ports is that you can have your ppp link on one port and do GSM commands on the other port. For example, you can monitor the data connection, check GSM registration and send SMS without breaking the ppp data link.
Because the V3G card uses USB serial ports we can use the standard Linux USB serial drivers.
The V3G is a Cardbus compliant data card and so is designed to work at 3.3 Volts
Option GlobeTrotter (GPRS/GSM): GlobeTrotter HOWTO
- Vodafone 3G Datacard (UMTS/GPRS/GSM): Vodafone 3G HOWTO
Option GlobeTrotter Fusion (WiFi 802.11g, UMTS/GPRS/GSM) Fusion HOWTO
All of the system configuration tasks must be done as root
Make sure you PCMCIA interface is working.
When you plug in the card you should hear one beep. You will see that cardctl does not tell you very much:
linux:~ # cardctl status Socket 0: 3.3V CardBus card function 0: [ready] Socket 1: no card linux:~ # cardctl config Socket 0: Vcc 3.3V Vpp1 3.3V Vpp2 3.3V interface type is "cardbus" irq 11 [exclusive] [level] function 0: Socket 1: not configured
but it does confirm that PCMCIA is working.
If you are having problems you can read my GPRS HOWTO for some PCMCIA tips but also check out the following:
Laptops - http://www.linux-laptop.net/
If USB support is enabled on your system, the V3G card will be recognised immediately by Linux. If it is not recognised then your kernel may be too old or it has not been compiled with USB support.
If you look at the system log you will see the last few lines will say something like this:
cs: cb_alloc(bus 2): vendor 0x1045, device 0xc861 PCI: Enabling device 02:00.0 (0000 -> 0002) PCI: Setting latency timer of device 02:00.0 to 64 usb-ohci.c: USB OHCI at membase 0xc90e7000, IRQ 11 usb-ohci.c: usb-02:00.0, PCI device 1045:c861 usb.c: new USB bus registered, assigned bus number 2 hub.c: USB hub found hub.c: 2 ports detected hub.c: new USB device 02:00.0-1, assigned address 2 usb.c: USB device 2 (vend/prod 0xaf0/0x5000) is not claimed by any active driver
The last line tells you the information we need. We must configure USB so that it recognises the V3G product/vendor codes and correctly assigns the USB serial module to it.
If your system did not report the “vend/prod” in the log it is probably because you have a 2.6 kernel. In this situation you can confirm the same information with the command:
If things are working you should see two lines in the listing:
P: Vendor=0af0 ProdID=5000 Rev= 0.00 S: Manufacturer=Vodafone
The key information is the Vendor and Product ID which will be used to identify the card and load the drivers.
Note: It takes time for the card to power up completely when it is plugged in. This means it can take several seconds before the system log is updated.
We want to make changes so that the card is correctly configured when the laptop boots or when the card is inserted. One way to do this is by modifying:
This file is read by the system to decide what modules are loaded at boot time and when devices are detected (such as USB devices).
The following are the lines I needed to add:
# # please add local extensions to this file # options usbserial vendor=0xaf0 product=0x5000 post-install usbcore modprobe usbserial
The first line tells the system that if it detects a device with vendor ID =0xaf0 and product ID =0x5000 it should use the usbserial module to communicate.
The second line works on my system – it may not be required by yours. This line is a directive that says that when basic USB services are running the system should force-load the usbserial module. It is this line that makes the system correctly detect the V3G at boot time.
Note: Your system may only have /etc/modules.conf. In this case you can add the lines to the end of that file instead.
The changes for a 2.6 kernel are very similar:
The file you need to edit will be called
The following are the lines I needed to add:
# # please add local extensions to this file # options usbserial vendor=0xaf0 product=0x5000
Note: Your system may only have /etc/modprobe.conf. In this case you can add the lines to the end of that file instead
Once the changes are made you must reboot the system. If you plug in the V3G card you will find messages similar to these in your system log:
cs: cb_alloc(bus 2): vendor 0x1045, device 0xc861 PCI: Enabling device 02:00.0 (0000 -> 0002) PCI: Setting latency timer of device 02:00.0 to 64 usb-ohci.c: USB OHCI at membase 0xc90e7000, IRQ 11 usb-ohci.c: usb-02:00.0, PCI device 1045:c861 usb.c: new USB bus registered, assigned bus number 2 hub.c: USB hub found hub.c: 2 ports detected hub.c: new USB device 02:00.0-1, assigned address 2 usbserial.c: Generic converter detected usbserial.c: Generic converter now attached to ttyUSB0 (or usb/tts/0 for devfs) usbserial.c: Generic converter detected usbserial.c: Generic converter now attached to ttyUSB1 (or usb/tts/1 for devfs) usbserial.c: Generic converter detected usbserial.c: Generic converter now attached to ttyUSB2 (or usb/tts/2 for devfs)
As you can see usbserial.c has been loaded and has assigned devices to each of the three ports.
Note: The actual device assignments (e.g. /dev/ttyUSB0) may be different if you have other USB serial devices installed..
Note: Because Linux has to load several drivers it will take several seconds after inserting the card before the system reports all the USB ports.
You should check the devices actually exist in the file system:
linux:~ # ls /dev/ttyUSB* /dev/ttyUSB0 /dev/ttyUSB1 /dev/ttyUSB2 linux:~ #
Normally the above entries exist. If they don’t then you can add them:
# mknod /dev/ttyUSB0 c 188 0 # mknod /dev/ttyUSB1 c 188 1 # mknod /dev/ttyUSB2 c 188 2
If you did this then you will need to re-insert the V3G to get everything working.
**Remember - After making the changes you will need to reboot your system.**
How to use the serial ports
/dev/ttyUSB0 should be used for your ppp data connections.
/dev/ttyUSB2 is the device to use for GSM related tasks such as SMS and network checks.
Note: /dev/ttyUSB1 is not used at all.
If you try and use /dev/ttyUSB2 for a data connection you will not get an error message but the ppp link will actually be created on /dev/ttyUSB0.
Configuring PPPD and Internet utilities
You may find the connections scripts in my GPRS HOWTO useful, just remember to change the device name, data rates and pppd options as described in this document.
Make such that compression is not used on the ppp link. This means using the novj and nobsdcomp pppd options. If you have not configured pppd correctly then it will not be able to negotiate the ppp link to the card.
If you create a link between /dev/modem and /dev/ttyUSB0 then all the standard internet connection utilities – chat, wvdial, kinternet and kppp for example can be used to make the ppp link. If you want to keep /dev/modem for the traditional land-line (POTS) modem you can use alternative assignments such as:
/dev/usb/ttyACM0 which is not used by my system (SusSE 8.2) but is listed as a possible device by kppp. In which case:
ln -s /dev/ttyUSB0 /dev/usb/ttyACM0
creates the logical soft link.
The connection speed should be set as high as possible above 384 kbs. Try 460800.
APNs, user names and passwords
The correct APN, username and password for your SIM provider must be used or the connection will not work. If the SIM provider cannot tell you what they are (it is often posted in the technical sections of their web-sites) you can usually do a successful internet search. Vodafone APNs.
The V3G uses the standard ETSI AT command sets. (You can refer to my GPRS HOWTO for some of the more useful ones).
There are some modifications just for the V3G:
Will return an additional value:
+COPS: 0,0,”Vodafone UK”,0
The digit at the end shows if the card is registered on a GPRS or a UMTS network. (0 == GPRS, 2 == UMTS).
There is a very useful command that changes the way the V3G card behaves:
Where n is a value between 0 and 5
AT_OPSYS=0 #Only connect to GSM networks AT_OPSYS=1 #Only connect to UMTS networks AT_OPSYS=2 #If you have a choice - GPRS first AT_OPSYS=3 #If you have a choice – UMTS first AT_OPSYS=4 #Which ever network you connect to stay with it. AT_OPSYS=5 #Automatic – let V3G decide
Sometimes this command will make the connection more reliable. This is true if you are working in a fringe coverage area (like me).
The V3G has been tested by me and found to work with several versions of Linux:
- SUSE 8.0, 8.2,9.0,9.1
- Sun’s Java Desktop - JDS 1 and 2
- Redhat 9 and Fedora Core 2
Here I found a windows utility which turn off (And Turn On -not tested this one as I don't need it enabled-) the ZeroCd of my Option Globesurfer Icon 7.2. Now it is detected only as a usb modem. Thanks to the person/people who has made this utility. It helped me a lot.ZeroCdTool
Thank you to all who have provided feedback, in particular; P. McGrath and E. Batsis for their helpful comments