Connecting to NXT Brick via Processing over Bluetooth I am attempting to control my NXT model via the Processing programming language rather than the provided language based on LabView. When I can establish a connection over Bluetooth, this works rather well, but establishing the connection itself is problematic. It appears to work only every dozen tries or so.

My question is, what are some good troubleshooting steps for this type of activity? I can see the NXT brick in my list of Bluetooth devices on my laptop (Win7 64-bit), and I can even see it in the list of devices when I run a test script in Processing. My laptop appears on the list of devices on my NXT brick, but the connection icon at the top of the NXT window only shows "&lt;" rather than "&lt;>".

I believe I am using the latest firmware version (1.31). The other settings listed are:

AVR &amp; BC4 - 1.01

What else can I attempt to try? I am attempting to connect to other Bluetooth devices (iPhone, Wiimote) but have not found the necessary libraries to allow those connections yet.
You can use any programming language you like to remotely control the NXT provided that it can access a serial port of your computer. The Bluetooth connection on the NXT provides a virtual serial port. You can see this by opening "Devices and  Printers" and double-clicking on the NXT (provided that you have already paired it). Then have a look at the "Services" tab in the window that opens.



In the screenshot above, my NXT provides a serial port on COM4. Yours may be a different number.

So you need to do two things:


Figure out how to open a COM port on Windows using the Processing programming language.
Use the information in the NXT Bluetooth Developer Kit (available from the LEGO MINDSTORMS download page) to send commands to your NXT.


To use other Bluetooth devices with your NXT, you will need to relay the information though a computer to translate it into the commands from the NXT Bluetooth Developer Kit. In the case of the iPhone, you could write a custom program just as you would for a regular computer.