BlitzMax & Lego Mindstorms NXT

BlitzMax Forums/BlitzMax Programming/BlitzMax & Lego Mindstorms NXT

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

Hi skidracer,

Thanks for your great support!!!

I only got around to looking at it this weekend. I made some changes to the C-code to change the baud rate to 460800 and I also removed the "exclusive" flag - it is easier to use a stream to send the instructions to the brick, and when I use the Java app to initialize the serial port, this works quite nice, so I assume that using freeport instead should do the same.

Still, there must be a difference between what your code does and what the Java-rxtx is doing: The brick remains silent and does not respond.

Lego requires these settings:
460.8 Baud
8 Bits
No parity bits
One stop bit
RTS & CTS

I'm not sure if your code sets the stop bit. I found a CSTOPB flag, but this is used to set 2 stop bits. Does leaving this out then set one stop bit implicitly?

When I understand your code right, you do set all the other options (except for the baud rate).

Any ideas what the problem could be?

Thanks a lot,