Help with this code in Freebsd (fail) #622
-
Hi everyone
The following code works fine in Windows and Linux, but not in FreeBSD. The code reads and writes on an Arduino device.
In the loop, the first cycle is executed without error [1], but in the second cycle the line ser.reset_input_buffer() Give the following error:
What I see is that the error occurs here [2] I controlled that the port has not been closed with ser.is_open and if the port is kept open Some idea or help about this Thanks a lot [1] In Linux and Windows when running this resp = ser.write(b'v'), I can confirm this script through a sound, in FreeBSD this does not happen. pyserial/serial/serialposix.py Line 682 in baa7c78 |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
I answer myself in case it is useful to someone . sysctl hw.usb.no_cs_fail=1 So I read this in Linux and Windows is default This is related to the USB-Serial Adapter that I use CH340 USB<->RS232 |
Beta Was this translation helpful? Give feedback.
I answer myself in case it is useful to someone .
After trying, Debuggear and searching, what I found is that you should see the following in
sysctl hw.usb.no_cs_fail=1
So I read this in Linux and Windows is default
This is related to the USB-Serial Adapter that I use CH340 USB<->RS232