The time now is Wed 22 May 2013, 06:44
All times are UTC - 4 |
| Author |
Message |
HairyWill

Joined: 26 May 2006 Posts: 2949 Location: Southampton, UK
|
Posted: Wed 20 Feb 2008, 05:48 Post subject:
mobile phone gprs connection Subject description: nokia 6230i, DKU2 usb lead, vodafone uk, pay as you go |
|
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: | #!/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 .
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: community website, screenshots, puplets, wiki, rss
|
|
Back to top
|
|
 |
mbutts

Joined: 11 Nov 2006 Posts: 231 Location: sitn on an iceburg waiting for my next meal to swim by.
|
Posted: Wed 20 Feb 2008, 08:22 Post subject:
|
|
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.
 
|
|
Back to top
|
|
 |
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You can download files in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|