ZigBee AT Commands example for mbed XBeeLib By Digi

Dependencies:   XBeeLib mbed

This example shows how to read and change configuration parameters of either the local XBee module or a remote XBee module.

See Configuring local and remote modules chapter for more information.

Common Setup

Make sure you have a valid Example Common Setup

Example Setup

Application

You have to configure the remote device 64-bit address by customizing the REMOTE_NODE_ADDR64_MSB and REMOTE_NODE_ADDR64_LSB defines with the remote XBee module 64-bit address.

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.
Once joined to the coordinator, the application will do following operations:

OperationXBee moduleparameterVerification
ReadlocalSLThe result is asserted against the known local module SL value. So just check the assertion passed
SetlocalNIClick 'discover remote devices' on the X-CTU connected to the remote. Should discover the local XBee module with the new NI (ni_example_local)
ReadremoteSLThe result is asserted against the known remote module SL value. So just check the assertion passed
SetremoteNIRefresh the 'NI' parameter in the X-CTU connected to the remote and check it has changed to the new NI (ni_example_remote)
Committer:
hbujanda
Date:
Mon May 11 17:59:26 2015 +0200
Revision:
3:91b39019eec3
Parent:
1:f5686759c861
Automatic upload

Who changed what in which revision?

UserRevisionLine numberNew contents of line
hbujanda 0:fd8c52820c01 1
hbujanda 0:fd8c52820c01 2 #if !defined(__CONFIG_H_)
hbujanda 0:fd8c52820c01 3 #define __CONFIG_H_
hbujanda 0:fd8c52820c01 4
hbujanda 3:91b39019eec3 5 #define PATFORM_ARCHPRO
hbujanda 0:fd8c52820c01 6
hbujanda 0:fd8c52820c01 7 /** Library configuration options */
hbujanda 0:fd8c52820c01 8 #define ENABLE_LOGGING
hbujanda 0:fd8c52820c01 9 #define ENABLE_ASSERTIONS
hbujanda 3:91b39019eec3 10 #define FRAME_BUFFER_SIZE 10
hbujanda 0:fd8c52820c01 11 #define MAX_FRAME_PAYLOAD_LEN 128
hbujanda 0:fd8c52820c01 12 #define ENABLE_PM_SUPPORT
hbujanda 0:fd8c52820c01 13
hbujanda 0:fd8c52820c01 14 #define SYNC_OPS_TIMEOUT_MS 2000
hbujanda 0:fd8c52820c01 15
hbujanda 0:fd8c52820c01 16 #if defined(PATFORM_ARCHPRO)
hbujanda 0:fd8c52820c01 17 #define RADIO_TX P4_28
hbujanda 0:fd8c52820c01 18 #define RADIO_RX P4_29
hbujanda 3:91b39019eec3 19 #define RADIO_RESET P2_13
hbujanda 0:fd8c52820c01 20 //#define RADIO_RESET NC
hbujanda 0:fd8c52820c01 21 #define RADIO_SLEEP_REQ NC
hbujanda 0:fd8c52820c01 22 #define RADIO_ON_SLEEP NC
hbujanda 0:fd8c52820c01 23 #define DEBUG_TX P0_2
hbujanda 0:fd8c52820c01 24 #define DEBUG_RX P0_3
hbujanda 0:fd8c52820c01 25 #elif defined(TARGET_LPC1768)
hbujanda 0:fd8c52820c01 26 #define RADIO_TX p9
hbujanda 0:fd8c52820c01 27 #define RADIO_RX p10
hbujanda 0:fd8c52820c01 28 #define RADIO_RESET p30
hbujanda 0:fd8c52820c01 29 #define RADIO_SLEEP_REQ NC
hbujanda 0:fd8c52820c01 30 #define RADIO_ON_SLEEP NC
hbujanda 0:fd8c52820c01 31 #define DEBUG_TX P0_2
hbujanda 0:fd8c52820c01 32 #define DEBUG_RX P0_3
hbujanda 0:fd8c52820c01 33 #elif defined(TARGET_FRDM_KL25)
hbujanda 0:fd8c52820c01 34 #define RADIO_TX PTD3
hbujanda 0:fd8c52820c01 35 #define RADIO_RX PTD2
hbujanda 0:fd8c52820c01 36 #define RADIO_RESET NC
hbujanda 0:fd8c52820c01 37 #define RADIO_SLEEP_REQ NC
hbujanda 0:fd8c52820c01 38 #define RADIO_ON_SLEEP NC
hbujanda 0:fd8c52820c01 39 #define DEBUG_TX USBTX
hbujanda 0:fd8c52820c01 40 #define DEBUG_RX USBRX
hbujanda 0:fd8c52820c01 41 #elif (defined TARGET_LPC11U24)
hbujanda 0:fd8c52820c01 42 #define RADIO_TX p9
hbujanda 0:fd8c52820c01 43 #define RADIO_RX p10
hbujanda 0:fd8c52820c01 44 #define RADIO_RESET p30
hbujanda 0:fd8c52820c01 45 #define RADIO_SLEEP_REQ NC
hbujanda 0:fd8c52820c01 46 #define RADIO_ON_SLEEP NC
hbujanda 0:fd8c52820c01 47 #define DEBUG_TX USBTX
hbujanda 0:fd8c52820c01 48 #define DEBUG_RX USBRX
hbujanda 0:fd8c52820c01 49 #else
hbujanda 0:fd8c52820c01 50 #error "Define a platform"
hbujanda 0:fd8c52820c01 51 #endif
hbujanda 0:fd8c52820c01 52
hbujanda 0:fd8c52820c01 53 #endif /* __CONFIG_H_ */
hbujanda 0:fd8c52820c01 54