diff --git a/examples/client_async_calls.py b/examples/client_async_calls.py index 5f5ac87b7..8bda0579c 100755 --- a/examples/client_async_calls.py +++ b/examples/client_async_calls.py @@ -201,7 +201,7 @@ async def async_handle_file_records(client): async def async_execute_information_requests(client): """Execute extended information requests.""" _logger.info("### Running information requests.") - rr = await client.read_device_information(slave=SLAVE) + rr = await client.read_device_information(slave=SLAVE, read_code=1, object_id=0) assert not rr.isError() # test that call was OK assert rr.information[0] == b"Pymodbus" diff --git a/examples/client_calls.py b/examples/client_calls.py index 5fa16b4a6..5960fa557 100755 --- a/examples/client_calls.py +++ b/examples/client_calls.py @@ -180,11 +180,9 @@ def handle_file_records(client): def execute_information_requests(client): """Execute extended information requests.""" _logger.info("### Running information requests.") - # NOT WORKING: ONLY SYNC. - # FAILS WITH framer = RTU - # rr = client.read_device_information(slave=SLAVE) - # assert not rr.isError() # test that call was OK - # assert rr.information[0] == b"Pymodbus" + rr = client.read_device_information(slave=SLAVE, read_code=1, object_id=0) + assert not rr.isError() # test that call was OK + assert rr.information[0] == b"Pymodbus" rr = client.report_slave_id(slave=SLAVE) assert not rr.isError() # test that call was OK