You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have downloaded the macOS version from the 0.4.2 release page in order to flash an UZG-01 device. Unfortunately the tool does not work out of the box. This is the error that I see every time I start the tool:
foo@bar ~ 1: /Applications/ZigStarGW-MT.app/Contents/MacOS/ZigStarGW-MT
Traceback (most recent call last):
File "ZigStarGW-MT.py", line 483, in <module>
File "ZigStarGW-MT.py", line 478, in main
File "ZigStarGW-MT.py", line 191, in __init__
File "zeroconf/_core.py", line 181, in __init__
File "zeroconf/_utils/net.py", line 358, in create_sockets
File "zeroconf/_utils/net.py", line 248, in new_socket
OSError: [Errno 48] Address already in use
[45431] Failed to execute script 'ZigStarGW-MT' due to unhandled exception: [Errno 48] Address already in use
[45431] Traceback:
Traceback (most recent call last):
File "ZigStarGW-MT.py", line 483, in <module>
File "ZigStarGW-MT.py", line 478, in main
File "ZigStarGW-MT.py", line 191, in __init__
File "zeroconf/_core.py", line 181, in __init__
File "zeroconf/_utils/net.py", line 358, in create_sockets
File "zeroconf/_utils/net.py", line 248, in new_socket
OSError: [Errno 48] Address already in use
The reason for the error is that macOS already runs services as user root with UID 0 on port 5353 (mDNSResponder) which are responsible for unicast and multicast mDNS.
On macOS port sharing is possible. But it is only allowed when a port is (re-)opened with the appropriate options (Zeroconf already takes care of it) and that the process that wants to open an already used port (here ZigStarGW-MT's Zeroconf instance) shares the same UID with the port owner's process. This is not the case when one runs ZigStarGW-MT as "normal" user and not root.
Solutions:
Either catch the exception, tell the user and exit.
Or start ZigStarGW-MT with sudo which runs ZigStarGW-MT as root with UID 0:
Starting ZigStarGW-MT with sudo allows the new process, which is now run as root i.e. with the same UID 0 that mDNSResponder is already run with, to share the port that mDNSResponder is already using.
It would be very helpful if this could be documented on the web page.
The text was updated successfully, but these errors were encountered:
Thank you for your feedback! Would you consider submitting a pull request with the suggested changes to either the program or the documentation? This would help improve the tool for all users.
Regarding flashing the UZG-01: most users now prefer the XZG firmware, which allows the Zigbee module to be flashed directly through the web interface without the need for additional utilities.
Hi @xyzroe . Thanks for the flashing tool.
I have downloaded the macOS version from the 0.4.2 release page in order to flash an UZG-01 device. Unfortunately the tool does not work out of the box. This is the error that I see every time I start the tool:
The reason for the error is that macOS already runs services as user
root
withUID 0
on port 5353 (mDNSResponder
) which are responsible for unicast and multicast mDNS.On macOS port sharing is possible. But it is only allowed when a port is (re-)opened with the appropriate options (Zeroconf already takes care of it) and that the process that wants to open an already used port (here
ZigStarGW-MT
's Zeroconf instance) shares the same UID with the port owner's process. This is not the case when one runsZigStarGW-MT
as "normal" user and notroot
.Solutions:
sudo
which runsZigStarGW-MT
asroot
withUID 0
:Starting
ZigStarGW-MT
withsudo
allows the new process, which is now run asroot
i.e. with the sameUID 0
thatmDNSResponder
is already run with, to share the port thatmDNSResponder
is already using.It would be very helpful if this could be documented on the web page.
The text was updated successfully, but these errors were encountered: