Vodafone UMTS Datacard
Uit DeVliegendeWiki
Some years ago, I started using a Vodafone 3G UMTS Datacard that I am usually very happy with. Recently, I installed Linux on my laptop, and getting this datacard to work, might be on of the last things stending between me and completely abandoning Windows. According to http://www.vodafone.nl/zakelijk/mobiel_werken_met_notebook/mobile_connect_datacard/support/, there is no offical support for Linux. Fortunately, some people have gone before me on getting this card to work under Linux.
At the time of this writing (April 2008), I am still rather new to Linux. That makes this task even better, for giving me the opportunity to lear some ins and outs of Linux along the way. I write this how-to mainly because I once picked up that about the best way to learn something, is by reproducing that knowledge.
It seems that we need a two-stage approach:
- Communicate with the datacard
- Set up a PPP
Inhoud |
Resources
- http://www.kuix.de/umts/vodafone/ (March 2004, how-to about getting the card to work)
- http://www.pharscape.org/index.php?option=content&task=view&id=28 (February 2006, how-to about getting the card to work)
- http://www.net42.co.uk/os/linux/tmobile_datacard.html (January 2007, another how-to. This one uses the Nozomi drivers).
My system
- Computer: Dell Latitude, 1 GHz Pentium 3, 512 MB memory
- OS: Ubuntu 8.04, freshly installed (dual boot, next to XP). Kernel: 2.6.24-16-generic
- UMTS Datacard: Vodafone, Globetrotter HSDPA, appearantly developed by the Belgian company Option
Identifying the device
As suggested by http://www.kuix.de/umts/vodafone/, I inserted the datacard only after booting Ubuntu. By removing and again inserting it, I could identify the part of /var/log/message, related to this card:
PCCARD: CardBus card inserted into slot 1 nozomi: 0000:07:00.0 Card type is: 2048 PCI: Enabling device 0000:07:00,0 [A] -> link [LINK] -> GSI 11 (level, low) -> IRQ 11 nozomi 0000:07:00.0: Nozomi driver nozomi_tty nozomi 0000:07:00.0: Version of card: 3 nozomi 0000:07:00.0: Initialization OK!
According to http://www.pharscape.org/index.php?option=content&task=view&id=28, the datacard should show up as three different USB devices, of which you can use two. This seems a bit similar to the situation with ISDN, with two data channels and a control channel.
I installed the utility cardctl through sudo apt-get install pcmcia-cs. Afterwards, entering the command cardctl status gave:
Socket 0: 3.3V CardBus card function 0: [ready] Socket 1: 3.3V CardBus card function 0: [ready]
The command cardctl config resulted in:
Socket 0: Vcc 3.3V Vpp1 3.3V Vpp2 3.3V interface type is "cardbus" irq 11 [exclusive [level] function 0: Socket 1: Vcc 3.3V Vpp1 3.3V Vpp2 3.3V interface type is "cardbus" irq qq [exclusive] [level] function 0:
The command lspci resulted in:
00:00.0 Host bridge: Intel Corporation 82830 830 Chipset Host Bridge (rev 04) 00:01.0 PCI bridge: Intel Corporation 82830 830 Chipset AGP Bridge (rev 04) 00:1d.0 USB Controller: Intel Corporation 82801CA/CAM USB Controller #1 (rev 02) 00:1e.0 PCI bridge: Intel Corporation 82801 Mobile PCI Bridge (rev 42) 00:1f.0 ISA bridge: Intel Corporation 82801CAM ISA Bridge (LPC) (rev 02) 00:1f.1 IDE interface: Intel Corporation 82801CAM IDE U100 Controller (rev 02) 00:1f.5 Multimedia audio controller: Intel Corporation 82801CA/CAM AC'97 Audio Controller (rev 02) 00:1f.6 Modem: Intel Corporation 82801CA/CAM AC'97 Modem Controller (rev 02) 01:00.0 VGA compatible controller: ATI Technologies Inc Radeon Mobility M6 LY 02:00.0 Ethernet controller: 3Com Corporation 3c905C-TX/TX-M [Tornado] (rev 78) 02:01.0 CardBus bridge: Texas Instruments PCI1420 PC card Cardbus Controller 02:01.1 CardBus bridge: Texas Instruments PCI1420 PC card Cardbus Controller 03:00.0 Network controller: RaLink RT2500 802.11g Cardbus/mini-PCI (rev 01) 07:00.0 Network controller: Option N.V. Qualcomm MSM6275 UMTS chip
Here, the last two lines relate to the two PCMCIA-ports on my laptop. The first line is about the WiFi-card, that worked out-of-the-box, and the second line is about the UMTS datacard. Again, it's apparently developed by the Belgium company Option N.V., and it seems to sport a Qualcomm MSM6275 UMTS Chip.
Where to go from here?
Both sources that I mentioned earlier, seem to suggest that the two interfaces to the card should be configured as USB ports. However, I don't seem to be able to identify them as such. Further, I don't know how to connect with this card through this mysterious Nozomi-driver that seems to get loaded. Further, less /var/log/messages started mentioning that I used a depreciated interface that soon will be removed from the kernel. I suspect this pertains to the utility cardctl, so that's OK.
What does seem to help me: The card appears in /dev as devices:
strompf@laptopstrompf:/dev$ ls noz* -l crw-rw---- 1 root dialout 241, 0 2008-04-20 18:48 noz0 crw-rw---- 1 root dialout 241, 1 2008-04-20 18:48 noz1 crw-rw---- 1 root dialout 241, 2 2008-04-20 18:48 noz2 crw-rw---- 1 root dialout 241, 3 2008-04-20 18:48 noz3.
This is easy to check: Insert + check, eject + check, insert + check. So maybe, these Nozomi-driver are the key to getting the datacard to work.
Let's talk with the UMTS Datacard
In the previous section, we identified the device. Now comes step 2: Can we actually talk with it it? Talk in this context means, to communicate with the modem through Hayes commands. It would be nice if we can interactively perform all the steps that we later need to set up a PPP sessions.
Software
The aforementioned online sources mentioned two options for conducting interactive sessions with the UMTS datacard: Minicom and the terminal windows that is part of KPPP.
To use Minicom on Ubuntu, I first had to install it through
sudo apt-get install minicom
To use KPPP, I had to install it first as well (I forgot how. Probably just sudo apt-get install kppp).
Minicom
I had to start Minicom as root through sudo minicom. I found Minicom a delight to work with. Through CTRL-A Z O (Configure modem), I changed at Serial port setup the serial device to /dev/noz0 and saved this as default. After restarting Minicom, it immediately got talking with the card.
Some Hayes commands
| Hayes command | Comments |
|---|---|
| AT | Hayes commands are also called AT Hayes commands, because they are all preceded by AT. From http://www.cellular.co.za/hayesat.htm I understood that the characters AT 'are needed by the modem to adjust itself to the settings of the PC's comport'. Maybe something like a handshake? Anyhow. Just issuing AT is a good and humble start for exploring communication with the UMTS datacard. It should reply OK. If not, you probably have a problem. |
| ATZ | Reset the modem. If it was active, the line is dropped. Again, the reply should be OK. |
| ATDT0650243451 | This calls my mobile number. On Windows, I often use Dialer or whatever it is called for basic testing of modem infrastructure. In this case, just plainly issuing this command doesn't work, since we first have to enter the PIN-code of the SIM-card. Therefore, we get reply NO CARRIER |
| AT&V | Gives an overview of all available Hayes commands. I like this command, since it so vividly illustrates that the modem is alive. |
| at_opsys=3,2 | To start with: Hayes commands are case-insensitive. This command specifies network preference. There are several options: at_opsys=0,2 (GPRS only), at_opsys=1,2 (UMTS only), at_opsys=2,2 (prefer GPRS), at_opsys=3,2 (prefer UMTS). It's useful to issue this command even before authentication, so that a connection can immediately be set up after authentication. |
| at_opsys? | Query the modem for the actual network preference setting |
| at+cpin="1234" | Replace 1234 with your actual pin code for authenticating the SIM-card. Let's have a closer look at the LEDs on the modem:
Now that we authenticated the SIM-card, I tried to use again atdt0650243451 to phone my mobile phone, but I got a NO CARRIER error. |
| ATDT*99***1# | Supposingly, this is the dial-string to contact the Vodafone dial-in server. Contrary to dialing my mobile phone number, I get CONNECT 1800000 as a response. Similar to what http://www.kuix.de/umts/vodafone/ said, I seem only able to terminate this state by removing the UMTS-card from its slot. By the way: I can't surf yet. Maybe the modem is not recognized as a network gateway since it isn't configured as a full-fledged PPP-connection. ifconfig doesn't mention the modem as a network device. |
| at+csq | The modem echos an indication of signal quality. Maybe csq stands for carries select quality? |
| at+cops? | Returns what seems to be a status string. Some values I got:
|
PPP
We have to set up a PPP connection (http://en.wikipedia.org/wiki/Point-to-Point_Protocol). For this, we will use the program kppp, which works as well under Gnome as under KDE. First we discuss some details that play a role here, but that weren't relevant in the previous section.
APN APN stands for Access Point Name (http://en.wikipedia.org/wiki/Access_Point_Name). It's the name of the external network that we want to approach with our modem.
According to http://www.taniwha.org.uk/gprs.html and http://www.vodafone.nl/prive/klantenservice/toestel/instellingen/Algemene_instellingen/, we might need the following parameters for a Vodafone APN in The Netherlands:
- Network: Vodafone (business)
- APN: office.vodafone.nl
- User name: vodafone
- Password: vodafone
novj Somewhere in configuring the ppp connection, we have to use the keyword novj to indicate that compression should be turned off.
