View unanswered posts | View active topics It is currently Sat Aug 08, 2020 5:27 pm






Reply to topic  [ 1 post ] 
Bluetooth Broadcasting from PC to a set of NXTs 
Author Message
Novice

Joined: Mon May 31, 2010 8:02 am
Posts: 55
Post Bluetooth Broadcasting from PC to a set of NXTs
Hi,

I'm an experienced C programmer, but new to RobotC, so pardon me if I'm asking a stupid question. I have a need to setup BT communication from a PC to an NXT (actually to a set of 3 or 4 NXTs). From a communication standpoint, this is more of a broadcast message then a secure point-to-point messaging structure like BT is typically associated with. I have a set of information which will guide the actions of the robots which needs to be communicated to them every 2-3 minutes. There is no need for the NXTs to respond to the messages (other than maybe indicating successful receipt but its OK if an NXT misses a message, he'll just continue his old actions and pick up the next message). I will be writing SW on a PC (WinXP and probably using the LUA scripting langage) to query a database, structure the packet of information to send to the NXTs, and then complete the BT sends.

This is a bit off-topic, but does anyone know the issues with maintaining several active BT communication channels on the PC? In the best case, it would be great if I could establish the 3-4 channels that I need up-front (one for each NXT) and leave those open and have my PC script just toggle between them and send the data packet every 2-3 minutes. This will probably be an issue with the standard Win BT driver, but I know there are several driver programs for certain BT dongles that will provide up to 7 concurrently active BT channels. Does anyone have any experience with such BT dongles? However, since I will only have to send information every 2-3 minutes, would it be possible for me to re-establish each NXT BT channel individually at each send and just send my packet that way? How difficult is it to write the RobotC code to automatically shut-down & startup the BT channel as needed on the NXT?

Can RobotC support a PC-to-NXT BT communication scheme? I guess you could consider this similar to an external BT device sending info directly to an NXT (i.e. like a GPS). I understand that BT does not directly support a broadcast mechanism, but should it be possible to configure something that would work? I'm guessing raw mode would be the best method to do this, since that would give me the ability to simply format the packet any way I need at the PC and just send it directly to the NXT. The NXT will need to receive the message, parse it, and initiate the necessary actions based on the associated values. Are there any issues with raw mode that could cause me problems?

What are the battery drain issues with keeping BT active on the NXT? I would only be receiving every 2-3 minutes, but obviously this will have a battery cost. Are there any tricks to help reduce battery use with NXT BT?

Appreciate any advice.

Thanks,
Chris


Mon May 31, 2010 9:38 am
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 1 post ] 

Who is online

Users browsing this forum: No registered users and 1 guest


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:  
cron



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