howto dialup gprs over bloetooth How I configured my iPAQ H3970 to dial up GPRS over bluetooth with a Sony Ericsson T68i. Installed familiar 0.7 stable GPE Linux See http://www.handhelds.org/ Pin code changed pin code in /etc/bluetooth/pin echo "123456" > /etc/bluetooth/pin It might be good to use a more secret pin code of your own here. rebooted ipaq for this to take effect (but reboot is probly not needed). Turn radio on I turn radio on by using the bluetooth icon on the panel (lower right on the iPAQ display) I got a tips from Chris Ottrey that this will turn radio on from command line: /etc/bluetooth/hciattach Whichever way you do it the blue LED on the iPAQ should now start flashing Pairing Now when the radio is on and the pin code is set it is possible to initiate pairing from the mobile phone. Information needed You will need some information. Give the following commande and keep the result. hcitool dev Make your mobile phone discoverable. Scan for other bluetooth units: hcitool scan You should get the bd address and name of your mobile phone. Check if phone give DUN service: sdptool search --bdaddr DUN where is the bd address of your mobile phone given from hcitool scan. In my case: sdptool search --bdaddr 00:80:37:E9:25:B5 DUN Device node Create a node to be used when communicating with the DUN service. mknod -m 666 /dev/rfcomm0 c 216 0 rfcomm bind 0 where is the bd address of your mobile phone given from hcitool scan. is the channel given from sdptool, probably 1. In my case it it looked like this: rfcomm bind 0 00:80:37:E9:25:B5 1 mknod -m 666 /dev/rfcomm0 c 216 0 Another check Just some more check (not really needed if you are sure) hciconfig HCI should find a device callded hci0 and give some info about it. Setting up ppp Create some scripts and configuration files. The cuts here are including a cat command so they can be cut from here and pasted into a command shell. If you wish to use an editor instead then skip first and last line. First a file telling pppd which files to use. The following tells pppd where the ppp options are, which script to use for dialing and the option file for that dialing script: ---------------- cut and paste from here ---------------- cat > /etc/ppp/peers/gprsbt << EOF file /etc/ppp/options.gprs connect "/usr/sbin/chat -f /etc/ppp/chat.gprs" EOF ------------------------ end cut ------------------------ The options file for pppd may look like this: ---------------- cut and paste from here ---------------- cat > /etc/ppp/options.gprs << EOF # pppd shall not propose IP address to other peer. noipdefault # Accept peers idea of address ipcp-accept-local # Add default route defaultroute EOF ------------------------ end cut ------------------------ The chat script should exist already but the options file for the chat script may look like this: ---------------- cut and paste from here ---------------- cat > /etc/ppp/chat.gprs << EOF ABORT "BUSY" "" "\d" SAY "reseting modem\n" "" "atz" SAY "connecting\n" OK 'AT+CGDATA="PPP",1' SAY "dialing\n" CONNECT "atdt*99***1#" TIMEOUT 60 SAY "connected\n" EOF ------------------------ end cut ------------------------ Now a connection can be made: pppd /dev/rfcomm0 lcp-echo-interval 0 call gprsbt Test with ping or something. That all to it! Well at least until you reeboot. I made a script for binding rfcomm0 to the DUN in my phone. NOTE! This file needs to contain hw adresses uniqe for each user. So first change and below to that of your phone then just cut and paste: ---------------- cut and paste from here ---------------- cat > /etc/init.d/bind_dun << EOF rfcomm bind mknod -m 666 /dev/rfcomm0 c 216 0 EOF ------------------------ end cut ------------------------ In my case it looked like this: ---------------- cut and paste from here ---------------- cat > /etc/init.d/bind_dun << EOF rfcomm bind 0 00:80:37:E9:25:B5 1 mknod -m 666 /dev/rfcomm0 c 216 0 EOF ------------------------ end cut ------------------------ You must run this script after each reboot as root. Luckily you probably don't reboot iPAQ that very often. chmod +x /etc/init.d/bind_dun And one script for initating a connection. ---------------- cut and paste from here ---------------- cat > /usr/bin/gprsbt << EOF pppd /dev/rfcomm0 lcp-echo-interval 0 call gprsbt EOF ------------------------ end cut ------------------------ chmod a+x /usr/bin/gprsbt Then when you wish to dial up you turn radio on and run gprsbt. You do not need to be root to do this. But try to remember to turn radio on (both iPAQ and phone) first. To terminate connection I turn radio off. Conclution At least the above worked for me. If it does not work for you you can find the full story on how I did this on my iPAQ at: http://www.eit.se/hb/misc/text/linux_on_ipaq.txt Perhaps the links there can give you some help. Henrik Bjorkman www.eit.se/hb Copyright Henrik Bjorkman. May be redistributed as under GPL.