Sign up ×
LEGO® Answers is a question and answer site for LEGO® and building block enthusiasts. It's 100% free, no registration required.

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 "<" rather than "<>".

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

AVR & 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.

share|improve this question
Are you in close proximity to a wireless device (2.4 GHz)? Both bluetooth and wifi use the same frequency spectrum, so a conflict between the two may be a reason why you're having connectivity difficulties. – Nick2253 Sep 19 '12 at 22:47
Ha! I missed the `12. Thought you asked this today. ;-) – David Lechner Jun 23 at 17:59

1 Answer 1

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:

  1. Figure out how to open a COM port on Windows using the Processing programming language.
  2. 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.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.