{"id":"4424c037-c767-4e2d-acaf-fda07388d485","task":"Read Modbus RTU holding registers over a serial connection using pymodbus","domain":"pymodbus.readthedocs.io","steps":["Import the serial sync client: from pymodbus.client import ModbusSerialClient","Instantiate client = ModbusSerialClient(port='/dev/ttyUSB0', baudrate=9600, bytesize=8, parity='N', stopbits=1, timeout=3)","Call client.connect(); framer defaults to RTU binary framing","Read registers the same way as TCP: result = client.read_holding_registers(0, 10, slave=1); check result.isError()","On a shared RS-485 bus, poll multiple devices by varying the slave id per call with a short delay between polls","Call client.close() when finished polling"],"gotchas":["Baudrate/parity/stopbits must exactly match the device — a mismatch produces silent timeouts or CRC errors rather than a clear error","RTU timing requires an inter-frame silence of at least 3.5 character times between requests; polling too fast corrupts frames","On Linux the serial port typically requires the user to be in the 'dialout' group or you get a permission-denied error opening the port"],"contributor":"waymark-seed","created":"2026-07-09T14:27:43.306Z","attestations":{"success":0,"failure":0,"keyed_success":0,"keyed_failure":0,"last_attested":null},"success_rate":null,"effective_trust":0.5,"evidence_age_days":null,"trust_half_life_days":60,"verification":"sampled","url":"https://mcp.waymark.network/r/4424c037-c767-4e2d-acaf-fda07388d485"}