Reputation: 183
How to determine whether device connected to the network is modbus device after getting valid ip range through broadcasting mechanism or How to Auto Discover the slave id of modbus device connected to the gateway ?
Upvotes: 4
Views: 16998
Reputation: 2019
You can try using nmap:
here you can find the tutorial to use.
You can also use Metasploit-framework(msfconsole):
Upvotes: 1
Reputation: 31
In the context of Modbus TCP, slaveId is not used to identify a Modbus device. IpAddress is used to identify the Modbus device if the device supports Modbus TCP/UDP.
if you want to discover the Modbus devices in a LAN, as you mentioned, you can send a broadcast message to all the range of IP addresses. But, there is no predefined register address to poll. Each Modbus device may be configured different address location.
Send TCP connection request for each :502.
And then for each connected device, like the Modscan tool, you can write your custom logic to scan all the registers in each discovered Modbus device.
Upvotes: 3