• Hello @MaBe,

    Now, I am trying to use software serial to communicate with MODBUS energy meter.
    The RS485 MODBUS protocol required 1 stop bit, 8 databits, 1 even parity and 1 stop bit.
    So, need 11 bits in total.

    The software serial can send the command to the meter, however, get error data from the meter.

    If I change to use hardware serial, using the same code, the ESP can receive data, properly.

    The error data is consistent. The first byte is should be 0x01 (00000001), but we get 0x80
    (10000000). The second byte should be 0x03, in serial monitor I get data as follows :
    10000000 00000001 10000010
    first byte second byte third byte, respectively.
    It seem that the second byte is shifted to the right.

    Is there any hint to correct the bytes ?

    Thanks,

About

Avatar for maman @maman started