The Auto-detect code does not work in Linux. The use of 10.255.255.255 needs to be 192.255.255.255. At least that was what worked on my Linux Mint 21 (based on Ubuntu 22.04).
Possibly a better approach would SNMP discovery.
The pysnmp project has been taken over and brought up to date.
They have a working example showing SNMP discovery in under 100 lines of Python.
https://github.com/lextudio/pysnmp/blob/main/examples/v1arch/asyncio/manager/cmdgen/broadcast-agent-discovery.py
python broadcast-agent-discovery.py
1.3.6.1.2.1.1.1.0 = Impinj Speedway
1.3.6.1.2.1.1.3.0 = 93132162
1.3.6.1.2.1.1.1.0 = Lexmark MS417dn version NF63.TL.N639 kernel 3.0.0 All-N-1
1.3.6.1.2.1.1.3.0 = 2787845611
1.3.6.1.2.1.1.1.0 = Impinj Speedway R1000
1.3.6.1.2.1.1.3.0 = 93137323
1.3.6.1.2.1.1.1.0 = Brother NC-17002h, Firmware Ver.0.19 (14.02.21),MID 8V7110
1.3.6.1.2.1.1.3.0 = 32782475
The Auto-detect code does not work in Linux. The use of 10.255.255.255 needs to be 192.255.255.255. At least that was what worked on my Linux Mint 21 (based on Ubuntu 22.04).
Possibly a better approach would SNMP discovery.
The pysnmp project has been taken over and brought up to date.
They have a working example showing SNMP discovery in under 100 lines of Python.
https://github.com/lextudio/pysnmp/blob/main/examples/v1arch/asyncio/manager/cmdgen/broadcast-agent-discovery.py