BlueTooth: making connections

To me one of the most exciting aspects of the new NXT is BlueTooth. The ability to have a secure means of communication, and out of line-of-sight was something that was sorely lacking in the RCX. The first step is getting two (or more!) NXTs talking to each other. To be honest, this is in the user’s manual, p34-37, but a brief run-through might be useful.

Take two NXT bricks, and turn both of them on. Now use the BT menus to make sure both have BT turned on, and make sure both are “visible”. If you’ve never paired these NXT bricks with any other BT device, you will find the “Contacts” menu item seem to do nothing – there are no previous contacts recorded, so this menu is essentially blank (if you previously paired your NXT brick with a BT-capable computer, you’ll find at least one entry under “Contacts”, that of the computer itself).

On one of the NXT bricks, under the BT menu select the “Search” option. The NXT will search the local area for any recognizable BT devices, which may take a few seconds (note: if you do this at, say, NI Week, a major technical trade conference, where literally hundreds of folks are walking around with BT-equipped cell phones, laptops, and other devices… well, let’s just say I gave up waiting after awhile). After a while, the NXT pops up a list of the BT devices it has found. Select the other NXT brick from the list, and then connect on “[1]” (connection #1; you could use any connection, but for now I’ll stick with the default). The first time you do this, a “passkey” dialog will pop up on both NXTs; both of them have to accept the offered passkey (usually “1234” unless you really want to change it). Once you’ve done all this, you’ll see that the little “half-diamond” symbol in the status bar of the NXT bricks has changed to a “full diamond”, showing a BT connection. That’s it, the two NXTs are now linked via BT. If you want to follow the directions on pg37 of the user’s guide, you can now send files (but strangely not image files; I’ve no idea why that got left out) between the two NXTs.

By the way, the next time you want to connect these two NXTs, you don’t need to go through the whole searching and passkey circus. The NXT brick has obligingly recorded the name and status of the new BT device, so all you have to do to establish a connection next time is go right to the “Contacts” submenu, and select what NXT you’d like to connect to (and what connection to use). Handy.

Why did I bother walking through this, when it’s already in the user’s guide? Besides the fact that some people (none of the readers here, I’m sure) don’t actually read the entire user’s guide, I wanted to point out some quirks that become very important later. With the two NXTs connected via BT, take a look at the “Connections” menus on both of them. The one that you started the connection from (called the “master”) lists the other as on “[1]”, while the second NXT (call it the “slave”) lists the connection to the first as over connection #0 (“[0]”). Remember that – even though these two NXTs are connected to each other, they “see” the paired device on a different “connections”. Furthermore that initial NXT that you initiated the connection from has special standing; from it you can initiate other BT connection to other devices (like still more NXTs).

Brian Davis


Anonymous said…
i tried to use my Nokia 6310i to control NXT, but i dont know how to get it working... :(

Can someone help?
Tony Naggs said…
Hi anonymous

For a phone or PDA to control a NXT (over Bluetooth) it will need a program to be written and installed.

Lego Mindstorms web site is promising some software of this type is "coming soon":

Different phones and PDAs have different features, and are programmed in different languages.

Lego have pictures of a Nokia 3230 phone on both the NXT box and on the website. My guess is that Lego's software will be written in Java in order to potentially work on many phones and PDAs from different manufacturers. (An alternative would be a native application for Nokia Series 60 phones.)

The Nokia 6310i was one of the first Nokia models with both Bluetooth and Java. However it first shipped in late 2002, and I do not believe any Nokia phone allowed Java to access the Bluetooth until around mid-2004.

I am happy to be proved wrong. Nokia's website has a link to an online shop selling applications for the 6310i. However I cannot get the shop site to work in my web browser - so I cannot see if any of the programs use Bluetooth.

Anonymous said…
On another Bluetooth issue - Why can't I get more than 3 NXT's to be seen by my PC and swap between them to download programs?
Tony Naggs said…
> Why can't I get more than 3 NXT's to be seen by my PC and swap between them ..?

I do not have enough NXTs to reproduce your problem!

I guess the Bluetooth driver you have creates 3 COM ports when it is installed. Try configuring the software to create or use more.

With the Windows XP Bluetooth stack you can get to the configuration tools through the Control Panel.

I have old version of the Widcomm drivers on this PC. To configure it:
1. I click on the Bluetooth Icon near the clock display. (In the 'System Tray'.)
2. This open a Windows Exporer view of "My Bluetooth Places".
3. Right click on "My Device", and choose "properties" from the pop-up menu.
4. Find the property tab titled "Client Applications", there is a button labelled "Add COM port".

Please let us know whether this helps.

Anonymous said…
I have been using the Microsoft drivers as the Widcomm one wasn't working.

At school I can connect 6+ NXT's up to a Mac with no problem but when I try to do more than 3 on a PC there are all sorts of issues. Even 2 are guaranteed to work properly in communicating with the PCs.
Brian Davis said…
Like you, I've had numerous NXTs listed in the connections pane, and I can click on any of them to connect to that particular NXT (I think at one point I had more than a dozen NXTs listed). I can still only connect to *one* of them at a time out of the NXT-G environment (I'm running off a Mac iBook with built-in BT). Are you saying you can connect to more than one *at once*, or that multiple NXTs are listed in the connection pane? All that said, I still don't know why the platform makes a difference here.

Brian Davis
Anonymous said…
This is something that Lego advertise is different in the Educational NXT-G software - you are meant to be able to connect to multiple NXTs and download a program to them at the same time.

On the Macs we have there is no problem but as soon as we go into a PC lab you can get 2, sometime 3 NXTs connected. But the other problem is that you can have multiple NXTs on your list and swap between them to download or see their memory status etc. Again on Macs there is no problem but on the PCs you can only swap between 2 or 3 before you start getting probems
Anonymous said…
Is it possible to connect 6 NXT together?



A will be conneted to B,C,D
B will be connected To E,F
A can communicate to E and F by sending B a Mail and B will sort of 'Divert' it.. i tried it...
i can get the connection right..
but when i run the program the NXT B will automatically lose Either its connection to A or Connection to E and F can any 1 help me out?
i need this urgently for a competition thx
Anonymous said…
where would I find the software for windows PDA to connect to the NXT?
Unknown said…
Can you use bluetooth to syncronise programs on two separate NXTs? Like making a traffic intersection.
Anonymous said…
I have a programming problem. I use NXT-G and I have two NXT's
(since yesterday). I want to make a program so I can control a robot
with my other NXT. How do I do this? I've looked at the bluetooth block
but I have no clue how it works. Can you tell a bit about the bluetooth
block and how I can use it to control my robot by bluetooth by another
robot. Thanks already, Alex

Popular Posts