why unix | RBL service | netrs | please | ripcalc | linescroll
hosted services

hosted services

Linux ppp 3g/gprs with nokia/o2/3(three)

This article describes the steps required for configuring the IP and dial up with a Nokia phone.

pairing

This is the part which really confused the heck out of me. The main reason for this is that from what I can tell, both the computer and the phone device have to be in agreement for communication, rather than with client/server devices you normally only have the provide authentication from the client side (think of SMTP Auth) and such. The challenge is from the server to the client.

With the bluetooth phone the part which I failed to think about was how auth, but this was solved by setting a pin helper in the hcid.conf file (see below).

Really, once this was configured the rest of the setup was just a matter of putting the right chat script in place - the easy part. finding the device

Use hcitool. This is a rather easy program to use, it just searches for bluetooth devices. Use it like so:

hcitool scan

It outputs devices much like an arp -a command. Nothing special here. If you can identify your device then use

sdptool browse 00:1D:E9:13:73:3A

Where 00:1D:E9:13:73:3A is the address of your device. You must find the dial up networking service and then make a note of the channel that it uses, this is required later for the rfcomm configuration. chat

This script (/etc/ppp/peers/o2) is started when the user runs pon o2. This script itself starts chat-o2 once it has finished it’s work bringing up the connection. I have hard coded the speed of the connection to 3686400, which I thought sufficient, at 64 times the speed of 56k6 - unlikely to be reached on E/GPRS at the current coverage in my area!

/dev/rfcomm0
3686400
noipdefault
usepeerdns
defaultroute
persist
noauth
connect '/usr/sbin/chat -v -f /etc/ppp/chat-o2'

These scripts issue commands that treat the phone like a modem.

TIMEOUT 5
ECHO ON
ABORT 'nBUSYr'
ABORT 'nERRORr'
ABORT 'nNO ANSWERr'
ABORT 'nNO DIALTONEr'
ABORT 'nRINGINGrnrnRINGINGr'
'' rAT
TIMEOUT 30
# this next line is extra for O2
OK AT+CGDCONT=1,"IP","mobile.o2.co.uk"
OK ATE1
OK ATD*99***1#
TIMEOUT 30
CONNECT ""

The important data here is that the mobile.o2.co.uk parameter is used. The author remembers a time when putting ATA+++ into some page data would force the modem to reset mid transfer.

ppp connection details for three

/etc/ppp/chat-3-usb:

TIMEOUT         5
ECHO            ON
ABORT           '\nBUSY\r'
ABORT           '\nERROR\r'
ABORT           '\nNO ANSWER\r'
ABORT           '\nNO DIALTONE\r'
ABORT           '\nRINGING\r\n\r\nRINGING\r'
''              \rAT
TIMEOUT         30
# this next line is extra for O2
OK              AT+CGDCONT=1,"IP","3internet"
OK              ATE1
OK              ATD*99#
TIMEOUT         30
CONNECT         ""

/etc/ppp/peers/3-usb

/dev/ttyUSB0
921600
noipdefault
usepeerdns
defaultroute
persist
noauth
connect '/usr/sbin/chat -v -f /etc/ppp/chat-3-usb'

The above looks pretty much the same as for o2.

I hope this has been of some use to others. Remember that pairing the device is perhaps the most complex part of this process when setting up pins, if you are in any doubt then set both sides of the connection to use the same pin. Once complete hide both devices if required.