favalex / modbus-cli

Command line tool to access Modbus devices
Mozilla Public License 2.0
158 stars 30 forks source link

Cannot override serial timeout #9

Closed fake-name closed 2 years ago

fake-name commented 3 years ago

Currently, the serial port is opened with a hard-coded readout timeout of 5 seconds.

This makes contexts where you're fiddling with wiring and trying to probe for a remote device at an address really irritating, because you only get one probe every 5 seconds. I effectively have a bash script that iterates through a set of addresses and tries to read from them, and it's super slow because of this.

Exposing the serial timeout through the CLI would be a very nice option.

Additionally, a command that tries to issue a blind read from every available address would also be extremely handy for contexts where you know you have a modbus device connected, but the device address isn't known.