espressif / esp-modbus

ESP-Modbus - the officially suppported library for Modbus protocol (serial RS485 + TCP over WiFi or Ethernet).
Apache License 2.0
85 stars 46 forks source link

How to Read Device Identification Function 43 / 14 (0x2B / 0x0E) with MODBUS Master RTU (IDFGH-9653) #24

Open joaoviktor22 opened 1 year ago

joaoviktor22 commented 1 year ago

Hello,

I'm trying to get the ID of my slave using my MODBUS Master RTU, but I'm having trouble reading the Device Identification with Function 43 and 03 (Extended Objects). I've searched extensively, but haven't found a solution yet. If anyone knows how to do this, I would greatly appreciate your help.

alisitsyn commented 1 year ago

Hello @joaoviktor22,

The Modbus Function 43: Read Device Identification is not supported by the stack. Usually vendors using the Function 17 (0x11): Report Slave ID command returning a free-form string of vendor/model/serial-number, instead of the Read Device Identification which is supported. As per Modbus specification page 44, the stack requires to implement an encapsulated Modbus interface with composed data elements (objects). The example of implementation can be taken from libmodbus library.

joaoviktor22 commented 1 year ago

Thank you for your response. I had originally intended to use function 43, but I was able to resolve the issue by directly implementing UART communication. Thank you for your assistance.

alisitsyn commented 1 year ago

@joaoviktor22 ,

Thank you for update and this feature request. This command will be added to the feature list with low priority.