User manual

www.sainsmart.com
Copyright © 2013 SainSmart All Rights Reserved
WR
Write newly configured parameter values to
non-volatile (long-term) storage. Otherwise,
they will only last until the module loses
power.
CN
Exit command mode now. (If you don't send
any commands to the module for a few
seconds, command mode will timeout and exit
even without a CN command.)
API mode
As an alternative to Transparent Operation, API (Application Programming Interface) Operations
are available. API operation requires that communication with the module be done through a
structured interface (data is communicated in frames in a defined order). The API specifies how
commands, command responses and module status messages are sent and received from the
module using a UART Data Frame.
Read the manual if you are going to use the API mode.
Jumper setting
The XBee shield has two jumpers (the small removable plastic sleeves that each fit onto two of
the three pins labelled Xbee/USB). These determine how the XBee's serial communication
connects to the serial communication between the microcontroller (ATmega8 or ATmega168) and
FTDI USB-to-serial chip on the SainSmart board.
With the jumpers in the XBee position (i.e. on the two pins towards the interior of the board),
the DOUT pin of the XBee module is connected to the RX pin of the microcontroller; and DIN is
connected to TX. Note that the RX and TX pins of the microcontroller are still connected to the TX
and RX pins (respectively) of the FTDI chip - data sent from the microcontroller will be
transmitted to the computer via USB as well as being sent wirelessly by the XBee module. The
microcontroller, however, will only be able to receive data from the XBee module, not over USB
from the computer.
With the jumpers in the USB position (i.e. on the two pins nearest the edge of the board), the
DOUT pin the XBee module is connected to the RX pin of the FTDI chip, and DIN on the XBee
module is connected to the TX pin of the FTDI chip. This means that the XBee module can
communicate directly with the computer - however, this only works if the microcontroller has
been removed from the SainSmart board. If the microcontroller is left in the SainSmart board, it
will be able to talk to the computer normally via USB, but neither the computer nor the
microcontroller will be able to talk to the XBee module.
Using Series 2 ZB XBees
Series 2 XBee's (ZigBee protocol) are quite different to 802.15.4 ones.
ZigBee networks are called personal area networks or PANs. Each network is defined with a
unique PAN identifier (PAN ID). XBee ZB supports both a 64-bit (extended) PAN ID and a 16-bit
PAN ID.