Home > Hacking, Linux, Mobiles > Nokia GPRS with Linux iPAQ

Nokia GPRS with Linux iPAQ

September 17th, 2007 Leave a comment Go to comments

If you have an iPAQ installed with famil­iar Linux and want it to con­nect to the net using your Nokia mobile via GPRS; then this is how you do it.

Work In Progress, (sorry it’s a bit sparse and hur­ried, but it’ll give you the gen­eral idea).

I haven’t used this method for a while, but just started play­ing with my iPAQ again, some­where between then and now it stopped work­ing. Appar­ently Tel­stra have made some changes to their APNs. So I’ve updated this page to reflect the changes.

1. Create/modify a cou­ple of files.

Note: Tel­stra have changed their APN, (Access Point Num­ber), since I last tried this.

File: /etc/ppp/peers/gprs

nodetach
defaultroute
nocrtscts
lock
noauth
# lcp-echo-interval 5
# lcp-echo-failure 3
usepeerdns
230400
local
asyncmap 0
connect /etc/ppp/peers/gprs.chat.connect
disconnect /etc/ppp/peers/gprs.chat.disconnect

File: /etc/ppp/peers/gprs.connect

#!/bin/sh
exec chat TIMEOUT 5 \
ECHO ON \
ABORT 'nBUSYr' \
ABORT 'nERRORr' \
ABORT 'nNO ANSWERr' \
ABORT 'nNO CARRIERr' \
ABORT 'nNO DIALTONEr' \
ABORT 'nRINGINGrnrnRINGINGr' \
'' \
rAT TIMEOUT 12 OK \
ATH OK \
'ATDT+cgdcont=2,"IP,"telstra.internet"\n' '' \
AT OK \
'ATDT*99#' TIMEOUT 22 CONNECT \
"" SAY " - Connected."

File: /etc/ppp/peers/gprs.disconnect

#!/bin/sh

exec /usr/sbin/chat -V -s -S \
ABORT "BUSY" \
ABORT "ERROR" \
ABORT "NO DIALTONE" \
"" "K" "" "K" "" "K" "" "+++ATH" "" "+++ATH" "" "+++ATH"

File: /etc/bluetooth/givepin

#!/bin/sh
echo 'PIN:2222'

File: /etc/bluetooth/hcid.conf

options {
        autoinit yes;
        security auto;
        pairing multi;
        pin_helper /etc/bluetooth/givepin
}

device {
        name "iPAQ";
        class 0x120112;
        lm accept;
        iscan enable;pscan enable;
        lp rswitch,hold,sniff,park;
        encrypt enable;
}

2. Pair the phones together.

Get the Nokia to scan for blue­tooth devices, and use the PIN that you used in the givepin file to pair the iPAQ found to your Nokia.

3. Cre­ate the GPRS connection.

From your iPAQ you can access your phone and con­nect to GPRS using the following:

dund --nodetach --encrypt --connect 42:42:42:42:42:42 --channel 3 call gprs

Replace 42:42:42:42:42:42 with your mobile phone’s address. To find this you can use hci­tool to scan for it.

root@nowhere % hcitool scan
Scanning ...
        00:42:A0:42:26:42  Nokia N70
        00:16:42:DC:42:B8 AUSYDN000649
        42:42:42:42:42:42  I'm right behind you
        00:15:42:DB:42:24  n/a

No related posts.

Categories: Hacking, Linux, Mobiles Tags:
  1. No comments yet.
  1. No trackbacks yet.
You must be logged in to post a comment.