knuth - I have had another look through my scripts, and I realised that I forgot about something. pand needs the bnep module to be loaded, and this does not always happen automatically for some reason - do \'lsmod\' from the console to check whether it is or not. If it does not appear on the list, do:
modprobe bnep
as root to load it, and then try pand again. You can also control which bnep interface is used with the -i argument to pand. For reference, here are the scripts that I use to connect to my PC:
#!/bin/bash
/home/QtPalmtop/bin/bton
# Set this to the Bluetooth address to connect to
baddr=XX:XX:XX:XX:XX:XX
# Set this to the IP number of the zaurus, or the name you have attached
# to the number in /etc/hosts, if applicable.
thishost=111.222.333.444
if=bnep0
# Check that we are not already connected
lsmod | grep -q ^bnep && pand -l | grep -q "$if *$baddr" && exit
/usr/bin/sudo modprobe bnep
sleep 2
# -d form of --service does not always work
# Is it valid to specify bnep0 here?
# pand always seems to return 0, even if it fails
/usr/bin/sudo pand -i $if -r PANU --service GN -c $baddr -n
pand -l | grep -q "$if *$baddr" &&
/usr/bin/sudo ifconfig $if $thishost
where /home/QtPalmtop/bin/bton just ensures that Bluetooth is on:
#!/bin/bash
if [ ! -e /var/lock/subsys/bluetooth ]; then
cardctl ident |
grep -q \'product info: "Socket", "CF+ Personal Network Card Rev 2.5"\'
|| exit
cardctl status | grep -q suspended && cardctl resume
/usr/bin/sudo /etc/rc.d/init.d/bluetooth start 2>&1 >/var/log/bt.txt
fi
Edit this for your own card\'s cardctl info.
The corresponding scripts to disconnect and turn bluetooth off are:
#!/bin/bash
/usr/bin/sudo pand -k XX:XX:XX:XX:XX:XX
and
#!/bin/bash
if [ -e /var/lock/subsys/bluetooth ]; then
/usr/bin/sudo pand -K
/usr/bin/sudo killall pand
/usr/bin/sudo modprobe -r bnep
/usr/bin/sudo /etc/rc.d/init.d/bluetooth stop 2>&1 >/var/log/bt.txt
fi
I also use the bluez suspend/resume scripts that are referred to in tumnus\' howto.
I think that covers everything that I did to get this working.
Good luck,
P.