Closed nickrsan closed 7 years ago
Original comment by Nicholas Santos (Bitbucket: nickrsan, GitHub: nickrsan).
Added some better error handling as part of the diagnosis of this. Looks like it's a race condition related to the new, faster way of reading data. At 4800 baud, at least, it seems to decide it's done reading before it really is - I'm guessing because data is still coming across the pipe, but hasn't come in yet. I assumed that the overhead of the loop would be more than enough for each additional character to come in, but apparently not. Going to investigate slowing this down, but just enough to ensure reliable reads. Maybe calculate the data transfer time, and do a microsleep at the end of each loop that's 2x the actual data transfer speed? That way at least one more character should be there if it's in transit?
Original report by Nicholas Santos (Bitbucket: nickrsan, GitHub: nickrsan).
Receives this error message:
Here's the output of DS on the device: