ZigBee Receive Data example for mbed XBeeLib By Digi

Dependencies:   XBeeLib mbed

Description

This example shows how to receive data from a remote XBeeZB module.
A remote XBee module sends a packet to our local XBee module though the air. The local XBee module receives the packet and sends it to the mbed module through the serial port. This library decodes the packet and calls a user defined method to process the packet.

See Receiving Data from other module 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.

While the example is running, go to the "Console" tab of the X-CTU connected to the remote XBee module. Press the "Add API frame to the list" and paste following bytes that create a new broadcast transmit request packet:

7E 00 19 10 01 00 00 00 00 00 00 FF FF FF FE 00 00 48 65 6C 6C 6F 20 58 42 65 65 21 5A

Select the frame and press the "Send selected frame" button to send the frame ("Hello XBee!") to the XBee network.

Verify that the local XBee module has received the frame by accessing the debug interface console terminal. If it was successful, the "Hello XBee!" message will be displayed there.

Revision:
3:c615f29051e0
Parent:
1:6bb33e8b3b88
--- a/config.h	Fri May 08 11:52:54 2015 +0200
+++ b/config.h	Mon May 11 18:00:07 2015 +0200
@@ -2,12 +2,12 @@
 #if !defined(__CONFIG_H_)
 #define __CONFIG_H_
 
-//#define PATFORM_ARCHPRO
+#define PATFORM_ARCHPRO
 
 /** Library configuration options */
 #define ENABLE_LOGGING
 #define ENABLE_ASSERTIONS
-#define FRAME_BUFFER_SIZE   4
+#define FRAME_BUFFER_SIZE   10
 #define MAX_FRAME_PAYLOAD_LEN  128
 #define ENABLE_PM_SUPPORT
 
@@ -16,7 +16,7 @@
 #if defined(PATFORM_ARCHPRO)
 #define RADIO_TX            P4_28
 #define RADIO_RX            P4_29
-#define RADIO_RESET         NC
+#define RADIO_RESET         P2_13
 //#define RADIO_RESET         NC
 #define RADIO_SLEEP_REQ     NC
 #define RADIO_ON_SLEEP      NC