2011-06-26

Bluetooth and NXT setup

A reminder for myself on how to configure bluetooth for NXT devices.

Turn on all devices and activate bluetooth on the Linux, then:
$ hcitool scan
Scanning ...
00:16:53:08:XX:XX Julie
00:16:53:0B:XX:XX Mercedes

Then configure /etc/bluetooth/rfcomm.conf like this:
$ cat /etc/bluetooth/rfcomm.conf
rfcomm0 {
bind yes;
device 00:16:53:0B:XX:XX;
channel 1;
comment "Mercedes";
}

rfcomm1 {
bind yes;
device 00:16:53:08:XX:XX;
channel 1;
comment "Julie";
}

Then check the binding (as root):
# rfcomm release all && rfcomm bind all && rfcomm
rfcomm0: 00:16:53:0B:XX:XX channel 1 clean
rfcomm1: 00:16:53:08:XX:XX channel 2 clean

Then create an nxt.dat file in ~ :
$ cat /home/paul/nxt.dat
BTH::JULIE=BTH::JULIE::00:16:53:08:XX:XX::5
BTH::MERCEDES=BTH::MERCEDES::00:16:53:0B:XX:XX::5

Then compile and download to the NXT:
nbc foo.nbc -O=bar.rxe
nbc -b -d -S=BTH::Julie bar.rxe

No comments: