Tuesday, August 14, 2007

yarr... me be having bluetooth on me moko!*

Haven't done much with my moko lately... been pretty busy with other stuff, but I've got a new 2007.2 image just put on it and now I'm going to start tinkering again.

Randomish aside: uBoot does not work with the ALI/ULI USB controller in my Opteron 165, with or without hub.

I set up Bluetooth using a 2-part sequence... this script (run as root) starts bluetooth

echo "1" > /sys/bus/platform/devices/gta01-pm-bt.0/power_on
echo "1" > /sys/bus/platform/devices/gta01-pm-bt.0/reset
echo "0" > /sys/bus/platform/devices/gta01-pm-bt.0/reset
sleep 1
hciconfig hci0 up
passkey-agent --default 0000 &

and then i use

pand -c 00:16:CB:1A:A1:C0

to connect it to my macbook with pand up and running. i use a static network instead of dhcp, so i changed the bnep0 section of /etc/network/interfaces in my moko to this:

# Bluetooth networking
iface bnep0 inet static

(* - pirate references courtesy of Bluetooth The Pirate from woot.com's podcasts)

Unsolved things, many of which answered in the wiki, but I need to do 'em...

- The best way to get this script in at boot (I'm going to have to init.d-ify the first)

- And can it run pand to a macbook that isn't there? Then I can just turn it on and be able to connect and do shell stuff.

- Quickest way to get it to connect to a keyboard.

- Will the new Apple Bluetooth Keyboard talk HID? If so that'd be a nice laptop-size keyboard - but I already have a targus ;)

- How do i get it to do DUN using my Nokia 6103i/t-mo EDGE?
(not terribly useful without a bt keyboard running for terminals and gtk-webkit... but then it'll be like a Nokia 770/n800!)