hide-password
noauth
connect "/usr/sbin/chat -f /etc/ppp/scripts/ppp"
debug
/dev/ttyUSB0
460800
defaultroute
noipdefault
noccp
nobsdcomp
user USER
password PASS
usepeerdns
connect-delay 10000
ABORT BUSY ABORT 'NO CARRIER' ABORT VOICE ABORT 'NO DIALTONE' ABORT 'NO DIAL TONE' ABORT 'NO ANSWER' ABORT DELAYED
# modeminit
'' 'ATZ'
TIMEOUT 5
OK AT+CPIN?
'READY-AT+CPIN=PIN-' ''
TIMEOUT 20
'OK' 'AT+cgdcont=1,"IP","APN"'
'OK' 'ATDTTEL'
CONNECT \d\c
# end of pppconfig stuff
NOTE: I have not upgraded to usb_modeswitch-1.0.3 because it no longer appears to support command-line parameters, which Puppy uses. It stops with a segmentation fault.
tux@slitaz:~$ ls -l /usr/bin/wvdial
-rwsr-x--- 1 root dialout 93976 Sep 25 15:40 /usr/bin/wvdial
tux@slitaz:~$ cat /etc/group
root:x:0:
lp:x:10:
audio:x:20:tux
nogroup:x:99:
www:x:80:
messagebus:x:25:
camera:x:1:
cdrom:x:2:
dialout:x:3:tux
disk:x:4:
floppy:x:5:
kmem:x:6:
scanner:x:7:
tape:x:8:
tty:x:9:
vboxusers:x:11:
video:x:12:
haldaemon:x:26:
tux:x:1000:
tux@slitaz:~$ wvdial pin
-sh: wvdial: Permission denied
tux@slitaz:~$
#!/bin/bash
#
# umts-connect 0.3
#
# Script to connect UMTS modems
# via comgt (PIN activation) and wvdial
#
# - icon with established connection
# - used volume is shown after the connection is closed
# - choice of the device (modem, handy via usb or bluetooth
#
# Thomas Schönhütl
# 22. September 2008
# 20. April 2009
# 20. Juli 2009
#
# Lizenz: GPL, Version 2
#
DEVICE=$(zenity --title "Modem/Handy" --width=400 --height=200 --radiolist --text "Which device shall be used?" --list --column Choice --column Device TRUE "UMTS-Modem (USB/PCMCIA/Express34)" FALSE "Handy/PDA via USB connection" FALSE "Handy/PDA via bluetooth")
if [ -z "`echo $DEVICE`" ]; then
zenity --title "UMTS connection" --info --text "The script will finish now ..."
exit
fi
#
#
#
if [ "`echo $DEVICE`" = "UMTS-Modem (USB/PCMCIA/Express34)" ]; then
#
if [ -z "`/bin/ls /dev/ttyUSB*`" -a -z "`/bin/ls /dev/ttyACM*`" ]; then
zenity --title "UMTS connection" --info --text "No UMTS modem available!\n\nThe script will finish now ..."
exit
fi
#
PIN=$(zenity --title "PIN" --entry --text "Please insert the PIN of the SIM card:" --hide-text)
#
export COMGTPIN=$PIN
/usr/local/bin/comgt PIN -d /dev/ttyUSB0
#
WAHL=$(zenity --title "UMTS connection" --list --radiolist --text "Use the last configuration?" --column Choice --column Action TRUE "Yes, use it." FALSE "No, configure a new one.")
#
if [ -z "`echo $WAHL`" ]; then
zenity --title "UMTS connection" --info --text "The script will finish now ..."
exit
fi
#
if [ "`echo $WAHL`" = "Yes, use it." ]; then
sed -i "s:ttyACM:ttyUSB:" /etc/wvdial.conf
sed -i "s:rfcomm0:ttyUSB0:" /etc/wvdial.conf
export MAIN_DIALOG="
"
{
sleep 15
killall gtkdialog
} | gtkdialog -c --program MAIN_DIALOG
(xterm -title "Please do NOT close this window during the connection ..." -e wvdial && ERG=$(echo "`tail /var/log/messages | grep Sent | tr " " "\n" | grep bytes -1 | sed -e '2,3d' | sed -e '2,3d'`+`tail /var/log/messages | grep Sent | tr " " "\n" | grep bytes -1 | sed -e '2,3d' | sed -e '1d' | sed -e '2d'`" | bc -l) && ERG1=$(echo "`echo $ERG`/1024" | bc -l) && ERG2=$(echo $ERG1 | cut -d "." -f1) && zenity --info --text "Used data volume:\n\n`echo $ERG2` Kb" && killall zenity) &
sleep 45
rm /etc/resolv.conf
echo "nameserver `tail -30 /var/log/messages | grep DNS | sed -e '2d'| rev | cut -d " " -f1 | rev`" > /etc/resolv.conf
while [ "`ps -e | grep wvdial`" ]; do zenity --notification --window-icon=/usr/share/icons/Tango/scalable/devices/network-wireless.svg --text "UMTS connection: activ; local IP: `ifconfig | grep P-t-P | tr " " "\n" | grep addr | cut -b 6-`; DNS: `cat /etc/resolv.conf`" && zenity --info --text "UMTS connection: activ; local IP: `ifconfig | grep P-t-P | tr " " "\n" | grep addr | cut -b 6-`; DNS: `cat /etc/resolv.conf`"; continue; done
else
TEL=$(zenity --title "UMTS connection" --entry --text "Insert telefonnumber or accept:" --entry-text *99#)
if [ -z "`echo $TEL`" ]; then
zenity --title "UMTS connection" --info --text "The script will finish now ..."
exit
fi
NETZ=$(zenity --title "UMTS connection" --entry --text "Please insert APN of the provider:")
if [ -z "`echo $NETZ`" ]; then
zenity --title "UMTS connection" --info --text "The script will finish now ..."
exit
fi
USER=$(zenity --title "UMTS connection" --entry --text "Please insert username:")
if [ -z "`echo $USER`" ]; then
zenity --title "UMTS connection" --info --text "The script will finish now ..."
exit
fi
PASSWD=$(zenity --title "UMTS connection" --entry --text "Please insert password:")
if [ -z "`echo $PASSWD`" ]; then
zenity --title "UMTS connection" --info --text "The script will finish now ..."
exit
fi
#
tac /etc/wvdial.conf | sed -e '1,4d' | tac > /tmp/wvdial.conf
echo "Init3 = AT+CGDCONT=1,\"IP\",\"`echo $NETZ`\"" >> /tmp/wvdial.conf
echo "Password = `echo $PASSWD`" >> /tmp/wvdial.conf
echo "Username = `echo $USER`" >> /tmp/wvdial.conf
echo "Phone = `echo $TEL`" >> /tmp/wvdial.conf
rm -f /etc/wvdial.conf
mv /tmp/wvdial.conf /etc/
sed -i "s:ttyACM:ttyUSB:" /etc/wvdial.conf
sed -i "s:rfcomm0:ttyUSB0:" /etc/wvdial.conf
(xterm -title "Please do NOT close this window during the connection ..." -e wvdial && ERG=$(echo "`tail /var/log/messages | grep Sent | tr " " "\n" | grep bytes -1 | sed -e '2,3d' | sed -e '2,3d'`+`tail /var/log/messages | grep Sent | tr " " "\n" | grep bytes -1 | sed -e '2,3d' | sed -e '1d' | sed -e '2d'`" | bc -l) && ERG1=$(echo "`echo $ERG`/1024" | bc -l) && ERG2=$(echo $ERG1 | cut -d "." -f1) && zenity --info --text "Used data volume:\n\n`echo $ERG2` Kb" && killall zenity) &
sleep 45
rm /etc/resolv.conf
echo "nameserver `tail -30 /var/log/messages | grep DNS | sed -e '2d'| rev | cut -d " " -f1 | rev`" > /etc/resolv.conf
while [ "`ps -e | grep wvdial`" ]; do zenity --notification --window-icon=/usr/share/icons/Tango/scalable/devices/network-wireless.svg --text "UMTS connection: activ; local IP: `ifconfig | grep P-t-P | tr " " "\n" | grep addr | cut -b 6-`; DNS: `cat /etc/resolv.conf`" && zenity --info --text "UMTS connection: activ; local IP: `ifconfig | grep P-t-P | tr " " "\n" | grep addr | cut -b 6-`; DNS: `cat /etc/resolv.conf`"; continue; done
fi
killall zenity
fi
#
#
#
if [ "`echo $DEVICE`" = "Handy/PDA via USB connection" ]; then
if [ -z "`/bin/ls /dev/ttyUSB*`" -a -z "`/bin/ls /dev/ttyACM*`" ]; then
zenity --title "UMTS connection" --info --text "No UMTS modem available!\n\nThe script will finish now ..."
exit
fi
#
#
WAHL=$(zenity --title "UMTS connection" --list --radiolist --text "Use the last configuration?" --column Choice --column Action TRUE "Yes, use it." FALSE "No, configure a new one.")
#
if [ -z "`echo $WAHL`" ]; then
zenity --title "UMTS connection" --info --text "The script will finish now ..."
exit
fi
#
if [ "`echo $WAHL`" = "Yes, use it." ]; then
sed -i "s:ttyUSB:ttyACM:" /etc/wvdial.conf
sed -i "s:rfcomm0:ttyACM0:" /etc/wvdial.conf
export MAIN_DIALOG="
"
{
sleep 4
killall gtkdialog
} | gtkdialog -c --program MAIN_DIALOG
(xterm -title "Please do NOT close this window during the connection ..." -e wvdial && ERG=$(echo "`tail /var/log/messages | grep Sent | tr " " "\n" | grep bytes -1 | sed -e '2,3d' | sed -e '2,3d'`+`tail /var/log/messages | grep Sent | tr " " "\n" | grep bytes -1 | sed -e '2,3d' | sed -e '1d' | sed -e '2d'`" | bc -l) && ERG1=$(echo "`echo $ERG`/1024" | bc -l) && ERG2=$(echo $ERG1 | cut -d "." -f1) && zenity --info --text "Used data volume:\n\n`echo $ERG2` Kb" && killall zenity) &
sleep 45
rm /etc/resolv.conf
echo "nameserver `tail -30 /var/log/messages | grep DNS | sed -e '2d'| rev | cut -d " " -f1 | rev`" > /etc/resolv.conf
while [ "`ps -e | grep wvdial`" ]; do zenity --notification --window-icon=/usr/share/icons/Tango/scalable/devices/network-wireless.svg --text "UMTS connection: activ; local IP: `ifconfig | grep P-t-P | tr " " "\n" | grep addr | cut -b 6-`; DNS: `cat /etc/resolv.conf`" && zenity --info --text "UMTS connection: activ; local IP: `ifconfig | grep P-t-P | tr " " "\n" | grep addr | cut -b 6-`; DNS: `cat /etc/resolv.conf`"; continue; done
else
TEL=$(zenity --title "UMTS connection" --entry --text "Insert telefonnumber or accept:" --entry-text *99#)
if [ -z "`echo $TEL`" ]; then
zenity --title "UMTS connection" --info --text "The script will finish now ..."
exit
fi
NETZ=$(zenity --title "UMTS connection" --entry --text "Please insert APN of the provider:")
if [ -z "`echo $NETZ`" ]; then
zenity --title "UMTS connection" --info --text "The script will finish now ..."
exit
fi
USER=$(zenity --title "UMTS connection" --entry --text "Please insert username:")
if [ -z "`echo $USER`" ]; then
zenity --title "UMTS connection" --info --text "The script will finish now ..."
exit
fi
PASSWD=$(zenity --title "UMTS connection" --entry --text "Please insert password:")
if [ -z "`echo $PASSWD`" ]; then
zenity --title "UMTS connection" --info --text "The script will finish now ..."
exit
fi
#
tac /etc/wvdial.conf | sed -e '1,4d' | tac > /tmp/wvdial.conf
echo "Init3 = AT+CGDCONT=1,\"IP\",\"`echo $NETZ`\"" >> /tmp/wvdial.conf
echo "Password = `echo $PASSWD`" >> /tmp/wvdial.conf
echo "Username = `echo $USER`" >> /tmp/wvdial.conf
echo "Phone = `echo $TEL`" >> /tmp/wvdial.conf
rm -f /etc/wvdial.conf
mv /tmp/wvdial.conf /etc/
sed -i "s:ttyUSB:ttyACM:" /etc/wvdial.conf
sed -i "s:rfcomm0:ttyACM0:" /etc/wvdial.conf
(xterm -title "Please do NOT close this window during the connection ..." -e wvdial && ERG=$(echo "`tail /var/log/messages | grep Sent | tr " " "\n" | grep bytes -1 | sed -e '2,3d' | sed -e '2,3d'`+`tail /var/log/messages | grep Sent | tr " " "\n" | grep bytes -1 | sed -e '2,3d' | sed -e '1d' | sed -e '2d'`" | bc -l) && ERG1=$(echo "`echo $ERG`/1024" | bc -l) && ERG2=$(echo $ERG1 | cut -d "." -f1) && zenity --info --text "Used data volume:\n\n`echo $ERG2` Kb" && killall zenity) &
sleep 45
rm /etc/resolv.conf
echo "nameserver `tail -30 /var/log/messages | grep DNS | sed -e '2d'| rev | cut -d " " -f1 | rev`" > /etc/resolv.conf
while [ "`ps -e | grep wvdial`" ]; do zenity --notification --window-icon=/usr/share/icons/Tango/scalable/devices/network-wireless.svg --text "UMTS connection: activ; local IP: `ifconfig | grep P-t-P | tr " " "\n" | grep addr | cut -b 6-`; DNS: `cat /etc/resolv.conf`" && zenity --info --text "UMTS connection: activ; local IP: `ifconfig | grep P-t-P | tr " " "\n" | grep addr | cut -b 6-`; DNS: `cat /etc/resolv.conf`"; continue; done
fi
killall zenity
fi
#
#
#
if [ "`echo $DEVICE`" = "Handy/PDA via bluetooth" ]; then
zenity --title "UMTS connection" --info --text "Some handies must be paired with the pc before this script will work, just try it!\n\nPair the handy with the pc and make the pc known in the handy as allowed device ..."
#
if [ "`hcitool dev | awk '{ print $2 $3 }'`" = "" ]; then
zenity --title "UMTS connection" --info --text "No bluetooth device available!\n\nThe script will finish now!"
/etc/rc.d/rc.bluetooth stop
/etc/rc.d/rc.bluetooth start
exit
fi
#
#
OLD=$(cat /etc/bluetooth/hcid.conf | grep passkey | cut -d " " -f2 | sed -e 's/\";//' -e 's/\"//')
PIN=$(zenity --title "UMTS connection" --entry --text "The actual PIN of the pc is `echo $OLD`. It can be changed now:" --entry-text `echo $OLD`)
echo $PIN > /etc/bluetooth/passkeys/default
if [ -z "`echo $PIN`" ]; then
/etc/rc.d/rc.bluetooth stop
/etc/rc.d/rc.bluetooth start
exit
fi
sed -i "s/`echo $OLD`/`echo $PIN`/" /etc/bluetooth/hcid.conf
zenity --title "UMTS connection" --info --text "The actual PIN of the pc is `echo $PIN`!"
#
#
zenity --title "UMTS connection" --progress --text "Scanning for bluetooth devices in range ..." --pulsate --auto-close &
hcitool scan > ERG
EMPF=`cat ERG | sed -e '1d' -e 's/ //g'`
rm -f ERG
killall zenity
#
if [ "`echo $EMPF | awk '{ print $1 }'`" = "" ]; then
zenity --title "UMTS connection" --info --text "No bluetooth devices in range!\n\nThe script will finish now!"
/etc/rc.d/rc.bluetooth stop
/etc/rc.d/rc.bluetooth start
exit
fi
#
EMPFWAHL=$(zenity --title "UMTS connection" --list --radiolist --text "Choose the bluetooth device:" --column Choice --column Device TRUE "`echo $EMPF | cut -d " " -f1,2`" FALSE "`echo $EMPF | cut -d " " -f3,4`" FALSE "`echo $EMPF | cut -d " " -f5,6`")
if [ -z "`echo $EMPFWAHL`" ]; then
/etc/rc.d/rc.bluetooth stop
/etc/rc.d/rc.bluetooth start
exit
fi
#
#
KANAL=$(sdptool search dun | grep -i "`echo $EMPFWAHL | cut -d " " -f1`" -A 9 | grep Channel | cut -d ":" -f2 | sed -e 's: ::g')
rfcomm connect 0 "`echo $EMPFWAHL | cut -d " " -f1`" "`echo $KANAL`" &
#
#
WAHL=$(zenity --title "UMTS connection" --list --radiolist --text "Use the last configuration?" --column Choice --column Action TRUE "Yes, use it." FALSE "No, configure a new one.")
#
if [ -z "`echo $WAHL`" ]; then
zenity --title "UMTS connection" --info --text "The script will finish now ..."
exit
fi
#
if [ "`echo $WAHL`" = "Yes, use it." ]; then
sed -i "s:ttyUSB0:rfcomm0:" /etc/wvdial.conf
sed -i "s:ttyACM0:rfcomm0:" /etc/wvdial.conf
export MAIN_DIALOG="
"
{
sleep 30
killall gtkdialog
} | gtkdialog -c --program MAIN_DIALOG
(xterm -title "Please do NOT close this window during the connection ..." -e wvdial && ERG=$(echo "`tail /var/log/messages | grep Sent | tr " " "\n" | grep bytes -1 | sed -e '2,3d' | sed -e '2,3d'`+`tail /var/log/messages | grep Sent | tr " " "\n" | grep bytes -1 | sed -e '2,3d' | sed -e '1d' | sed -e '2d'`" | bc -l) && ERG1=$(echo "`echo $ERG`/1024" | bc -l) && ERG2=$(echo $ERG1 | cut -d "." -f1) && zenity --info --text "Used data volume:\n\n`echo $ERG2` Kb" && killall zenity) &
#sleep 30 && tail /var/log/messages | grep DNS | sed 's/ primary //' | sed 's/ secondary//' \ | cut -d" " -f8 | while read line; do echo "nameserver $line" > /etc/resolv.conf; done
sleep 45
rm /etc/resolv.conf
echo "nameserver `tail -30 /var/log/messages | grep DNS | sed -e '2d'| rev | cut -d " " -f1 | rev`" > /etc/resolv.conf
while [ "`ps -e | grep wvdial`" ]; do zenity --notification --window-icon=/usr/share/icons/Tango/scalable/devices/network-wireless.svg --text "UMTS connection: activ; local IP: `ifconfig | grep P-t-P | tr " " "\n" | grep addr | cut -b 6-`; DNS: `cat /etc/resolv.conf`" && zenity --info --text "UMTS connection: activ; local IP: `ifconfig | grep P-t-P | tr " " "\n" | grep addr | cut -b 6-`; DNS: `cat /etc/resolv.conf`"; continue; done
else
TEL=$(zenity --title "UMTS connection" --entry --text "Insert telefonnumber or accept:" --entry-text *99#)
if [ -z "`echo $TEL`" ]; then
zenity --title "UMTS connection" --info --text "The script will finish now ..."
exit
fi
NETZ=$(zenity --title "UMTS connection" --entry --text "Please insert APN of the provider:")
if [ -z "`echo $NETZ`" ]; then
zenity --title "UMTS connection" --info --text "The script will finish now ..."
exit
fi
USER=$(zenity --title "UMTS connection" --entry --text "Please insert username:")
if [ -z "`echo $USER`" ]; then
zenity --title "UMTS connection" --info --text "The script will finish now ..."
exit
fi
PASSWD=$(zenity --title "UMTS connection" --entry --text "Please insert password:")
if [ -z "`echo $PASSWD`" ]; then
zenity --title "UMTS connection" --info --text "The script will finish now ..."
exit
fi
#
tac /etc/wvdial.conf | sed -e '1,4d' | tac > /tmp/wvdial.conf
echo "Init3 = AT+CGDCONT=1,\"IP\",\"`echo $NETZ`\"" >> /tmp/wvdial.conf
echo "Password = `echo $PASSWD`" >> /tmp/wvdial.conf
echo "Username = `echo $USER`" >> /tmp/wvdial.conf
echo "Phone = `echo $TEL`" >> /tmp/wvdial.conf
rm -f /etc/wvdial.conf
mv /tmp/wvdial.conf /etc/
sed -i "s:ttyUSB0:rfcomm0:" /etc/wvdial.conf
sed -i "s:ttyACM0:rfcomm0:" /etc/wvdial.conf
(xterm -title "Please do NOT close this window during the connection ..." -e wvdial && ERG=$(echo "`tail /var/log/messages | grep Sent | tr " " "\n" | grep bytes -1 | sed -e '2,3d' | sed -e '2,3d'`+`tail /var/log/messages | grep Sent | tr " " "\n" | grep bytes -1 | sed -e '2,3d' | sed -e '1d' | sed -e '2d'`" | bc -l) && ERG1=$(echo "`echo $ERG`/1024" | bc -l) && ERG2=$(echo $ERG1 | cut -d "." -f1) && zenity --info --text "Used data volume:\n\n`echo $ERG2` Kb" && killall zenity) &
#sleep 30 && tail /var/log/messages | grep DNS | sed 's/ primary //' | sed 's/ secondary//' \ | cut -d" " -f8 | while read line; do echo "nameserver $line" > /etc/resolv.conf; done
sleep 45
rm /etc/resolv.conf
echo "nameserver `tail -30 /var/log/messages | grep DNS | sed -e '2d'| rev | cut -d " " -f1 | rev`" > /etc/resolv.conf
while [ "`ps -e | grep wvdial`" ]; do zenity --notification --window-icon=/usr/share/icons/Tango/scalable/devices/network-wireless.svg --text "UMTS connection: activ; local IP: `ifconfig | grep P-t-P | tr " " "\n" | grep addr | cut -b 6-`; DNS: `cat /etc/resolv.conf`" && zenity --info --text "UMTS connection: activ; local IP: `ifconfig | grep P-t-P | tr " " "\n" | grep addr | cut -b 6-`; DNS: `cat /etc/resolv.conf`"; continue; done
fi
killall zenity
killall rfcomm
fi
#
nameserver 213.94.78.16
by the way - gnome-ppp is useless, because you cannot save the pin
Init3 = AT+CPIN=nnnn (<= replace nnnn with your PIN)
tazpkg get-install wvdial
tazpkg get-install usb_modeswitch
tazhw detect-usb (for autoloading modules)
lsusb (to get the vendor id, product id of your usb modem)
addgroup tux dialout (for permissions)
ls -l /usr/bin/wvdial
wvdialconf (for auto-writing of configuration file)
geany /etc/wvdial.conf (for setting username, password, pin and guration)
usb_modeswitch -v $VENDOR_ID -p $PRODUCT_ID -d 1 (when is this necessary?)
wvdial pin (to set the pin)
wvdial umts (<= Replace umts with your provider name in wvdial.conf)<br />
I think gnome-ppp can save Init strings. As i understand, pin in wvdial is enocded as : Init3 = AT+CPIN=nnnn (<= replace nnnn with your PIN) </blockquote>
I tried this, but did not succeed
ok - I try to improve, but I will split it
1) packagestazpkg get-install wvdial
tazpkg get-install usb_modeswitch
tazpkg get-install linux-dialup
tazpgk get-install comgt (if you want the pin not be stored)
2) switching the modemthis should do normally usb_modeswitch by itself, if it is compiled with integrated_install
but there is a problem with newer kernels, because it seems, that kernels bigger than 2.6.29 or 30 handle the modems, using the option module, by itself and do not pass them to udev.
Like fluxflux-sl with kernel 2.6.30.9 is switching the Huawei E220 even when I delete the udev usb_modeswitch80.rules. (normal mode with udev 80 rule shows, when I log udev, that it is not matching the rule). In slitaz it seems to work the same, but it does not load the option driver - I have to do this with modprobe option, before I plug in the E220. Until now I do not know, what is the difference, perhaps only the kernel.
3) dialcheck the modem if it is /dev/ttyUSB* or /dev/ttyACM*
addgroup tux dialout (for permissions)
ls -l /usr/bin/wvdial
write access for dialout on /etc/wvdialconf (for auto-writing of configuration file)
geany or leafpad /etc/wvdial.conf (for setting 7dev/ttyXXXX, pin, Tel, username, password, and APN)
ifconfig eth0 down - perhaps the same with wifi otherwise you have problems with route
/usr/local/bin/comgt PIN -d /dev/ttyUSB0 (if you do not want to save the pin on the hd) or
wvdial pin
wvdial umts
edit /etc/resov.conf with DNS number you get from pppd
(wvdial does not show the DNS, but you get it with ifconfig - or thats the line of the umts script: echo "nameserver `tail -30 /var/log/messages | grep DNS | sed -e '2d'| rev | cut -d " " -f1 | rev`" > /etc/resolv.conf)
thats my wvdial.conf[Dialer pin]
Modem = /dev/ttyUSB0
Init1 = AT+CPIN=1234
[Dialer umts]
Modem = /dev/ttyUSB0
ISDN = off
Modem Type = USB Modem
Baud = 460800
Init = ATZ
Init2 = ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0
Init4 =
Phone1 =
Dial Prefix =
Dial Attempts = 1
Dial Command = ATM1L3DT
Ask Password = off
Auto Reconnect = off
Abort on Busy = off
Carrier Check = on
Check Def Route = on
Abort on No Dialtone = on
Stupid Mode = off
Idle Seconds = 0
Init3 = AT+CGDCONT=1,"IP","drei.at"
Password = drei.at
Username = drei.at
Phone = *99#
You could set Ask Password=on, but then you have trouble on reconnection, if you do not unplug the modem (BTW puupy has a nice lightwight fontend for wvdial, but there you have this problem - you have to do the pin out, before you connect a second time - like in the train)
I hope its clear and more complete
tazhw box
tazhw setup 3g-modem
tazhw wvdial
dmesg|tail
Fixed all the typos.Pin was saved like this: Init1 = AT+CPIN= 9624 one empty space to much
The APN was not changed and there was two Init1 - I will post the original output later
The script did close eth0 but the function was not invoked in the wvdial gui. Now, its fixed.then you did not close eth0 - at least I did not see it in resolve.conf
Similar scripts are now part of ppp pkgs. I have upgraded and updated all the relevant packages.
/etc/ppp/ip-up:
...
/etc/ppp/ip-down:
...
It looks like you're new here. If you want to get involved, click one of these buttons!