|Bluetooth Messaging - no sending or receiving messages
|Page 1 of 1|
|Author:||gankoji [ Thu Mar 08, 2012 3:10 am ]|
|Post subject:||Bluetooth Messaging - no sending or receiving messages|
This is my first post on the boards here, so please excuse any n00bish tendencies I may have. I am currently having some trouble sending messages back and forth between my PC and my NXT. I have managed to get a successful pairing between the two, and can download programs to the NXT from the RobotC IDE if I so choose. I am using a C++ communications library found here: http://www.norgesgade14.dk/bluetoothlibrary.php. I have successfully implemented quite a few routines using this library and samples found in the documentation, so I am hesitant to think the problem lies within the PC host's code. Here's what happening on a nitty-gritty level:
PC Side program:
Initialize (start bluetooth connection to robot, bring up app window)
Loop: Get input from gamepad, analyze input and prepare message for the robot, send the message, wait for 100 ms, try to read the message out of the robot's queue
Initialize, check for connection
Loop: read messages from the inbox, write messages to the same queue
All seems well from the plan, but I get an exception thrown by the PC program whenever the program tries to read the response message from the NXT, saying the mailbox is empty.
I understand that since I am programming half of this in RobotC and half in C++, you may not be able to help me with all of this. I am working with the folks who support the C++ software to see if I am using that correctly, and only hoping that someone here will be able to help me verify that I am using (or misusing) the RobotC bluetooth routines correctly. Please find code listings attached below. Thanks in advance for your help!
|Page 1 of 1||All times are UTC - 5 hours [ DST ]|
|Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group