harihanv / esp32-modbus-gateway

esp32 port of modbus RTU to TCP Arduino gateway
GNU General Public License v3.0
60 stars 28 forks source link

Gateway Target Device Failed to Respond #7

Open redmuchroom opened 1 year ago

redmuchroom commented 1 year ago

Hi,

I'm working with the olimex esp-poe board and trying to get the gateway working. the test setup is the following: i use modbus poll to send the requests on tcp and I use the PyModSlave to simulate the slave with a USB to rs485 cable. I see that the requests and answers are passing on the RS485. the writing commands are working well (I send writing command from modbus poll, and it is well changed on the slave). However, the reading requests are ending with "Gateway Target Device Failed to Respond" (on the raw data from the slave everything looks great- so in rtu). and on the serial monitor i get: Check Request error code : 0
Inside Recv processing

I see in the code the command with the "Gateway Target Device Failed to Respond" but not sure I understand it well...

Could you indicate little more info on what could cause this?

thanks in advance for your support!

br,

harihanv commented 1 year ago

please check if the slave id is populated in modbus tcp as it is optional, but in gateway scenario it is required for conversion

On Fri, Nov 18, 2022 at 8:24 PM redmuchroom @.***> wrote:

Hi,

I'm working with the olimex esp-poe board and trying to get the gateway working. the test setup is the following: i use modbus poll to send the requests on tcp and I use the PyModSlave to simulate the slave with a USB to rs485 cable. I see that the requests and answers are passing on the RS485. the writing commands are working well (I send writing command from modbus poll, and it is well changed on the slave). However, the reading requests are ending with "Gateway Target Device Failed to Respond" (on the raw data from the slave everything looks great- so in rtu). and on the serial monitor i get: Check Request error code : 0 Inside Recv processing

I see in the code the command with the "Gateway Target Device Failed to Respond" but not sure I understand it well...

Could you indicate little more info on what could cause this?

thanks in advance for your support!

br,

— Reply to this email directly, view it on GitHub https://github.com/harihanv/esp32-modbus-gateway/issues/7, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAEH5LA3VG4MQG7QSM6F73DWI6KEBANCNFSM6AAAAAASESLDNI . You are receiving this because you are subscribed to this thread.Message ID: @.***>