Hi everyone,
I am testing an RS485 communication on IMX7D
Communication from the point of view of signals is ok and I am able to transmit and receive;
However I have a problem in a python script regarding reading;
the test system is very simple : I have a microcontrol that sends data at reagular intervals and the script on the SOM that must read them;
the script is trivially this:
import serial
import serial.rs485
ser = serial.Serial(
port="/dev/ttymxc1",
baudrate = 9600,
timeout=0)
ser.rs485_mode = serial.rs485.RS485Settings()
if (ser.isOpen() == True):
ser.close()
ser.open()
ser.reset_input_buffer
ser.read(ser.inWaiting())
The problem is that until 4095 bytes have been received, there is nothing readable;
if I check with ser.inWaiting ()
I get 0 until I get 4095 and at that point I can read all the queued messages …
Anyone know how to fix?