AdvancedClimateSystems / uModbus

Python implementation of the Modbus protocol.
Mozilla Public License 2.0
211 stars 81 forks source link

Can this be used for Modbus sniffing? #96

Closed vshymanskyy closed 4 years ago

vshymanskyy commented 4 years ago

One interesting application of this could be to be able to attach to an existing Modbus connection (just the RX line), and to be able to decode/display the messages. Wondering if any additional development is needed to achieve this.

OrangeTux commented 4 years ago

I guess you want to sniff on Modbus RTU communication, correct? That would be possible.

I think I would override RTUServer.execute_route() to decode and display the messages.

def execute_route(self, meta_data, request_pdu):
    function = create_function_from_request_pdu(request_pdu)
    print(function)
OrangeTux commented 4 years ago

Closed due to inactivity. Feel free to reopen if needed.