BL4S100 User’s Manual
108
Channel mask
— defaults to 0x1FFE, i.e., all 16 possible channels via the macro in the
Dynamic C
LIB\Rabbit4000\XBee\XBee_Firmware\XBEE_API.LIB
library. If
you want to limit the channels used, all devices on your network should use the same
channel mask.
#define DEFAULT_CHANNELS XBEE_DEFAULT_CHANNELS
Extended PAN ID
— the 64-bit network ID. Defaults to
DEFAULT_PANID
if set in the
Dynamic C
LIB\Rabbit4000\XBee\XBEE_API.LIB
library, otherwise defaults to
0x0123456789abcdef
to match the default used on the Digi XBee USB.
If set to
0x00
, tells coordinators to “select a random extended PAN ID,” and tells routers
and end devices to “join any network.”
Change the extended PAN ID if you are developing simultaneously with more than one
ZigBee coordinator.
#define DEFAULT_EXTPANID "0x0123456789abcdef"
Node ID
— the ID of your particular node via the macro in the Dynamic C
LIB\Rab-
bit4000\XBee\XBee_Firmware\XBEE_API.LIB
library. Each node should have a
unique identifier.
#define NODEID_STR "RabbitXBee"
The XBee sample programs in the Dynamic C
SAMPLES\XBee
folder illustrate the use of
the XBee function calls.
•
AT_INTERACTIVE.C
—This sample program shows how to set up and use AT
commands with the XBee RF module.
The program will print out a list of AT commands in the Dynamic C
STDIO
window.
You may type in either “ATxx” or just the “xx” part of the command.
• Use just the AT command to read any of the values.
• Use [AT]xx yyyy (where the y is an integer up to 32 bits) to set any of the “set or read” values.
(Note that this works for NI, the
node identifier
, where the data will be a Node ID.string in quotes
— [AT]NI "Node ID string” where the quotes contain the string data)
• Type “menu” to redisplay the menu of commands.
• Press
F4
to exit and close the
STDIO
window.
•
AT_RUNONCE.C
—This sample program uses many of the most important and useful
AT commands. Several commands can either set a parameter or read it. This sample
program simply reads the parameters and displays the results.
Compile and run this sample program. The program will display the results in the
Dynamic C
STDIO
window.