Closed Max89D closed 1 year ago
Parity is handled by the Stream object handed to the library in the [constructor](https://github.com/CMB27/ModbusRTUSlave/wiki/ModbusRTUSlave()). The library itself does not check parity. The examples use SoftwareSerial as the stream object, which only supports 8N1. However, if you use a HardwareSerial (Serial) object, 8E1 is supported.
The library needs to know the configuration being used in order to properly handle timing when receiving messages.
Thank you very much, it"s very interesting. I'll try with Serial.
I confirm it works with the Serial library but you have to set it in the begin method as following:
Serial.begin(baud, SERIAL_8E1);
That is how it works.
Hello,
Nice lib you've made, I really like it. I had some issues trying to communicate in 8E1. I constantly had CRC errors on my debug Modbus RTU console. I've figure out that the config was in fact not 8E1 but 8N1 (as by default). I've had a look at the code and couldn't find where the parity check is done or written. Is it done somewhere else ? I only had a look in the begin method. Could you resolve this ?
I'm sorry I couldn't get directly into your code and try resolve.
Regards, Maxim