Subject:
|
RE: Bluetooth Comm Problem
|
Newsgroups:
|
lugnet.robotics.nxt
|
Date:
|
Tue, 13 Feb 2007 05:11:11 GMT
|
Reply-To:
|
<DICKSWAN@SBCGLOBALantispam.NET>
|
Viewed:
|
14273 times
|
| |
| |
> David Wallace on Monday, February 12, 2007 9:20 PM sent:
> I have been trying to communicate via BT from a Perl script on
> my PC to/from the NXT. I am not using Fantom. I have no problem
> receiving data from the NXT, but the NXT does not appear to be
> receiving the messages I send.
>
> <<snip>>
A visual review looks like everything is appropriate.
The only thing I can think of is whether, on the NXT, you are calling
"ReadMessage" more than once. You should have a loop that runs for at
least 50 (or better yet 150) milliseconds. Here's why.
When you perform a read remote message request, the return code of 64
indicates that there were no immediately available queued remote
messages on the NXT. It also checks to see if a BT message is in
progress; if not, then it polls the slave devices in a round robin
fashion asking them to reply with a remote message for the indicated
queue. It takes tens of milliseconds for the poll request and its reply
to return.
Until the reply is received at the master, the "ReadMessage" request
will return queue empty error code of 64.
This implementation is kind of awkward. It relies on the user's
application program to be periodically and frequently performing the
remote "ReadMessage" requests. It is these calls to the "ReadMessage"
request that are triggering the BT messages from the master to slave to
retrieve remote messages.
|
|
Message has 1 Reply: | | Re: Bluetooth Comm Problem
|
| (...) I was a little confused about how I was supposed to determine when the message had been received. I wasn't sure whether the ReceiveMessage should be called multiple times or not. Here is my code: // Connection = 1, Queue = 0 (...) (18 years ago, 13-Feb-07, to lugnet.robotics.nxt)
|
Message is in Reply To:
| | Bluetooth Comm Problem
|
| I have been trying to communicate via BT from a Perl script on my PC to/from the NXT. I am not using Fantom. I have no problem receiving data from the NXT, but the NXT does not appear to be receiving the messages I send. I am capturing the serial (...) (18 years ago, 13-Feb-07, to lugnet.robotics.nxt)
|
8 Messages in This Thread:
- Entire Thread on One Page:
- Nested:
All | Brief | Compact | Dots
Linear:
All | Brief | Compact
This Message and its Replies on One Page:
- Nested:
All | Brief | Compact | Dots
Linear:
All | Brief | Compact
|
|
|
Active threads in NXT programmable brick
|
|
|
|