0

I am using python 2.7 pyserial library to communicate and capture to a file data from my hardware serial communications.

66 bytes packets coming from serial port with unknown number of packets will be arriving.

Questions are:

1) how will I wait for first byte to come before starting to run rest of the python program.

2) how can I start process again after one complete packet (66 bytes) or bunch of bytes received. Start again after first byte of next packet is received. And repeat process again until stop byte is send. I am trying to read one byte at a time in one iteration of the loop.

A 786
  • 488
  • 1
  • 6
  • 16
  • Possible duplicate of [Using PySerial is it possble to wait for data?](https://stackoverflow.com/questions/13017840/using-pyserial-is-it-possble-to-wait-for-data) – DrBwts Apr 09 '19 at 08:06
  • It is a bit different as I want to read byte after byte rather than putting everything in one step to check and process each byte coming from serial – A 786 Apr 09 '19 at 08:29

0 Answers0