Sunday, February 21, 2010

Pairing Xbee Wireless Modules

Xbee wireless modules offer a quick, easy and inexpensive way to provide wireless end-point connectivity in your projects.

While they do offer “no configuration needed for out-of-the-box RF communications” you will want to do some configuration to allow high speed communications with automatic resending of lost packets.

The easiest way to set the parameters of an Xbee modules is with the use of Digi's X-CTU software utility. X-CTU is a windows-based application designed to interact with Digi's RF products providing a simple GUI for firmware configuration.

For paring a set of 2 Xbee Modules the parameters we are concerned about are PANID (ATID), Destination Address Low (ATDL), 16-bit Source Address (ATMY) and Interface Data Rate (ATBD).

The PANID (ATID) or Personal Area Network ID is a number shared amongst each Xbee module in a network. Many Xbee modules could exist in the same area but only those that share a PANID can talk to each other. The default PANID is 3332 and should be avoided

The Destination Address Low (ATDL) sets the destination address of the Xbee module and the Source Address (ATMY) sets the address number of the Xbee module. For a pair of Xbee modules these should be set opposite of each other to enable automatic resending of lost packets.

The Data Rate (ATBD) or baud rate is the number of bits per second the Xbee module will send. Xbee modules must have matching baud rates for them to talk to each other. The default is 9600bps.

At the moment SA's Xbee modules are set to:

Xbee #1 – Computer Side
ATID = 4321
ATDL = 11
ATMY = 10
ATBD = 3 (9600bps)

Xbee #2 – Robot Side
ATID = 4321
ATDL = 10
ATMY = 11
ATBD = 3 (9600bps)

So far this configuration has been working well. I do plan to experiment with a higher baud rate soon as 9600bps is a bit slow. But for now all seems well.

No comments:

Post a Comment