User’s Manual
59
Node ID
— the ID of your particular node via the macro in the Dynamic C
LIB\
Rabbit4000\XBee\XBEE_API.LIB
library. Each node should have a unique identifier of up
to 20 printable characters.
• Defaults to
RabbitXBee
.
• Can be set to a global variable, or to a function that returns a pointer to a static buffer.
#define NODEID_STR "RabbitXBee"
The XBee sample programs in the Dynamic C
SAMPLES\XBee
folder illustrate the use of AT
commands with the XBee RF module.
•
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).
Note that you can also use hex notation by prefixing the parameter with 0x and using an even number of hex
characters.
• 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 com-
mands. 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.