I'm getting the bind error quite frequently on the ConnectPortX2 when executing the following code snippet
self.socket = socket(AF_ZIGBEE, SOCK_DGRAM, ZBS_PROT_TRANSPORT)
self.socket.bind(("", 0xe8, 0, 0))
#> python monitor.py
Traceback (most recent call last):
File "<string>", line 474, in ?
File "<string>", line 262, in __init__
File "<string>", line 1, in bind
socket.error: (22, 'Invalid argument')
I'm confident that nothing else is running, for example, here's the CLI 'who' output immediately after getting the above bind error:
ID From To Protocol Sessions
1 10.0.70.6 local shell telnet
Bizarrely, if I run the program 2 or 3 times in a row, it will frequently work fine after initially throwing the socket error.
Any ideas? This is preventing my code from starting reliably in "run on boot" mode (currently deactivated).