The Zigbee S2 module runs native Zigbee protocol (Don’t use the S1 module which doesn’t have config). There are various ways in which Zigbee can be interfaced with microcontrollers like Arduino Uno and PC. In this case we have used a Zigbee Serial to USB converter (see below) that was connected to the PC using the USB cable.
If the driver is not loaded properly you will see a yellow rectangle. If so right click and say Update driver->Search automatically for updated driver software.
After this download XCTU from here. Install and run the program. Choose the “Add a Radio Module” (the plus icon) and choose the same COM port that was seen in the device manager. You will find that it gets added to the left pane. If you click on that a READ operation is performed and values are populated on the right hand side. (see below)
What this means is that your Zigbee device was interfaced and its values have been read and populated in the GUI for your reference. If you wish to program back, all you have to do is change the values of the fields and click on Write.
The next experiment would be to communicate between two zigbee modules. For this we would need one of them to be a router and another to be a communicator. Also the destination address of each need to be the source address of the other. So we have to connect the two modules one by one and read the source address of each and again connect the other zigbee and program its destination address
Setting up Communicator
See the below image. This is how the SH and SL address are listed. We need to note it from one and program it as DH and DL in the other. In this case we have noted down the SH and SL as 13A200 and 40E92096 (to be used later) and at the same time programmed the DH and DL as 13A200 and 40E9209A (which was the SH and SL of the other zigbee)
One other thing is that on the left pane the above zigbee was listed as Coordinator (note the Function: Zigbee Coordinator AT) and also the small icon ‘C’ indicating that it is coordinator. See the other Zigbee below.
It shows the SH, SL, DH and DL as discussed and also shows the Function as : Zigbee Router AT with the small icon as ‘R’. Now if if your Zigbees are both Coordinator ATs or both Router ATs then you will have to reprogram one of them to be different. In our case both were Router ATs so we had to program one of them to be Coordinator AT. This is how it is done
Click on the Update Firmware icon on the right pane. You can then choose the respective function on the next dialog box (we chose Coordinator AT function set).
Then click Update. It should be done in few seconds and reconnected.
After this you can connect both the Zigbee modules (either in same PC or preferably in two different PCs). Close all the XCTU software (if running). Open a serial console like ‘Putty’ or ‘Tera Term Pro” and choose Serial COM port corresponding to the Zigbee attached (refer Device manager for the port number). Whatever you type on one port would be visible in the other tera term and vice versa. (see below)
Third Experiment (Command Mode)
Consider this as 3rd experiment. Connect through Tera Term Pro (or putty)
To enter command mode type +++
You should get ‘OK’ as return.
(Anytime you wait for more than 10 seconds, it quits the command mode. you have to type +++ again)
ATID (returns the ID)
ATSL (returns source address)
ATDL (returns destination address)
ATCN (quits command mode)