Dieses Kapitel basiert auf diversen Postings und einem PDF-File die unter folgenden Links gefunden wurden:
http://joergweis.wordpress.com/tag/linux/
http://www.linuxforen.de/forums/showthread.php?t=157913
http://joergweis.wordpress.com/files/2006/06/vodafone_gt3g_emea_HOWTO.pdf
Dieses Kapitel ist also nur eine kurze Sammlung von Tips wie man UMTS mit einer A1-Vodafon-Karte in Österreich zum Laufen bringt. Andere Länder werden hier nicht behandelt. Ich habe mit den Typangaben auf meiner Karte nach folgendem String im Internet gesucht:
"Vodafone GT 3G+ linux"
und habe dabei die obigen Links gefunden. Wahrscheinlich gibt es noch viel mehr, aber die obigen Links haben bei mir zum Erfolg geführt (Vielen Dank an Jörg Weis, ...)
Trickreich ist, daß man einen Kernelmodul herunterladen muss (als Source-tgz), den ich aber dort wo im obigen PDF angegeben, nicht gefunden habe. Unter dem nachfolgenden Link bin ich dann fündig geworden:
http://packages.debian.org/unstable/net/nozomi-source
Das tgz-File ist 25 kbyte gross und mit einem beherzten make compilierbar (getestet auf einer Suse 10.1). Das make install geht leider nicht, weil der modprobe -r (nona) nicht klappt, aber das einzige cp das make-install dort macht kann man auch per Hand machen (also cat Makefile und den cp ganz am Ende per Hand machen:
cp -f nozomi.ko /lib/modules/$(uname -r)/kernel/drivers/pci/hotplug
Dann ein beherztes modprobe nozomi.ko und die Karte in den GPRS-Slot und schon hat man 4 neue devices /dev/noz0 bis /dev/noz3 und dmesg bestätigt die gefundene Karte.
Weiter gehts dann wie im oben erwähnten PDF-File beschrieben.
Von der Seite http://www.blogeee.net/2008/03/14/tutorial-une-cle-3g-sur-votre-ultraportable-pour-30e/ habe ich das File wget http://asuseee.free.fr/tuto/01/icon225.tar.gz heruntergeladen, das im Wesentlichen aus folgenden zwei Teilen besteht, die ich beide in mein Homedirecotory auf einer Suse 11 kopiert habe:
script connect.sh in eine Datei kopieren und ausführbar machen mit chmod a+x connect.sh
#!/bin/sh
#################################################################################################
# Script: hso_connect.sh
# Purpose:Bring the interface up and down, send the needed AT commands to connect
#################################################################################################
# checking for root
USERID=`id -u`
if [ "$USERID" != "0" ]
then
echo "Need root permissions to run this script"
exit
fi
# always start with checking if a connection data file has been supplied
CONNECTIONFILE="conninfo.ini"
if [ -z "$2" ]
then
if [ ! -f $CONNECTIONFILE ]
then
echo "# this file contains the connection information for your subscription" >> $CONNECTIONFILE
echo "APN=web.pro.be" >> $CONNECTIONFILE
echo "# USER=" >> $CONNECTIONFILE
echo "# PASS=" >> $CONNECTIONFILE
echo "# PIN=" >> $CONNECTIONFILE
fi
else
if [ -f $2 ]
then
CONNECTIONFILE=$2
else
echo "Supplied file $2 does not exist"
exit 1
fi
fi
DEVICE=/dev/ttyHS0
NETDEV=hso0
TMPFIL=/tmp/connect.$$
OUTPUTFILE=/tmp/output.$$
SCRIPTFILE=/tmp/scriptfile.$$
#################################################################################################
# METHOD: Connect
# PURPOSE:Connect to the specified APN with the specified user and pass and get the ip
# set the IP to the interface
#################################################################################################
Connect()
{
echo "Initializing..."
#============================================================
# get the APN, USER, PASS and PIN out of the connection file
#============================================================
APN=`grep '^APN=' $CONNECTIONFILE | cut -d= -f2`
USER=`grep '^USER=' $CONNECTIONFILE | cut -d= -f2`
PASS=`grep '^PASS=' $CONNECTIONFILE | cut -d= -f2`
PIN=`grep '^PIN=' $CONNECTIONFILE | cut -d= -f2`
if [ -z "$APN" ]
then
echo "Please provide an APN (eg web.pro.be)"
exit
fi
#============================================================
# send the PIN, APN, USER and PASS
#============================================================
rm -f $SCRIPTFILE
echo "ABORT ERROR" > $SCRIPTFILE
echo "TIMEOUT 10" >> $SCRIPTFILE
echo "\"\" ATZ" >> $SCRIPTFILE
if [ -n "$PIN" ]
then
echo "OK \"AT+CPIN=\\\"$PIN\\\"^m\"" >> $SCRIPTFILE
fi
echo "OK \"AT+COPS=0^m\"" >> $SCRIPTFILE
echo "OK \"\d\d\d\d\d\d\dAT+COPS=?^m\"" >> $SCRIPTFILE
echo "OK \"AT+CGDCONT=1,,\\\"$APN\\\"^m\"" >> $SCRIPTFILE
if [ -n "$USER" -a -n "$PASS" ]
then
echo "OK \"AT\$QCPDPP=1,1,\\\"$PASS\\\",\\\"$USER\\\"^m\"" >> $SCRIPTFILE
fi
echo "OK \"\"" >> $SCRIPTFILE
#============================================================
# run the script
#============================================================
echo "Trying $APN ..."
rm -f $OUTPUTFILE
( /usr/sbin/chat -E -s -V -f $SCRIPTFILE <$DEVICE >$DEVICE ) 2> $OUTPUTFILE
ISERROR="`grep '^ERROR' $OUTPUTFILE`"
if [ -n "$ISERROR" ]
then
echo "Failed to initialize connection"
cat $OUTPUTFILE
echo " "
rm -f $OUTPUTFILE
exit
fi
ISERROR="`grep '^+CME' $OUTPUTFILE`"
if [ -n "$ISERROR" ]
then
echo "Failed to initialize connection"
cat $OUTPUTFILE
echo " "
rm -f $OUTPUTFILE
exit
fi
rm -f $SCRIPTFILE
sleep 2
#============================================================
# now actually connect
#============================================================
echo "Connecting..."
stty 19200 -tostop
# make the call script
echo "ABORT ERROR" > $SCRIPTFILE
echo "TIMEOUT 10" >> $SCRIPTFILE
echo "\"\" ATZ" >> $SCRIPTFILE
echo "OK \"AT_OWANCALL=1,1,0^m\"" >> $SCRIPTFILE
echo "OK \"\d\d\d\d\dAT_OWANDATA=1^m\"" >> $SCRIPTFILE
echo "OK \"\"" >> $SCRIPTFILE
PIP=""
COUNTER=""
while [ -z "$PIP" -a "$COUNTER" != "-----" ]
do
echo "trying$COUNTER"
sleep 2
rm -f $OUTPUTFILE
( /usr/sbin/chat -E -s -V -f $SCRIPTFILE <$DEVICE > $DEVICE ) 2> $OUTPUTFILE
ISERROR=`grep '^ERROR' $OUTPUTFILE`
if [ -z "$ISERROR" ]
then
PIP="`grep '^_OWANDATA' $OUTPUTFILE | cut -d, -f2`"
NS1="`grep '^_OWANDATA' $OUTPUTFILE | cut -d, -f4`"
NS2="`grep '^_OWANDATA' $OUTPUTFILE | cut -d, -f5`"
fi
COUNTER="${COUNTER}-"
done
echo Connected
#============================================================
# always check the IP address
#============================================================
if [ -z "$PIP" ]
then
echo "We did not get an IP address from the provider, bailing ..."
cat $OUTPUTFILE
rm -f $OUTPUTFILE
exit
fi
rm -f $OUTPUTFILE
#============================================================
# setting network settings
#============================================================
echo "Setting IP address to $PIP"
ifconfig $NETDEV $PIP netmask 255.255.255.255 up
echo "Adding route"
route add default dev $NETDEV
mv -f /etc/resolv.conf /tmp/resolv.conf.hso
echo "Setting nameserver"
echo "nameserver $NS1" > $OUTPUTFILE
echo "nameserver $NS2" >> $OUTPUTFILE
mv $OUTPUTFILE /etc/resolv.conf
echo "Done."
}
#################################################################################################
# METHOD: Disconnect
# PURPOSE:disconnect from the providers network
#################################################################################################
Disconnect()
{
echo "Bringing interface down..."
ifconfig $NETDEV down
echo "Disconnecting..."
# make the disconnect script
rm -f $SCRIPTFILE
echo "TIMEOUT 10" >> $SCRIPTFILE
echo "ABORT ERROR" >> $SCRIPTFILE
echo "\"\" ATZ" >> $SCRIPTFILE
echo "OK \"AT_OWANCALL=1,0,0^m\"" >> $SCRIPTFILE
echo "OK \"\"" >> $SCRIPTFILE
#============================================================
# run the script
#============================================================
/usr/sbin/chat -V -f $SCRIPTFILE <$DEVICE >$DEVICE 2> /dev/null
if [ -f /tmp/resolv.conf.hso ]
then
echo "Reset nameserver..."
mv -f /tmp/resolv.conf.hso /etc/resolv.conf
fi
echo "Done."
}
#################################################################################################
# METHOD: usage
# PURPOSE:
#################################################################################################
usage()
{
echo Usage: $0 \(up\|down\|restart\)
}
#################################################################################################
# Choose your action
#################################################################################################
case "$1" in
up)
Connect
;;
down)
Disconnect
;;
restart)
Disconnect
Connect
;;
*)
usage
;;
esac
Die Datei conninfo.ini legen Sie im selben Directory an, wie die obige Datei connect.sh. Bei dieser Datei sind die Zugriffsrechte egal. Zumindest Readrechte für Root sollten bestehen:
# this file contains the connection information for your subscription
APN=business.gprsinternet
# USER=
# PASS=
# PIN=
Bei der Suse 11.0 ist unter dir /lib/modules/2.6.27.7-9-default/kernel/drivers/net/usb/hso.ko der passende Treiber für den Webnwalk-Stick schon dabei. Man kann daher die anderen Files aus obigem Download getrost weglassen. Man muss lediglich
usb_modeswitch eintippen
Wird die Verbindung nicht mehr benötigt, genügt ein beherztes
Bei Problemen können Sie prüfen ob nach dem Kommando usb_modeswitch die Dateien /dev/ttyHS0, /dev/ttyHS1 und /dev/ttyHS2 erzeugt wurden. Wenn nicht, dann wurde kein HSO Stick gefunden. Dann haben Sie keinen web'n'walk Stick in Verwendung.
Ein weiteres Problem könnte der PIN sein. Ich hab bei mir den Stick einmal unter Windows gestartet und gleich den PIN ausgeschaltet. Damit kann ich unter Linux den PIN weglassen.
Wenn der Verbindungsaufbau trotzdem nicht funktioniert, legt das Script einige Files im Directory /tmp an. Die Files sind mit Prozessnummern durchnummereriert, sodaß keine verloren gehen. Dort kann man nachlesen was passiert oder auch nicht.