mobile phone gprs connection

How to do things, solutions, recipes, tutorials
Post Reply
Message
Author
User avatar
HairyWill
Posts: 2928
Joined: Fri 26 May 2006, 23:29
Location: Southampton, UK

mobile phone gprs connection

#1 Post by HairyWill »

I got this working this morning and thought I would post the script in case it helps anyone else (and so I don't lose it :-) )

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\"
good source for settings
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 :shock: .

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.
Will
contribute: [url=http://www.puppylinux.org]community website[/url], [url=http://tinyurl.com/6c3nm6]screenshots[/url], [url=http://tinyurl.com/6j2gbz]puplets[/url], [url=http://tinyurl.com/57gykn]wiki[/url], [url=http://tinyurl.com/5dgr83]rss[/url]

User avatar
mbutts
Posts: 230
Joined: Sat 11 Nov 2006, 13:36
Location: sitn on an iceburg waiting for my next meal to swim by.

#2 Post by mbutts »

Is this the kind of program you are looking for?
I think they show it monitoring eth0.
http://www.linux.com/articles/61201

Thanks for sharing your script! I hope more people will share them for cell phones. No doubt more people will use them if they know how to set them up for each model.
I see you got it to work with 2.14r, have you tried it or are you going to try it on any other version of Puppy?

Oh, btw, here is the graphical interface that someone made for it.
http://www.sqweek.com/sqweek/index.php?p=1
It looks pretty cool.
Penguin, the OTHER white meat.
[url=http://www.puppyos.com][img]http://img293.imageshack.us/img293/5563/yxudnslbsx1jpglx3.png[/img][/url][img]http://i18.tinypic.com/2wd7o80.gif[/img]

Post Reply