Search:  
Gentoo Wiki

Vodafone_Mobile_Connect_3G


This article is part of the Hardware series.
Laptops TV Tuner Cards Wireless Servers Storage Other Hardware Motherboards Related

Contents

Introduction

In what follows I will try to briefly explain how to have the Vodafone tri-band PCMCI connect card working on your Linux system. The following instructions are essentialy based on (in Italian) [1] which provides also informations on how to configure kppp to use the card. For further informations see also [2]

Installation

The installation procedure is composed of two steps. First, the card should be properly recognized by the system. Second, you have to configure some software to use it to establish a PPP connection. Please notice that the following procedure require root privilege on the system

Hardware configuration

The PCMCIA adapter is recognized as a OHCI Host Controller and necessitates of the USB generic serial drivers. To check if the necessary drivers are compiled in the kernel, use

zgrep "CONFIG_USB_OHCI_HCD" /proc/config.gz

and

zgrep "CONFIG_USB_SERIAL_GENERIC" /proc/config.gz 

or check your kernel configuration (if you use genkernel it can be found in /etc/kernels/). If the options are not set, either in the kernel (y) or as a module (m) recompile your kernel with the following options activated

Linux Kernel Configuration: Configuring
Device Drivers  ---> USB Support ---> OHCI HCD support
Device Drivers  ---> USB Support ---> [M] USB Serial Converter support ---> [*] USB Generic Serial Driver

The OHCI HCD driver can be compiled directly in the kernel, but the usbserial driver must be compiled as a module. If you say [M] for "USB Serial Converter support" and [*] for "USB Generic Serial Driver", you get the usbserial module.

Once these drivers are available, plug the card in the PCMCIA slot and use

lsusb -v

to see if the card has been properly recognized. You should see something like


File: lsusb output
 
  ... 
  idVendor           0x0af0 Option
  idProduct          0x6000 
  bcdDevice            0.00
  iManufacturer      1 Option N.V.
  iProduct           2 Fusion UMTS GPRS WLAN
  iSerial            4 Serial Number
  ...
  

The idProduct and idVendor should be passed at the module of the USB generic serial driver usbserial when it is loaded. The simplest approach is to autoload the module at boot, adding the following line to /etc/modules.autoload.d/kernel-2.6)

File: /etc/modules.autoload.d/kernel-2.6
 
  usbserial vendor=0x0af0 product=0x6000
  

Modify the previous line with your id codes.

Alternatively, you can add an explicit rule for udev. Create the file /etc/udev/rules.d/50-vodafone.rules with a single line

File: /etc/udev/rules.d/50-vodafone.rules
 
  SUBSYSTEM=="usb", SYSFS{idProduct}=="6000", SYSFS{idVendor}=="0af0", RUN+="/sbin/modprobe usbserial vendor=0x0af0 product=0x6000"
  

In this way the module is loaded with the proper settings when the device is inserted. This approach is particularly suited if you need to use the module usbserial with different devices. Again, remember to adapt the previous line to your id codes.

For now you can simply use the following command

modprobe usbserial vendor=0x0af0 product=0x6000

If modprobe fails complaining for the vendor/product parameters, You forgot to set "CONFIG_USB_SERIAL_GENERIC" in Your kernel configuration.

At this point if the card is extracted and inserted again you should find at the end of your /var/log/messages something like

File: /etc/modules.autoload.d/kernel-2.6
  
  ... usbserial_generic 6-1:1.0: generic converter detected
  ... gusb 6-1: eneric converter now attached to ttyUSB0
  ... usbserial_generic 6-1:1.1: generic converter detected
  ... gusb 6-1: eneric converter now attached to ttyUSB1
  ... usbserial_generic 6-1:1.2: generic converter detected
  ... usb 6-1: generic converter now attached to ttyUSB2
  

Software configuration

The Vodafone adapter works as a modem and relies on PPP to establish a connection. One can use any PPP management program. Several GUI programs are available for both KDE and Gnome. In what follows I stick with a bare-bone approach. Just

emerge net-dialup/ppp

and create the following file

File: /etc/ppp/chat-VODAFONE
 
  'ABORT' 'BUSY'
  'ABORT' 'ERROR'
  'ABORT' 'NO ANSWER'
  'ABORT' 'NO CARRIER'
  'ABORT' 'NO DIALTONE'
  'ABORT' 'Invalid Login'
  'ABORT' 'Login incorrect'
  '' 'ATZ'
  'OK' 'ATH'
  'OK' 'AT+CPIN="pin"'
  'OK' 'ATE1'
  'OK' 'ATDT*99***1#'
  'CONNECT' ''
  'TIMEOUT' '30'
  '~--' ''
  

where pin is the PIN of your card (typically a four digit code) and the file

File: /etc/ppp/peers/VODAFONE
 
  debug
  /dev/ttyUSB0
  460800
  noauth
  novj
  crtscts
  usepeerdns
  local
  defaultroute
  noipdefault
  connect '/usr/sbin/chat -f /etc/ppp/chat-VODAFONE'
  

At this point you should be able to start the PPP connection using

pon VODAFONE

and stop it with

poff VODAFONE

In the case that the first command complains about the lack of /dev/ppp, create it as suggest and modify /etc/conf.d/rc to read

File: /etc/conf.d/rc
 
  RC_DEVICE_TARBALL="yes"
  

so that the newly created device doesn't disappear after a reboot.

Signal Quality

If You want to track the reception quality level, it is possible to open the /dev/tts/USB2 with any mobile utility like kmobiletools or gnokii while you are connected on /dev/tts/USB0.

This article is still a Stub. You can help Gentoo-Wiki by expanding it.

Retrieved from "http://www.gentoo-wiki.info/Vodafone_Mobile_Connect_3G"

Last modified: Mon, 21 Jul 2008 03:53:00 +0000 Hits: 7,169