-
Hello, I'm trying to access Modbus RTU on USR-M100-ARD which is a a IOT Gateway device which is based on ESP32-WROVER-E. I'm having an issue when trying to access Modbus RTU over my device's pins: Where when trying to connect after setting them up, it displays this error: Do you have any suggestions for making this work? This is the simplified version of code I'm using. RTUutils::prepareHardwareSerial(MODBUS_SERIAL);
MODBUS_SERIAL.begin(config.getModbusBaudRate(), SERIAL_8N1, GPIO_NUM_33, GPIO_NUM_32);
MBclient = new ModbusClientRTU(GPIO_NUM_12);
MBclient->setTimeout(config.getRtuTimeout());
MBclient->begin(MODBUS_SERIAL, 1);
for (uint8_t i = 1; i <= MODBUS_MAX_ADDRESS; i++)
{
MBbridge.attachServer(i, i, ANY_FUNCTION_CODE, MBclient);
}
MBbridge.start(config.getTcpPort(), 10, config.getTcpTimeout()); Thanks for help! |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
Interesting device! Unfortunately I currently have no access to my PC, only some mobile devices, so I am unable to open the rar-type documentation files. |
Beta Was this translation helpful? Give feedback.
-
Okay, thanks for a very quick reply! I've had issue with external device that was serving us Modbus RTU from Modbus TCP host outside of our network - our client's IT division blocked the connection by a mistake, and the PUSR Serial Gateway that we're using, instead of providing an error, acted like it wasn't receiving anything on the serial. Cheers and have a good day! |
Beta Was this translation helpful? Give feedback.
Okay, thanks for a very quick reply!
I resolved the issue, it was actually outside of the scope of library, which works excellent now that I am testing it 😀
I've had issue with external device that was serving us Modbus RTU from Modbus TCP host outside of our network - our client's IT division blocked the connection by a mistake, and the PUSR Serial Gateway that we're using, instead of providing an error, acted like it wasn't receiving anything on the serial.
Cheers and have a good day!