Code: Select all
#!/bin/sh
rxvt -e tail -f /var/log/messages &
echo "/dev/ttyACM0
115200
noauth
defaultroute
usepeerdns
persist
noipdefault
lock
connect '/usr/sbin/chat -v -f /etc/chatscripts/vodafone-chat'" > /etc/ppp/peers/vodafone
chmod 777 /etc/ppp/peers/vodafone
mkdir -p /etc/chatscripts/
echo "ABORT ERROR
ABORT RING
ABORT BUSY
ABORT \"NO CARRIER\"
ABORT VOICE
ABORT \"NO DIALTONE\"
ABORT \"NO ANSWER\"
REPORT CONNECT
\"\" \"ATZ\"
OK AT+CGDCONT=1,\"IP\"
OK ATDT*99#
TIMEOUT 60
CONNECT \c" > /etc/chatscripts/vodafone-chat
chmod 777 /etc/chatscripts/vodafone-chat
[ ! -c /dev/ttyACM0 ] && mknod /dev/ttyACM0 c 166 0
chmod go+w /dev/ttyACM0
modprobe cdc-acm
#Make sure that dns server addresses get written to /etc/resov.conf
#I have no idea if this is the 'correct' way to do this
rm /etc/ppp/resolv.conf
ln -s /etc/resolv.conf /etc/ppp/resolv.conf
pppd call vodafone
echo "press return to kill connection"
read
killall pppd
# OK AT+CGDCONT=1,\"IP\",\"pp.vodafone.co.uk\"
http://www.filesaveas.com/mobilefaq.html
and specifically
http://www.filesaveas.com/vodafone.html
notes
I had this working in a clean 2.14R with no modifications.
When I connected the lead my phone asked if I wanted to use it as a data storage device, I said no.
I think that GPRS must be enabled by your network provider, I just called them and said that I wanted gprs web access.
I had a lot of problems with my phone reporting "GPRS connnection not enabled" or similar. This was connected to this dial string
OK AT+CGDCONT=1,\"IP\"
Previously I used the commented out string at the bottom to specify an access point and I had the access point wrong. Removing the end of the line that did say
,\"pp.vodafone.co.uk\"
fixed the problem. I presume this just then uses the default provided by the phone. I have also tried monkeying around with the access point name on the phone and it doesn't seem to matter what I use there .
I hope this helps someone and if anyone knows a good program for monitoring my bandwidth usage please shout. Vodafone currently offers the first 15MB for 1 UKP per day and 1 UKP for each MB over 15. That seems like a real sneaky charging scheme. Still I only ever have 15UKP credit so its never going to hit me too hard.