To LUGNET HomepageTo LUGNET News HomepageTo LUGNET Guide Homepage
 Help on Searching
 
Post new message to lugnet.robotics.nxtOpen lugnet.robotics.nxt in your NNTP NewsreaderTo LUGNET News Traffic PageSign In (Members)
 Robotics / NXT / 69
Subject: 
Re: NXT Robot Swarm at BrickFest -- featuring Bluetooth
Newsgroups: 
lugnet.robotics.nxt
Date: 
Fri, 11 Aug 2006 02:09:18 GMT
Viewed: 
11819 times
  
The spec says that at most three other Bluetooth units may be connected to each NXT unit for any given program, but with proper setup one unit could act as a message-passing server for all the others in a swarm, or a simple broadcast relay protocol could be designed to pass messages on through an arbitrary ad-hoc chain of NXT units. With too many units in the same place, radio interference would become a problem, but even if the swarms were only four units big, it would certainly be cool just to try out what a small team of NXT units could do in some sort of competition, task-oriented problem-solving or just plain swarming.

I’m not going to BrickFest, but I would be happy to see this happen. It would be very useful for a course on AI programming and interactive systems this spring at the university where I work. If I’m lucky and I can present a good a plan for what to do with them, I might be allowed to buy 10 NXT kits on my employer’s expense and design advanced lab assignments around them. :D

Stefan G


Subject: 
Re: NXT Robot Swarm at BrickFest -- featuring Bluetooth
Newsgroups: 
lugnet.robotics.nxt
Date: 
Fri, 11 Aug 2006 13:26:03 GMT
Viewed: 
11839 times
  
In lugnet.robotics.nxt, Stefan Gustavson wrote:

   The spec says that at most three other Bluetooth units may be connected to each NXT unit for any given program, but with proper setup one unit could act as a message-passing server...



The problem (I think; somebody want to prove me wrong?) is that the “master” NXT can send messages to at most three “slave” NXTs, but the “slaves” can not then act as BT masters to still more units. In other words, it seems very very easy to link four NXT together via BT, but very difficult to extend this using single NXT units. You could dynamicly switch the BT net around if a NXT-G program could set up new BT connections on its own, but this is a functionality that you do from the menu system. I’m certain there’s a way to do it - but I’ve not found it yet in NXT-G. Then again, most of us don’t have 4+ NXT units to play with (OK, almost none of us), so it may be interesting to see what gets learned at BrickFest.

-- Brian Davis


Subject: 
Re: NXT Robot Swarm at BrickFest -- featuring Bluetooth
Newsgroups: 
lugnet.robotics.nxt
Date: 
Fri, 11 Aug 2006 17:47:45 GMT
Viewed: 
12173 times
  
It’s good that people are interested!

With the RCX couldn’t you just have a robot broadcast a message to anything that could see the IR signal and was waiting for specific messages to arrive? Can a similar thing be done with BT?

Would we be better off waiting until BrickFest and playing around with the programming then, or try to do some of it ahead of time? Like you said, almost no one owns 4+ NXTs (I just own one), and this is also why I thought BrickFest was a perfect place to try it.


Subject: 
Re: NXT Robot Swarm at BrickFest -- featuring Bluetooth
Newsgroups: 
lugnet.robotics.nxt
Date: 
Fri, 11 Aug 2006 18:18:35 GMT
Viewed: 
12270 times
  
On Fri, August 11, 2006 1:47 pm, Jordan Bradford wrote:
   It’s good that people are interested!

With the RCX couldn’t you just have a robot broadcast a message to anything that could see the IR signal and was waiting for specific messages to arrive? Can a similar thing be done with BT?

Would we be better off waiting until BrickFest and playing around with the programming then, or try to do some of it ahead of time? Like you said, almost no one owns 4+ NXTs (I just own one), and this is also why I thought BrickFest was a perfect place to try it.

Jordan,

I think swarming would be very fun to explore, but, for me, there isn’t enough time before BF.

Here’s something you could play around with before BF: http://news.lugnet.com/events/brickfest/?n=3514

Start by getting your robot to follow the line on the test pad.

To answer your question, the NXT can NOT broadcast a message. It only sends to a specific target.

Hopefully, there will be other bluetooth stuff we (you) can play with at BF.

Steve


Subject: 
Re: NXT Robot Swarm at BrickFest -- featuring Bluetooth
Newsgroups: 
lugnet.robotics.nxt
Date: 
Fri, 11 Aug 2006 23:17:50 GMT
Viewed: 
12277 times
  
On 8/11/06, Brian Davis <brdavis@iusb.edu> wrote:
   The problem (I think; somebody want to prove me wrong?) is that the "master"
NXT can send messages to at most three "slave" NXTs, but the "slaves" can not
then act as BT masters to still more units. In other words, it seems very very

As I was working on my ruby-nxt module, I managed to get the nxt to
connect to my laptop as both a master and a slave.  On my laptop (a
MacBookPro) I created an incoming bluetooth serial port and an
outgoing serial port on the DEV-B device service on the NXT.  I then
initiated a connection from the NXT to the laptop on Connection 1 and
then initiated a connection from my laptop to the NXT on the DEV-B
port.  On the NXT screen under bluetooth connections, it showed my
laptop on both Connection 0 and Connection 1.

I haven't tried to actually communicate on both connections at the
same time yet and I only have one NXT so perhaps it wouldn't work
between NXTs, but it seems to be possible for the NXT to act as both a
master and slave when connecting to other bluetooth devices... I'll
experiment with it some more this weekend.


Subject: 
Re: NXT Robot Swarm at BrickFest -- featuring Bluetooth
Newsgroups: 
lugnet.robotics.nxt
Date: 
Sun, 13 Aug 2006 02:46:02 GMT
Viewed: 
12379 times
  
On Fri, August 11, 2006 7:17 pm, Tony Buser wrote:
On 8/11/06, Brian Davis <brdavis@iusb.edu> wrote:
   The problem (I think; somebody want to prove me wrong?) is that the "master"
NXT can send messages to at most three "slave" NXTs, but the "slaves" can not
then act as BT masters to still more units. In other words, it seems very very

On the NXT screen under bluetooth connections, it showed my
laptop on both Connection 0 and Connection 1.

I haven't tried to actually communicate on both connections at the
same time yet and I only have one NXT so perhaps it wouldn't work
between NXTs, but it seems to be possible for the NXT to act as both a
master and slave when connecting to other bluetooth devices... I'll
experiment with it some more this weekend.

I played around with this a little bit, trying to confirm what I've been told.  It
is possible to have an NXT connect as either a master or a slave, but not both at
the same time.  I'm sure this is true.

Here's what I did: I took three NXTs with the latest firmware.
(A) Master to B
(B) Slave to A and Master to C
(C) Slave to B

When you connect two NXTs, the < in the top left corner becomes a diamond (like <>).
Connecting A to B, both show they are connected.
Then, connecting B to C, A no longer shows that it's connected.
Then, connecting A to B, all three show they are connected, and B shows (from the
connections screen) that it's connected to both A and C.

However, when I ran a program to send messages from A to B, and B to C, the message
did not go from A to B.  And, looking at the Connections on B, it only shows the
connection to C.

Bottom line: An NXT can be either a master or a slave, but not both, at the same time.

Steve


Subject: 
Re: NXT Robot Swarm at BrickFest -- featuring Bluetooth
Newsgroups: 
lugnet.robotics.nxt
Date: 
Sun, 13 Aug 2006 14:59:15 GMT
Viewed: 
12435 times
  
Here's an idea of how to get more than 3 NXTs connected via Bluetooth
(BT). It involves using a PC as a "relay point".

I think standards allow up to seven simultaneous connections per BT
device. The limitation to three connections on the NXT may be a
function of the Bluecore hardware/firmware "module" that is used on
the NXT. If I'm accurate on this, then it should be simple to write a
PC based relay program that would accept up to seven NXT
simultaneously connected via BT on the PC; whenver PC receives a
message would forward it out on the other six connections. Hopefully
the NXT "Fantom" driver on the PC supports multiple connections.

Furthermore, I think you canhave multiple BT devices plugged into a
single PC. So with three dongles, you could network 21 NXTs!


Subject: 
Re: NXT Robot Swarm at BrickFest -- featuring Bluetooth
Newsgroups: 
lugnet.robotics.nxt
Date: 
Sun, 13 Aug 2006 15:28:16 GMT
Viewed: 
12916 times
  
In lugnet.robotics.nxt, Dick Swan wrote:

Here's an idea of how to get more than 3 NXTs connected
via Bluetooth (BT). It involves using a PC as a "relay
point".

   My problems with this solution are two-fold. First, NXT-G currently can't
send anything back to the PC, as it's not running anything to get the NXT-G
message structure (yes, folks could write this... almost certainly will. But
likely not me). And this may allow much more than 7 connections, because while
NXT-G doesn't allow you to set up a BT connection under SW control, I'll bet a
well-programmed computer certainly could. The second problem is I admit just a
bias of mine - I want my control On The NXT, not off the brick. Autonomy is in
some senses a pretty silly, artificial constraint anyway (hey, I program the NXT
with a laptop, right?)... but so is working with LEGO and not sheet metal.

   What I do *not* know as yet is if the three connection limit, and the
inability to set up BT connections under on-the-NXT SW control, is due to the SW
(NXT-G doesn't have the ability), or the FW (the LEGO FW can't command those
modes), or due to the BlueCore FW itself (i.e., we're stuck with it due to the
chipset on the NXT). Anyone know?

--
Brian Davis


Subject: 
Re: NXT Robot Swarm at BrickFest -- featuring Bluetooth
Newsgroups: 
lugnet.robotics.nxt
Date: 
Tue, 15 Aug 2006 01:05:46 GMT
Viewed: 
15383 times
  
In article <J3y0B4.FM0@lugnet.com>, Brian Davis <brdavis@iusb.edu> wrote
In lugnet.robotics.nxt, Dick Swan wrote:

Here's an idea of how to get more than 3 NXTs connected
via Bluetooth (BT). It involves using a PC as a "relay
point".

  My problems with this solution are two-fold. First, NXT-G currently can't
send anything back to the PC, as it's not running anything to get the NXT-G
message structure (yes, folks could write this... almost certainly will. But
likely not me).

I shall have PC software to do this, and probably others will have
similar tools before I finish.

And this may allow much more than 7 connections,

I believe 7 is the number of connections specified in the Bluetooth
standard, for each radio.

because while
NXT-G doesn't allow you to set up a BT connection under SW control, I'll bet a
well-programmed computer certainly could.

I am not sure what your definition of "set up of a bt connection"
covers.

Pairing generally requires user input, for the password.

Connecting to a previously paired device under software control should
be possible.  One wrinkle will be on the receiving device, and ensuring
the 'allow "NXT 1" to connect?' query will be handled.

Paired device should be identified by their MAC address, rather than by
their friendly name.  I guess these are stored in a file.

The second problem is I admit just a
bias of mine - I want my control On The NXT, not off the brick. Autonomy is in
some senses a pretty silly, artificial constraint anyway (hey, I program the
NXT
with a laptop, right?)... but so is working with LEGO and not sheet metal.

  What I do *not* know as yet is if the three connection limit, and the
inability to set up BT connections under on-the-NXT SW control, is due to the
SW

Making a connection should be possible, at least with a previously
paired device.

(NXT-G doesn't have the ability), or the FW (the LEGO FW can't command those
modes), or due to the BlueCore FW itself (i.e., we're stuck with it due to the
chipset on the NXT). Anyone know?

If I am reading the datasheet correctly the Bluetooth chipset supports 7
concurrent connections, but only 3 if they are high speed connections.
Perhaps due to RAM space for buffers, more probably the CPU has to do
more work for each connection.
Reference the datasheet here:
        http://www.csr.com/products/bc4ext_over.htm


Constraints I have noticed in the Lego NXT development kit
documentation:

1. The master NXT can only communicate with one of the slave units
   during a given moment, meaning that if the master NXT is
   communicating with NXT Slave 1 and NXT Slave 3 starts sending data to
   the master NXT , the master NXT will not evaluate the received data
   until it switches to NXT slave 3.
   An NXT is not able to function as both a master and slave device at
   the same time because this could cause lost data between NXT devices.
   p12, Lego Mindstorms NXT Hardware Development Kit

2. p13 explains that the Bluecore chip VM runs a different profile for
   Master and Slave modes.

3. Appendix 8-LEGO MINDSTORMS NXT ARM7 Bluetooth Interface
specification.pdf has some potentially helpful info too.

Regards,
Tony
--
  "If you don't know, invent." - Robert Baden-Powell


©2005 LUGNET. All rights reserved. - hosted by steinbruch.info GbR