RTU mode: Response not from requested slave

45 views
Skip to first unread message

16R

unread,
Feb 5, 2021, 10:08:40 AM2/5/21
to libmodbus
Hi All!

I got this (old?) issue where I'm getting a reply "Response not from requested slave "

Below a copy of my code -using lua-. 

What I find strange is that every-time I run it, the responding slave id (84,46,58, etc.) repeats it self. So every time its the same, when I quit lua console and start the code it restarts at 84 ...

This is run on a openwrt box with the (libmodbus) versions below (in RTU mode).

When I access the same device with minimalmodbus (python) on my mac, it works fine. When I run it with lua + libmodbus on my Mac (installed via brew) I get the same errors.

I hope someone can shed some light on this issue!

Much obliged.

Roger

//using libmodbus runtime version: 3.1.6
//using lua-libmodbus compiled against libmodbus: 3.1.6

print(dev:report_slave_id())> > > > > > > >
[01][11][C0][2C]
Waiting for a confirmation...
<54><3A><20><32><32>
Request for slave 84 ignored (not 1)
The responding slave 84 isn't the requested slave 1
nil Response not from requested slave
> print(dev:report_slave_id())
[01][11][C0][2C]
Waiting for a confirmation...
<2E><36><20><20><48>
Request for slave 46 ignored (not 1)
The responding slave 46 isn't the requested slave 1
nil Response not from requested slave
> print(dev:report_slave_id())
[01][11][C0][2C]
Waiting for a confirmation...
<3A><20><35><32><2E>
Request for slave 58 ignored (not 1)
The responding slave 58 isn't the requested slave 1
nil Response not from requested slave
> print(dev:report_slave_id())
[01][11][C0][2C]
Waiting for a confirmation...
<39><54><3A><20><32>
Request for slave 57 ignored (not 1)
The responding slave 57 isn't the requested slave 1
nil Response not from requested slave

MOGILICHARLA SURESH

unread,
Dec 1, 2023, 6:32:57 AM12/1/23
to libmodbus
Hi I, too facing the same issue. Did you get any fix for this, please?
Reply all
Reply to author
Forward
0 new messages