See also "Useful AT commands for 8210" below.
<disclaimer>I'm quite confident that this will work with most IR-capable GSM phones that can emulate a Hayes modem, and most ISPs that do PAP, but i have only tested it with an 8210 against Tele2 in Sweden. </disclaimer>
Make sure that /etc/nsswitch.conf contains something like
passwd: files group: files hosts: files dns networks: files rpc: files netmasks: files ...Several ISPs uses an M$-feature, which the PPP deamon can utilize (option usepeerdns) to create a resolv.conf in /etc/ppp, so make a symbolic link in /etc:
ln -s /etc/ppp/resolv.conf /etc/resolv.conf
Next, you need a chat-script that will do the dialling. My ISP uses PAP, so it is quite easy:
ABORT "BUSY" "" "\d" "" "ate1" "" "atz" OK "atdt???????" CONNECTNote the "ate1" send-string, which turns on echo. My Nokia 8210 seemed to have echo off by default. The ???'s in the script should be replaced by the phone number to your ISP
Using PAP, also means that you have to have an /etc/ppp/pap-secrets file. I like to generate mine on the fly, so that if my iPAQ gets in the wrong hands, my password will still be safe. This is the format of the pap-secrets file:
[user] [server] [password]Since you probably don't know what server will pick up your call, a '*' in the server field is a good idea.
Finally, you need to call 'pppd' with a bunch of options. A script like :
#!/bin/sh echo -n user: read PPPUSERNAME echo -n password: read PPPPASSWORD echo $PPPUSERNAME' * '$PPPPASSWORD > /etc/ppp/pap-secrets pppd /dev/ircomm0 115200 \ defaultroute usepeerdns \ nocrtscts noauth local lock \ connect ´chat -f /etc/ppp/chatfile' \ user $PPPUSERNAME sleep 15 # wait for a connection ifconfig | grep -A 6 ppp # show the connection sleep 15 # wait some more rm /etc/ppp/pap-secrets # remove the file containing your passwordwill do the trick.
Note: v0.02 of the familiar images do not have the /var/lock directory, so pppd will exit with an error message. Create this directory, and then run the script /root/backupToFlash (which is not bulletproof either, btw. To ensure flash writing, umount /usr/local before cutting power.)
To disconnect the PPP connection, I just hang up the phone or pull it out of reach from the iPAQ's IR eye. pppd will clean up once it times out.
If you have a kernel that does not initialize /dev/ttySA2 (> 2.4.7):
insmod irda insmod ircomm insmod ircomm-tty insmod sa1100_ir sleep 1 ifconfig irda0 up echo '1' > /proc/sys/net/irda/discovery
If you have ttySA2 (<= 2.4.3)
modprobe ircomm-tty modprobe irtty irattach /dev/ttySA2 -s &
You need some kind of terminal emulator for this. Minicom works, and can be snarfed from debian-unstable for arm.
AT+CPBS="SM" _or_ AT+CPBS="ME"