Peer-to-peer Application

This sample shows how to organize the simplest peer-to-peer link. A simple buffering strategy is employed to avoid byte-by-byte data transfer.

At least 2 nodes are participating. Up to 7 nodes can be engaged. In order to define the node logical addresses, set DIP switches as shown below. One of the nodes should be configured as coordinator (i.e. its logical address should be set to zero). All of the nodes which are connected over UART to their own USB ports (see connection settings), simply exchange over UART with data sent to them by their hosts. The nodes communicate strictly in pairs defined by their logical addresses as follows:

NodeDIP switches
SW4:1SW4:2SW4:3
0OFFOFFOFF
1ONOFFOFF
2OFFONOFF
3ONONOFF
4OFFOFFON
5ONOFFON
6OFFONON
7ONONON

The network organizes automatically on startup. You may connect two devices to a PC (or to different PCs, thus introducing a rough functional equivalent of an instant messenger), start two instances of HyperTerminal, type some message in one terminal window and observe it appearing in the another.

Pressing SW1 button on a node results in sending a single maximum-length frame filled with 0xDD byte.

LEDs indicate network activity as follows:

The source code and Makefile of Peer-to-peer application are located at [ZBN]\Sample Applications\Peer2peer directory.


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