Ping-Pong Application

This example shows how to make the nodes to process multiple data requests. Each node is waiting for a wireless message, and then passes it to the next node. Up to 4 nodes can be engaged to form a circle.

Logical addresses of the nodes are defined by two first DIP switches, which can be set to 4 possible combinations. The third DIP switch turned ON determines the node closing the configured chain to form a circle. In configurations of 2, 3 or 4 nodes, this should be the 2nd, 3rd or 4th node, correspondingly. DIP switch configurations are presented below.

Network formation is initiated by pressing SW1 button on each node, starting with the coordinator (the node with zero logical address). When network is started successfully, green LED is ON. Yellow LED is blinking red during the process of data transfer (LED is on while data are transmitted, and LED is off after the transmission is completed).

Sending data is initiated by pressing SW2 button on any node. Once the third DIP switch on the chain-closing node is in ON position, data will be passed over circularly: 0→1→2→3→0→1... and so forth. You can press SW2 button on any other node once more, and then the next data block will pass through the nodes in the same direction. If data block fails to be delivered during any transaction (due to communication error, router's overload or some other reason) it gets out of data circulation in the network.

DIP switches settings

2 nodes participating
NodeDIP switches
SW4:1SW4:2SW4:3
0OFFOFFOFF
1ONOFFON

3 nodes participating
NodeDIP switches
SW4:1SW4:2SW4:3
0OFFOFFOFF
1ONOFFOFF
2OFFONON

4 nodes participating
NodeDIP switches
SW4:1SW4:2SW4:3
0OFFOFFOFF
1ONOFFOFF
2OFFONOFF
3ONONON

The source code and Makefile of Ping application are located at [ZBN]\Sample Applications\Ping directory.


Generated on Mon Dec 3 13:00:04 2007 for ZigBeeNet API by  doxygen 1.5.1-p1