User`s manual

BL4S100 Users Manual 135
Make the following modifications to the MODEMFWLOAD.C sample program.before you
run it according to whether you will be using the BL4S100/BL4S150 as a coordinator, a
router, or an end device.
Select the XBee role macro according to whether the BL4S100/BL4S150 is being used
as a coordinator, a router or an end-device.
#define XBEE_ROLE NODE_TYPE_COORD
#define XBEE_ROLE NODE_TYPE_ROUTER
#define XBEE_ROLE NODE_TYPE_ENDDEV
Some Rabbit boards use the ZNet 2.5 protocol. The BL4S100/BL42150 use the ZB
protocol. Make sure the #define statement calls for the ZB protocol.
#define XBEE_PROTOCOL XBEE_PROTOCOL_ZB
F.2 Digi
®
XBee USB Configuration
The Digi XBee USB device is an optional accessory and is available as a part of the Mesh
Networking Add on Kit (101-1272), or for separate purchase (101-1286). It is not a part of
the standard BL4S200 Tool Kit.
You may experience difficulty when you use the ZigBee sample programs and the Digi
®
XBee USB with the default settings if you are working simultaneously with more than one
ZigBee coordinator.
Section 6.2.2 explains how to set up the BL4S100/BL4S150 configuration patterns for the
sample programs via macros in the Dynamic C LIB\Rabbit4000\XBee\XBEE_API.LIB
library folder.
Channel mask — defaults to 0x1FFE, i.e., all 16 possible channels via the macro in the
Dynamic C
LIB\Rabbit4000
\XBee\XBEE_API.LIB library.
#define DEFAULT_CHANNELS ZB_DEFAULT_CHANNELS
For example, to limit the channels to three channels, the macro would read as follows.
#define DEFAULT_CHANNELS 0x000E
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"
The same configurations must then be applied to the Digi
®
XBee USB via Digi’s X-CTU
utility. If you have not previously used this utility, install it from the Dynamic C
Utilities\X-CTU folder by double-clicking Setup_x-ctu.exe,