Vodafone UMTS with Fedora Core 3 [www.pharscape.org]

Update 14 Jun 2007: This article has been rewritten for Fedora 7. See Vodafone UMTS with Fedora 7.

I got a new toy today - a Vodafone 3G Datacard, which is a UMTS PCMCIA adapter. There are a couple of HowTo pages for it already, but I couldn't find one describing the complete setup for Fedora Core 3. Note that I have only tested this with the German Vodafone network.

In /etc/hotplug/usb, create the file umts.usermap with this content:

umts 0x03 0xaf0 0x5000 0 0 0 0 0 0 0 0 0

The vendor ID 0xaf0 and the product ID 0x5000 can be found in /proc/bus/usb/devices, searching for "Vodafone", once the card is plugged in.

In the same directory, create the file umts, which will initialize the PIN for the UMTS SIM card:

#!/bin/sh

if [ "${ACTION}" = "add" ]
then
    wvdial --config /etc/wvdial-pin.conf
fi

For the card to work, the usbserial module has to be loaded. I had some problems with getting the device node created the first time the card is detected, and with removing the module when the card is disconnected. Instead of trying to fix this with udev and hotplug, I just put the following into /etc/rc.d/rc.local:

/sbin/modprobe usbserial vendor=0xaf0 product=0x5000

# The first time the card is connected, the device node is created
# as /dev/0. So we create the right note manually if
# necessary.
test -e /dev/ttyUSB0 || mknod /dev/ttyUSB0 c 188 0

# Initialize the SIM PIN, in case the UMTS card is already plugged in.
# Otherwise, this will be done by /etc/hotplug/usb/umts.
wvdial --config /etc/wvdial-pin.conf >/dev/null 2>&1

Append the following to the end of /etc/wvdial.conf:

[ModemUMTS]
Modem = /dev/ttyUSB0
Baud = 460800
SetVolume = 0
Dial Command = ATDT
Init1 = ATZ
Init2 = ATM0
FlowControl = NOFLOW
[Dialer umts]
Username = VFD2
Password = WAP
Phone = *99***1#
Stupid Mode = 1
Init3 = AT+CGDCONT=1,"IP","web.vodafone.de"
Dial Attempts = 3
Inherits = ModemUMTS

Because the system-control-network utility will remove certain entries from /etc/wvdial.conf, I put the configuration for setting the PIN into a separate file, /etc/wvdial-pin.conf. Replace "1234" with your own PIN.

[Dialer Defaults]
Modem = /dev/ttyUSB0
Baud = 460800
SetVolume = 0
Dial Command = ATDT
FlowControl = NOFLOW
Init1 = ATZ
Init2 = ATM0
Init3 = AT+CPIN="1234"

Next, we need to configure a network interface. In /etc/sysconfig/network-scripts/ifcfg-umts, add this:

IPV6INIT=no
ONBOOT=no
USERCTL=yes
PEERDNS=yes
TYPE=Modem
DEVICE=ppp0
BOOTPROTO=dialup
LINESPEED=460800
MODEMPORT=/dev/ttyUSB0
IDLETIMEOUT=600
PROVIDER=umts
DEFROUTE=yes
PERSIST=no
WVDIALSECT=umts
MODEMNAME=ModemUMTS
DEMAND=no
PAPNAME=VFD2
AC=off
BSDCOMP=off
VJCCOMP=off
CCP=off
PC=off
VJ=off

This configuration has to be made available at two other locations:

ln /etc/sysconfig/network-scripts/ifcfg-umts \
  /etc/sysconfig/networking/devices/ifcfg-umts
ln /etc/sysconfig/network-scripts/ifcfg-umts \
  /etc/sysconfig/networking/profiles/default/ifcfg-umts

The final three files are for configuring PPP. First, /etc/ppp/peers/umts:

connect "/usr/bin/wvdial --remotename umts --chat 'umts'"

In /etc/ppp/peers/chap-secrets and pap-secrets, append this line at the end:

"VFD2"  *       "WAP"

Now, either reboot your machine, or execute the commands you added to /etc/rc.d/rc.local. You should then be able to establish a connection with ifup umts and terminate it with ifdown umts. When the card switches between UMTS and GPS, the connection attempt may time out, so retry before checking the configuration files.

Update 14 Apr 2006: With Fedora Core 5, hotplug has become part of udev, so the configuration looks a bit different. Instead of /etc/hotplug/usb/umts.usermap, create the file /etc/udev/rules.d/48-UMTS.rules with the following content:

BUS=="usb", DRIVER=="option", SYSFS{interface}=="Data Interface", SYSFS{bInterfaceNumber}=="00", SYMLINK="umts", RUN+="/lib/udev/umts-pin.sh"
BUS=="usb", DRIVER=="option", SYSFS{interface}=="Data Interface", SYSFS{bInterfaceNumber}=="02", SYMLINK="gsm"

Create the script /lib/udev/umts-pin.sh:

#!/bin/bash

wvdial --config /etc/wvdial-pin.conf

You don't need the modifications in /etc/rc.d/rc.local any more, and you can replace "/dev/ttyUSB0" with "/dev/umts" in the other configuration files. The rest stays the same as on FC3.

Thanks to Patrick Ernzer for the new udev rule.

22:48, 15 Dec 2004 by Carsten Clasohm Permalink

Comments

Works for T-Mobile 3G Option Fusion, too

Hi Carsten,
first thanks for this detailed how-to, it also worked for my T-Mobile Option Fusion (think, it's the same card Vodafone uses). Just the product ID is different 0x6000 from Vodafone's.

One thing I am not quite sure about is, how to determine if the card is in gprs or umts mode. Have you figured out wether the indicator leds are showing the correct status or are just showing the gsm-network link (got only the red one blinking...)?

Greetings,
Marko

by Marko Bertheau, 03 Jan 2005

Re: Works for T-Mobile 3G Option Fusion, too

The Vodafone card has two LEDs: A green one for GRPS and a blue one for UMTS. I spent the last few days in an area with poor UMTS coverage, and the LEDs always indicated the current transmission protocol. The automatic switch between GRPS and UMTS worked without dropping the PPP connection, but TCP connections died after that.

by Carsten Clasohm, 04 Jan 2005

Works for RedHat 9

I did not get hotplug working, but adding "options usbserial product=0x5000 vendor=0xaf0" to /etc/modules.conf and rebooting solved things.

After running " wvdial --config /etc/wvdial-pin.conf", you can also use "redhat-config-network" to activate and deactivate the connection.

by Al Forest, 30 Jan 2005

Small Problems with SuSE 9.2

Hi !
I brought my 3G to work with Vodafone D2 UMTS in Germany
on SuSE 9.2.
I start the connection by hand with "wvdial". That works.

I want to use "ifup umts" but an error occured:
"ERROR: Interface umts is not availabe"

My Problem seems to be the following section, because the
directorys are different between SuSE and Fedora:

ln /etc/sysconfig/network-scripts/ifcfg-umts \
  /etc/sysconfig/networking/devices/ifcfg-umts
ln /etc/sysconfig/network-scripts/ifcfg-umts \
  /etc/sysconfig/networking/profiles/default/ifcfg-umts

I don't know to which location I have to set the links.
Is there somebody to help ?

Kind regards
Thomas Eifel
sierra-adventures@web.de

by Thomas Eifel, 25 Feb 2005

Works for Fedora Test 4

just tried it out, it works well for Fedora Test 4 and a Vodafone Option 3G Card. in /proc/bus/usb/devices the card shows up with f0a0 and 6300 ! Is there a way to see the actual connect rate? cu :-) patrick, pjung@gmx.net

by Patrick Jung, 20 May 2005

little problems, solveable? am

I am using the austrian t-mobile umts card (which is a fusion card) and i am getting the following message "Failed to activate umts with error 7" when i ifup... anybody any idea or experienced similar problems...just before i start digging.

thx & rgds oliver

by Oliver Scheifinger, 07 Jun 2005

Works for Fedora Core 4

It' works well with Fedora Core 4 at Vodafone Portugal.

Just change in /etc/wvdial.conf

Username = vodafone
Password = vodafone
Init3 = AT+CGDCONT=1,"IP","internet.vodafone.pt"

and in /etc/ppp/peers/chap-secrets e pap-secrets
"VFD2" * "WAP" to "vodafone" * "vodafone"

by Pedro Roque, 10 Mar 2006

UMTS / Fedora 4.. help

I am a newbie..a monk in the woods near Madrid, off the grid...converted from Windows to Fedora 4 (small liberation)

I use Movistar mobile phone co. a laptop, and a Novatel U530 PCMCIA and can't get it working. I am thinking of getting a Vodafone 3g card as there seem to be some successs stories.

1.  Is there any support or help from Vodafone for Linux users?
2.  Am I better off trying this with fedora 4 or fedora 5
3.  Can someone suggest the simplest distro to use other than Fedora?
I will get the Vodafone PCMCIA Card and check back for help.

Pamting

by Kelsang Pamting, 07 May 2006

Fedora Core 5 on Vodafone UK service

UK service all works well - UK Vodafone needs "web.vodafone.de" changed to "internet" and I needed to edit my /etc/resolv.conf and put in the dns servers (I used the ones that were displayed when running wvdial by hand)

My sim didn't come with a pin by default and I couldn't get this to work until I put the sim in my mobile and set a pin number

Also note that ping doesnt seem to work past their gateway with Vodafone UK UMTS service which caused me no end of problems trying to diagnose this

by Tim Hughes, 12 Jun 2006

Nozomi Driver

Hi Everyone

Thanks for finally getting all the info together in one place.  I recently got the nozomi OSS driver for the Vodafone 3G cards from pharscape.org. This makes the device available without the use of the usbserial driver. Could someone please suggest what the string should look like if I am NOT using the usbserial kernel driver (i.e. what could I substitute in /etc/udev/rules.d/48-UMTS.rules)??

Thanks in advance for any pointers you may have to share :)

by Charl Abner, 13 Jun 2006

Re Nozomi driver

Because all of Vodafone's 3G cards are called "Vodafone 3G" there is some confusion about what driver should be used. Some cards use USB serial or "option" drivers, other use the nozomi" driver. You cannot substitute USB for nozomi and vice versa. Please check out this table:
http://www.pharscape.org/content/view/40/53/

by Paul Hardwick, 22 Sep 2006

Huawei E220

I could use Huawei 3G modem in Ubuntu after some twekaning.In fedora 5,its recognized in /proc/bus/usb/1,2,3,4.
I configured wvdial as same as I did in Ubuntu.Instead of ttyUSB0 should I change anything for Fedora?
For Ubuntu jist type wvdial hsdpa in console can connect to Internet.
For Fedora,what should I do.If I do the same as above,I get error.
Pl help me.

by venkat s, 03 Mar 2007

HUAWEI E220 HSDPA 3G modem in Linux

Guyz, take a look at this project:
http://oozie.fm.interia.pl/pro/huawei-e220/

It's working out-of-the-box for SUSE and Fedora, probably RedHat and many other udev based systems!

and it's EEEAAAASSSSYYY!!!!!!

by Anonymous Visitor, 15 Jun 2007

Thanks

Thanks for your notes about udev, it helped me to get it runnign after changing from hotplug to udev.

by Anonymous Visitor, 10 Jul 2007

Add a Comment

Comments are reviewed before they appear on this page.

Title:

Comment:

Text above is