ZigBee Modem Status example for mbed XBeeLib By Digi

Dependencies:   XBeeLib mbed

Description

This example shows how to register a function callback to be aware of modem status changes. This library will call the registered callback whenever the XBee module radio modem changes its status

See Handling modem status changes chapter for more information.

Common Setup

Make sure you have a valid Example Common Setup

Example Setup

This example does not require any additional setup.

Running the example

Build and deploy the example to the mbed module.
Reset the mbed module so the example starts. You should see the example debug information through the debug interface configured in the 'Local Setup' chapter.

It you set up a network as described in the Common Setup section, you should see following modem status in the debug interface:

  • Modem Status 0x0: Corresponds to 'HwReset' meaning 'Hardware reset'
  • Modem Status 0x2: Corresponds to 'JoinedNW' meaning 'Joined network (ZigBee routers and end devices)'

Note: You may not see the HwReset modem status if the device is joining to the coordinator fast (within the call to xbee.init())

If you now unplug the network coordinator you should see following modem status in the debug interface:

  • Modem Status 0x3: Corresponds to 'Disassociated' meaning 'Disassociated (ZigBee)'
Revision:
6:a75fe0a5c249
Parent:
5:812eb41298b4
--- a/config.h	Mon May 18 13:19:23 2015 +0200
+++ b/config.h	Mon Jun 01 19:01:51 2015 +0200
@@ -18,7 +18,6 @@
 #define ENABLE_ASSERTIONS
 #define FRAME_BUFFER_SIZE           4
 #define MAX_FRAME_PAYLOAD_LEN       128
-#define ENABLE_PM_SUPPORT
 
 #define SYNC_OPS_TIMEOUT_MS         2000