modbus-esp8266 icon indicating copy to clipboard operation
modbus-esp8266 copied to clipboard

strange code received by ESP32

Open marcovilla118 opened this issue 1 year ago • 2 comments

Hi,

I tried to run esp32 as modbus slave.

MASTER send:

01 03 00 00 00 0A C5 CD

SLAVE (esp32 with basic RTU sketch) send back:

7F 7E FF FF EB 75 19

This is really strange and I tried to modify the slave address and other parameter but with no success. Do you have any idea about this code, thanks!!!

marcovilla118 avatar Jan 05 '24 17:01 marcovilla118

here the part of the code:

#define RX 36 #define TX 37 #define SLAVE_ID 1 //#define MODBUSRTU_REDE ModbusRTU mb;

void setup() { Serial.begin(9600,SERIAL_8N1,RX,TX);

after some tests I found that changing the PIN number (rx, tx) doesn't change the output. So it looks like the hardware pin I have assigned are not used by the software.

I don't have idea where the problem can be.

marcovilla118 avatar Jan 05 '24 22:01 marcovilla118

https://github.com/emelianov/modbus-esp8266/blob/master/documentation/README.md#modbusrtu

emelianov avatar Apr 26 '24 06:04 emelianov