How could I create a PC application to connecte with zigbee gateway in LAN


As the title said, how could I make a GUI application in PC (not web), to connect with my Zigbee gateway and then control a smartplug. Is it possible?

Thank you!
Best regard!

Sure it is. It is a matter of you creating a socket to the IP address of the gateway. Then send some pre defined data that issue a remote AT command to the radio setting the proper DIO line as a output high or low turning on the Plug on and off.

Thank you for your response.
I can use socket to simple connect with the gateway successfully, but how could I get the information and send command? when I use “s = socket(AF_XBEE, SOCK_DGRAM, XBS_PROT_TRANSPORT)”, it show “NameError: name ‘AF_XBEE’ is not defined”.

The DIA XBee DIO sample shows you how to send remote AT commands to the XBee modules and open a socket to them.