Subject:
|
Difficulty with WRITE COMMAND over BT
|
Newsgroups:
|
lugnet.robotics.nxt
|
Date:
|
Thu, 26 Apr 2007 22:47:43 GMT
|
Viewed:
|
18475 times
|
| |
| |
Hi,
I am attempting to download a .rxe program file to NXT from some
programming environment that allows communicating over serial port.
So I connect to NXT (with 1.04 firmware) from the WinXPSP2 box with
BT USB dongle, and use the commands described in the
LEGO's NXT Comm. protocol document while communicating through the
virtual serial port established by the BT services on Windows.
(not using fantom driver)
It seems to work fine in both directions, I can create files in NXT, write
to them, read from them, send messages, start programs, play sounds, etc.
I can even create files with extension .rxe and write data to them.
(I open them with OPEN WRITE LINEAR COMMAND). However, I experience the
following behavior:
- when I write some bulk data (for example a series of 'x' character), I can
create, write, and close the file properly, and then see it when I list the
files. that's correct.
- however, if I try to download a real .rxe file that was produced using NBC
compiler (and this .rxe file can be downloaded normally using NBC utility and
runs on NXT correctly otherwise), then writing to file works until the last 72
or so characters are to be downloaded. At that time, the WRITE COMMAND simply
does not respond with a reply packet as it should. It happens no matter how
big/small chunks I use to send the data to NXT over bloodytooth (and they are
always less then 64 bytes - the packet limit size). Batteries replaced, no
improvement. It puzzles me for some hours already. Please help, if you have some
hints...
When trying with a shorter .rxe file, all writes finish correctly, but the CLOSE
COMMAND hangs (does not respond with a packet).
After hanging occurs, writing to port results in no response from the brick no
matter what command. The icon on the brick still indicates that the BT is
connected, and same with WinXP BT services. However, the port has to be closed
and re-opened again to recover the communication (without the written file being
there). Am I missing some trick?
Pavel.
|
|
Message has 1 Reply: | | Re: Difficulty with WRITE COMMAND over BT
|
| (...) It's hard to say what exactly might be going wrong. Here's how I write a file to the NXT: // write in < 64 byte chunks xferred := 0; aStream.Position := 0; // start at the beginning while xferred < size do begin cnt := Min(size - xferred, (...) (18 years ago, 27-Apr-07, to lugnet.robotics.nxt)
|
3 Messages in This Thread:
- Entire Thread on One Page:
- Nested:
All | Brief | Compact | Dots
Linear:
All | Brief | Compact
|
|
|
Active threads in NXT programmable brick
|
|
|
|