![Telegesis ZigBee GW357 Product Manual Download Page 13](http://html1.mh-extra.com/html/telegesis/zigbee-gw357/zigbee-gw357_product-manual_1081846013.webp)
ZigBee Communications Gateway
©2013 Telegesis (UK) Ltd
-13-
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 9: 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 8: Discovery Python Script