ZigBee Communications Gateway
©2016 Silicon Labs
-14-
ZigBee Communications Gateway
Discovery on other platforms:
On other platforms where UPnP services are not available, the device can be discovered using the
following python script which basically listens to the UDP broadcast on port 14099 by the gateway
once every minute.
Run the above script from command line and the output window would show the IP addresses of
the ZigBee Communications Gateways in the network as shown below
Figure 10: Discovery Output
import socket, traceback, commands
host = '' # Bind to all interfaces
port = 14099
#start a udp socket server to listen on port 14099
s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
s.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1)
s.setsockopt(socket.SOL_SOCKET, socket.SO_BROADCAST, 1)
s.bind((host, port))
print "Waiting for Telegesis Gateway:"
while 1:
try:
message, address = s.recvfrom(8192)
print "Telegesis Gateway Found on IP Address:
%r"%(address[0])
except (KeyboardInterrupt, SystemExit):
raise
Figure 6: Discovery Script
Figure 9: Discovery Python Script