This Bash script is a Modbus device scanner for a serial RTU (RS-485) bus using mbpoll. It attempts to detect a Modbus-compatible device (like an Orno power meter) by cycling through common communication settings.
🔍 What it does, step-by-step: Loops over baud rates: 9600, 4800, 2400, 1200
Loops over parity settings: none, even, odd
For each combination of baud rate and parity, it:
Tries Modbus slave addresses 1 through 10