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,
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,