Read needs a CR/LF #80
Answered
by
RaulHuertas
RaulHuertas
asked this question in
Q&A
-
Hello! I need to implment a binary protocol but my serialport only returns data if the other extreme sends a CR/LF sequence. How can I solve this?
|
Beta Was this translation helpful? Give feedback.
Answered by
RaulHuertas
Feb 2, 2023
Replies: 1 comment 9 replies
-
The operating system should buffer incoming serial data once the port has been opened. If I understand your question correctly, you should simply be able to write CR\LF to the port before reading the response. |
Beta Was this translation helpful? Give feedback.
9 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
OK. I solved it. Although i'm not writin anything to my serial port, I am writing to stdout. Since the binary data i'm receiving are not full lines, stdout doesn't flush.
So I DO receive data through the serial port, I'm just not flusing stdout. Thanks for your help!