I'm trying to control an Arduino board with serialport, but I'm having difficulties. I'm calling "readbyte" several times to retrieve binary data, but it triggers a timeout at random intervals.
I found that the solution was to open the Arduino IDE, open the Serial Monitor, and close it.
By doing this, the Arduino IDE changed some parameters in the serial port and all the errors were gone after that.
Arduino requires no xon/xoff protocol.
So I investigated a bit and found that "serialport" disables xoff but not xon, while the arduino ide disabled both.
The output of "stty --file=/dev/ttyUSB0 -a" after opening the serial port with "serialport" is this (only interesting lines):
I'm trying to control an Arduino board with serialport, but I'm having difficulties. I'm calling "readbyte" several times to retrieve binary data, but it triggers a timeout at random intervals.
I found that the solution was to open the Arduino IDE, open the Serial Monitor, and close it. By doing this, the Arduino IDE changed some parameters in the serial port and all the errors were gone after that.
Arduino requires no xon/xoff protocol.
So I investigated a bit and found that "serialport" disables xoff but not xon, while the arduino ide disabled both.
The output of "stty --file=/dev/ttyUSB0 -a" after opening the serial port with "serialport" is this (only interesting lines):
And the output after opening it with the Arduino IDE is this:
The only differences are the "time = 0" and "-ixon". I'm opening the port with this code:
I don't understand why XON is not disabled.
Also wanted to thank you for coding this gem!