The following script discovers the services running on OpenWebNet protocol.
The script currently fetches the Gateway address, Device type, Number of devices running, Addresses of all services. Handles the errors like Socket connection error, EOF as response and timeout errors.
I have tested it on 4 Indian servers and handled the errors properly.
Do let me know if anything needs to be changed.
This feedback is based on running the script; it still takes almost 20 seconds to run after I made some hasty fixes regarding NACK handling, but it's a big improvement over the current version.