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 (14)
Wallpaper [www.clasohm.com]
20:17, 15 Dec 2004 by Carsten Clasohm Permalink | Comments (0)
| December 2004 | ||||||||||||||||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||||||||||||||||
Request notifications