View unanswered posts | View active topics It is currently Thu Apr 17, 2014 9:47 am






Reply to topic  [ 19 posts ]  Go to page 1, 2  Next
BlueTooth? 
Author Message
Senior Roboticist
User avatar

Joined: Wed Sep 28, 2011 10:13 pm
Posts: 630
Location: If I told you, I'd have to kill you.
Post BlueTooth?
I recently aquired a couple more NXTs (I now have four), so I was wondering what's the limit of NXTs connected through BlueTooth? Last I heard RobotC only supported two, but I don't know what it's like now. Also, what's the RS485 support like? Using a splitter, is it possible to do more than two?

Thanks.

_________________
A.K.A. inxt-generation
Self-proclaimed genius, and future world dominator.
My Brickshelf Folder
"Don't they teach recreational mathematics anymore?" - The Tenth Doctor
Bow down to Nikola Tesla, King of the Geek Gods.


Mon Jun 18, 2012 1:47 pm
Profile WWW
Expert

Joined: Thu Sep 29, 2011 11:09 pm
Posts: 184
Location: Michigan USA
Post Re: BlueTooth?
ROBOTC only supports 2 NXTs connected with BT.

RS485 supports 32 NXTs (based on the rated impedance of the transceivers used in the NXT). I don't know of really any ROBOTC libraries for RS485 communication between NXTs, so you'll probably want to wrap everything up into nice, easy-to-use functions (create your own library).

RS485 is insanely fast compared to BT, so be prepared for some major speed!

_________________
Matt


Mon Jun 18, 2012 5:44 pm
Profile WWW
Expert

Joined: Tue Feb 28, 2012 3:10 pm
Posts: 195
Post Re: BlueTooth?
mattallen37 wrote:
ROBOTC only supports 2 NXTs connected with BT.

RS485 supports 32 NXTs (based on the rated impedance of the transceivers used in the NXT). I don't know of really any ROBOTC libraries for RS485 communication between NXTs, so you'll probably want to wrap everything up into nice, easy-to-use functions (create your own library).

RS485 is insanely fast compared to BT, so be prepared for some major speed!


more than 2 would take some home made cables, though right. I mean since it's sensor port 4 only. Any guidance as to how to build those cables?

since it is wired, it would seem to be limited to non-swarm, non-remote connectivity. as such, what advantage does blinding speed have over just 'event scheduling' communications? (well I guess by not having to address event scheduling, but then you are going down a lazy programming route anyhow).

In my experience (ie wrote a session layer for x4.00 for FAA), 2 way communications code can be some huge difficult state machines (if done even semi-correctly). if everybody has to write their own, it won't get used much, or be much of a success.

_________________
Mike aka Spiked3
http://www.spiked3.com


Mon Jun 18, 2012 7:06 pm
Profile
Senior Roboticist
User avatar

Joined: Wed Sep 28, 2011 10:13 pm
Posts: 630
Location: If I told you, I'd have to kill you.
Post Re: BlueTooth?
Spiked3 wrote:
more than 2 would take some home made cables, though right. I mean since it's sensor port 4 only. Any guidance as to how to build those cables?


Couldn't you just use the MindSensors port splitter?

_________________
A.K.A. inxt-generation
Self-proclaimed genius, and future world dominator.
My Brickshelf Folder
"Don't they teach recreational mathematics anymore?" - The Tenth Doctor
Bow down to Nikola Tesla, King of the Geek Gods.


Mon Jun 18, 2012 7:41 pm
Profile WWW
Expert

Joined: Tue Feb 28, 2012 3:10 pm
Posts: 195
Post Re: BlueTooth?
NeXT-Generation wrote:
Spiked3 wrote:
more than 2 would take some home made cables, though right. I mean since it's sensor port 4 only. Any guidance as to how to build those cables?


Couldn't you just use the MindSensors port splitter?


I do not think so (but I'm way out of my league). I think it would need to be a properly terminated multidrop signal if it is real rs-485.
from the mindsensors page "Works only with I2C compliant devices"

_________________
Mike aka Spiked3
http://www.spiked3.com


Mon Jun 18, 2012 9:12 pm
Profile
Senior Roboticist
User avatar

Joined: Wed Sep 28, 2011 10:13 pm
Posts: 630
Location: If I told you, I'd have to kill you.
Post Re: BlueTooth?
I don't think so. You communicate with the sensors connected to it normally, except you have to include their address? ID? Hex value? I'm pretty sure it's just a wire extender. If you look at the page again, it says you can control motors with it, albeit not having the individual encoder values. Eh, it's only $12. I'd probably be getting some in the near future anyway.

_________________
A.K.A. inxt-generation
Self-proclaimed genius, and future world dominator.
My Brickshelf Folder
"Don't they teach recreational mathematics anymore?" - The Tenth Doctor
Bow down to Nikola Tesla, King of the Geek Gods.


Tue Jun 19, 2012 12:41 am
Profile WWW
Expert

Joined: Thu Sep 29, 2011 11:09 pm
Posts: 184
Location: Michigan USA
Post Re: BlueTooth?
I know for a fact that the mindsensors port splitter does work with RS485, as I have used it several times.

The NXT uses half-duplex RS485, which has both advantages and dis-advantages.

The main disadvantage is that you can only have one device talking at a time (only 1 NXT can be transmitting at a time), so you need to use some sort of flow control. I always program a master-slave system, where the master is responsible for handling bus usage.

The main advantage to half-duplex, is that you can use more than just 2 devices on the bus, since the same 2 wires carry all the signals (instead of 2 being Rx and 2 being Tx).

_________________
Matt


Tue Jun 19, 2012 12:50 pm
Profile WWW
Expert

Joined: Tue Feb 28, 2012 3:10 pm
Posts: 195
Post Re: BlueTooth?
Well either the NXT rs-485 is not true rs-485 (as described by wiki http://en.wikipedia.org/wiki/RS-485) or the the mindsensors splitter that "Works only with I2C compliant devices" does more than it says. I'm guessing it is a (fortunate) combination of both.

From rs-485 wiki: offers data transmission speeds of 35 Mbit/s up to 10 m and 100 kbit/s at 1200 m. Since it uses a differential balanced line over twisted pair. ... The recommended arrangement of the wires is as a connected series of point-to-point (multidropped) nodes, i.e. a line or bus, not a star, ring, or multiply-connected network.

Not that anyone should care if its really in spec, the important thing to know is someone has seen it work - so it can be used that way.

Would a library modeled after the bluetooth mailbox system (also a master-slave system) be helpful? Not that I have plans at the moment to do anything with it (still wondering about the other question; why?), everything I want to do can be easily handled by bluetooth. But I am curious as to the demand (as I just happen to have on me a high performance session layer written in C :) ).

_________________
Mike aka Spiked3
http://www.spiked3.com


Tue Jun 19, 2012 1:41 pm
Profile
Senior Roboticist
User avatar

Joined: Wed Sep 28, 2011 10:13 pm
Posts: 630
Location: If I told you, I'd have to kill you.
Post Re: BlueTooth?
"Why?" Well, no reason yet. I'm just trying to get information for when I do make a huge multi-NXT [exageration]nightmare monster[/exageration].

_________________
A.K.A. inxt-generation
Self-proclaimed genius, and future world dominator.
My Brickshelf Folder
"Don't they teach recreational mathematics anymore?" - The Tenth Doctor
Bow down to Nikola Tesla, King of the Geek Gods.


Tue Jun 19, 2012 1:59 pm
Profile WWW
Expert

Joined: Thu Sep 29, 2011 11:09 pm
Posts: 184
Location: Michigan USA
Post Re: BlueTooth?
The NXT uses a TTL level UART port of the AT91SAM7S256 for the signals, and an ST485 half-duplex transceiver to convert the TTL UART (TTL level "RS232") into RS485 differential signals.

The mindsensors port splitter that "Works only with I2C compliant devices" is simply just a port splitter (all pin 1s connect, all pin 2s etc.). The reason they say it only works with I2C sensors, is that they don't want people to think that it's an analog multiplexer.

Quote:
Not that anyone should care if its really in spec, the important thing to know is someone has seen it work - so it can be used that way.
And I have personally done it, so I guarantee it works :wink:

_________________
Matt


Tue Jun 19, 2012 2:26 pm
Profile WWW
Senior Roboticist
User avatar

Joined: Wed Sep 28, 2011 10:13 pm
Posts: 630
Location: If I told you, I'd have to kill you.
Post Re: BlueTooth?
Hello, RobotC peoples? Should I be expecting 4-brick BT support anytime soon? RS485 is fine for one big thing, but I want 3-4 individual robots communicating, and I'd hate to have to leave my favorite programming language for easier BT support.... I know it's real easy with LeJOS.

_________________
A.K.A. inxt-generation
Self-proclaimed genius, and future world dominator.
My Brickshelf Folder
"Don't they teach recreational mathematics anymore?" - The Tenth Doctor
Bow down to Nikola Tesla, King of the Geek Gods.


Fri Jun 29, 2012 11:54 pm
Profile WWW
Moderator
Moderator
User avatar

Joined: Wed Mar 05, 2008 8:14 am
Posts: 3105
Location: Rotterdam, The Netherlands
Post Re: BlueTooth?
I am not aware of this being on the roadmap but I am not privy to everything. If you want a more mesh-like network that is actually reliable, I would recommend you take a look at the NXTBee from Dexter Industries. I do know that multi-robot is on the roadmap and there might already be some preliminary support in there for it now. This will work with both Arduino -and- NXT.

- Xander

_________________
| Professional Conduit of Reasonableness
| (Title bestowed upon on the 8th day of November, 2013)
| My Blog: I'd Rather Be Building Robots
| ROBOTC 3rd Party Driver Suite: [Project Page]


Sat Jun 30, 2012 1:42 am
Profile WWW
Expert

Joined: Tue Feb 28, 2012 3:10 pm
Posts: 195
Post Re: BlueTooth?
I haven't gotten deeper than an NXT to a PC, but I feel like I am starting to understand this weird Nxt bluetooth thing a little.
I just looked at the online wiki for NXT, and I see this;

A device can be either a slave or a master, but not both.
A single master can (optionally) make connections to multiple slaves.

And that fits with my limited understanding. 1 master, up to 3 slaves.

then from the help file I see this;

cCmdMessageWriteToBluetooth(nStream, pData, nLength, nQueueID)
Writes a Bluetooth message to 'nQueueID'. The message will be written to the specified 'port' or 'nStream' which should be in the range of 0 to 3. This command is only useful when multiple ports are simultaneously open on the NXT; a configuration that is not recommended because of the much slower communications when multiple ports are in use. The message data is taken from the buffer at 'pData'. 'nLength' is the number of bytes in the message; the maximum length is 58 bytes.

again, it sounds like it fits the Nxt model, but to be honest - I never saw any traffic over the wire when I tried to use it.

I'm not sure if there is stuff in robotc and it is just broken, or if it was never planned to work. Have you looked at these? is there a statement somewhere that 1 Nxt to 1 Nxt is the only model that works? Remind me, what LeJOS API accomplishes this 'easy'? I prefered lejos (java) as a modern language, but couldn't deal with the lack of debugging, up to and including the need to manually use command line to look at linker listings to find out what and where an exception occurred, it is just too primitive for me in that respect (might as well be doing native assembler).

_________________
Mike aka Spiked3
http://www.spiked3.com


Sat Jun 30, 2012 1:59 am
Profile
Moderator
Moderator
User avatar

Joined: Wed Mar 05, 2008 8:14 am
Posts: 3105
Location: Rotterdam, The Netherlands
Post Re: BlueTooth?
ROBOTC has specifically not implement more than 1:1 for BT. While the Bluecore chip in the NXT is certainly capable of more, it is still a steaming pile of .... in terms of functionality and performance.
You can disconnect and reconnect to another slave, but that is fairly time consuming.

- Xander

_________________
| Professional Conduit of Reasonableness
| (Title bestowed upon on the 8th day of November, 2013)
| My Blog: I'd Rather Be Building Robots
| ROBOTC 3rd Party Driver Suite: [Project Page]


Sat Jun 30, 2012 2:11 am
Profile WWW
Expert

Joined: Tue Feb 28, 2012 3:10 pm
Posts: 195
Post Re: BlueTooth?
mightor wrote:
ROBOTC has specifically not implement more than 1:1 for BT. While the Bluecore chip in the NXT is certainly capable of more, it is still a steaming pile of .... in terms of functionality and performance.
You can disconnect and reconnect to another slave, but that is fairly time consuming.

- Xander


when I said "I just looked at the online wiki for NXT, and I see this;" I should have said the robotc wiki for NXT. So what you are saying is this is something that does not work in robotc even though it is documented/advertised in several places? heck, every other nxt thing i've seen at least implements what the original firmware provides.

I really do not have any more than 2 connected NXTs projects imagined, but in the future who knows? Good thing to know.

_________________
Mike aka Spiked3
http://www.spiked3.com


Sat Jun 30, 2012 4:58 am
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 19 posts ]  Go to page 1, 2  Next

Who is online

Users browsing this forum: Siberianice and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  



Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by ST Software for PTF.