Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

Can you read from serial buffer without knowing baudrate?

I’m just wondering why it’s necessary to know the baud rate when reading serial data from the buffer with PySerial. Shouldn’t the byte data in the buffer be the same regardless of 9600 or 38400 baud rate, with the exception that the latter fills faster?
I’m asking because I might have a scenario where I don’t know the source transmission rate and would like to read and record the incoming data anyway. Is it possible to record the incoming data and then check it against the baud rates in post-analysis?

>Solution :

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

Nope.

We’re talking about an asynchronous protocol here, so both sides need to know when to sample the data. Imagine you’re standing next to a conveyor belt that’s carrying chocolates that you need to pick up. Now imagine that your eyes are closed… You need to know how fast the belt is moving and how much space is between the chocolates.

You can sometimes get away with it for super short messages, but don’t count on it.

https://en.wikipedia.org/wiki/Asynchronous_serial_communication

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading