===================================================================== Basic Instruction to pair NXT and USB Bluetooth ===================================================================== This will pair the device togethor and create a the host machine will listen to the NXT via /dev/rfcomm0 ** This was taken from ** http://www.jstuber.net/lego/nxt-programming/bluetooth-linux.html 1) Plug in the USB Bluetooth 2) On the command line: ------------------------------------------------------------ # sdptool add --channel=3 SP Serial Port service registered # rfcomm listen /dev/rfcomm0 3 Waiting for connection on channel 3 ------------------------------------------------------------ 3) Turn on the NXT i)Go to Bluetooth ii) Go to Search, this may take a minute or so iii) Select the host name of the machine you are working on iv) Select 3 v) Use the default passkey, 1234 4) On the machine you should see: ------------------------------------------------------------ Waiting for connection on channel 3 Connection from 00:16:53:02:96:EE to /dev/rfcomm0 Press CTRL-C for hangup ------------------------------------------------------------ 5) To see the output of a NXT bluetooth program. Open another terminal window and : ------------------------------------------------------------ # cat /dev/rfcomm0 | od -t x1 -w1 -v -Ax ------------------------------------------------------------ ===================================================================== Useful commands ===================================================================== hcitool, rfcomm, sptool, rfcomm With the NXT bluetooth on, and the USB bluetooth plugged in. Test if USB Bluetooth is detected: ------------------------------------------------------------ # hciconfig hci0: Type: USB BD Address: 00:18:E7:36:24:12 ACL MTU: 1017:8 SCO MTU: 64:0 UP RUNNING PSCAN RX bytes:2034 acl:17 sco:0 events:58 errors:0 TX bytes:799 acl:17 sco:0 commands:34 errors:0 ------------------------------------------------------------ Test if the host machine can see the NXT via bluetooth ------------------------------------------------------------ # hcitool scan Scanning ... 00:16:53:02:96:EE Delta ------------------------------------------------------------ ===================================================================== Other pages of interest: ===================================================================== NBC, nxt compiler: http://bricxcc.sourceforge.net/nbc/ I have no tried out the ones below, but I thought the might be of interest Linux API uses bluez bluetooth api's: http://alumni.ipt.pt/~pmad/nxt.php A NXT Bluetooth library in C for linux (this one seems more up-to-date): http://www.quietearth.us/nxtlibc.htm Using Nxt Perl API and bluetooth: http://nxt.ivorycity.com/index.php?/archives/3-How-to-get-started-with-Linux-Bluetooth-and-the-NXT.html NXT Python package: http://home.comcast.net/~dplau/nxt_python/index.html =====================================================================