Digital Finds

joseph dot reeves at thehumanjourney dot net
@iknowjoseph

GPRS on the FreeRunner

Jun 09, 2008 by Joseph Reeves

Setting up mobile internet on these phones is much harder than it should be, and I know it presents people with troubles. Unfortunately the instructions on the wiki aren't very helpful and served only to confuse me. Of course, for a (currently) developer / very early adopter targeted phone running Linux, difficulty is to be expected, but as we move quickly towards consumer readiness, this sort of thing will need to work. This would preferably be out of the box and for any network, but for now we can provide a pre-configured service to Vodafone UK users at least.

Marcus Bauer produces TangoGPS, he also helps me a lot on a range of Openmoko subjects including getting GPRS to work. Below then are the details required for Vodafone UK (monthly contract only, Pay As You Go users have different details). These files can be edited for use with other providers.

Note: Marcus contributed all the technical details here and should take any credit that's going. Any mistakes reproduced below were entered by myself whilst creating a Vodafone specific implementation.

Note 2: Whilst GPRS is enabled, voice calls will be disabled. I'm told that a gsm mixer is in development that will allow gsmd to continue to run whilst GPRS in in use.

Create the files below and run p from the command prompt.



/usr/bin/p (don't forget to chmod 700)
----------
#!/bin/sh
killall -9 gsmd #don't shut down, just kill
sleep 1
pppd debug nodetach call vodafone



/etc/ppp/chap-secrets
---------------------
web * web



/etc/ppp/chat-vodafone
--------------------
'' ATZ OK
AT+CGDCONT=1,"IP","internet"
OK "ATD*99***1#"
CONNECT ''



/etc/ppp/peers/vodafone
---------------------
/dev/ttySAC0
115200
connect '/usr/sbin/chat -v -s -f /etc/ppp/chat-vodafone'
remotename web
noauth
noipdefault
usepeerdns
show-password
defaultroute
replacedefaultroute
user web
ipcp-accept-local
ipcp-accept-remote
local
nodeflate
nodetach
debug



You'll know it's worked if it produces an output such as:

root@om-gta02:~# p
send (ATZ^M)
expect (OK)
^M
OK
-- got it


send (AT+CGDCONT=1,"IP","internet"^M)
expect (OK)
^M
^M
OK
-- got it


send (ATD*99***1#^M)
expect (CONNECT)
^M
^M
CONNECT
-- got it


send (^M)
Serial connection established.
using channel 1
Using interface ppp0
Connect: ppp0 <--> /dev/ttySAC0
sent [LCP ConfReq id=0x1 ]
rcvd [LCP ConfRej id=0x1 ]
sent [LCP ConfReq id=0x2 ]
rcvd [LCP ConfAck id=0x2 ]
rcvd [LCP ConfReq id=0x1 ]
sent [LCP ConfAck id=0x1 ]
rcvd [CHAP Challenge id=0x1 , name = ""]
sent [CHAP Response id=0x1 , name = "web"]
rcvd [CHAP Success id=0x1 ""]
CHAP authentication succeeded
sent [IPCP ConfReq id=0x1 ]
rcvd [IPCP ConfReq id=0x1]
sent [IPCP ConfNak id=0x1 ]
rcvd [IPCP ConfRej id=0x1 ]
sent [IPCP ConfReq id=0x2 ]
rcvd [IPCP ConfReq id=0x2]
sent [IPCP ConfAck id=0x2]
rcvd [IPCP ConfNak id=0x2 ]
sent [IPCP ConfReq id=0x3 ]
rcvd [IPCP ConfAck id=0x3 ]
Could not determine remote IP address: defaulting to 10.64.64.64
replacing old default route to usb0 [192.168.0.200]
local IP address 10.57.222.187
remote IP address 10.64.64.64
primary DNS address 10.205.65.68
secondary DNS address 10.205.65.68
Script /etc/ppp/ip-up started (pid 1506)
Script /etc/ppp/ip-up finished (pid 1506), status = 0x0


You can then do exciting stuff, such as read my blog, or much more interesting things such as the TangoGPS friends service.



Comments:

I use my neo as a GPRS router and the ppp package is installing pon and poff. This means you can get rid of your p script. Besides that my setup is pretty similar (besides having iptables for my router setup).

Posted by zecke on June 10, 2008 at 08:34 PM BST #

Can you please comment those configuration scripts? So they would be more useful when trying to use a different GPRS provider, or different settings?

Posted by Ignas on June 12, 2008 at 04:51 AM BST #

Post a Comment:
Comments are closed for this entry.