Bidirectional serial communication via USB between Raspberry Pi Pico and Raspberry Pi 4B in C/C++
I’m trying to build a simple bidirectional serial communication via USB between my Raspberry Pi Pico and Raspberry Pi 4B in C/C++. In prinicple, my code works well. I can send data from Pico to Linux and vice versa, but my input buffer on the Pico keeps overflowing after a short while. When I look at the messages reveiced by the Pico, there a constantly non-ASCII messages on the input buffer. In addition, the Pico keeps reading its own transmitted messages, thus resulting in a endless loop of sending and receiving e.g. acknoledge messages.