Library to easily communicate with XBee modules.

Dependencies:   DigiLogger

Dependents:   WaterLogger XbeeGateway XBee_Cooker ProjetReceiver ... more

Example Common Setup

Table of Contents

    In this chapter we'll describe the setup required to evaluate the examples. That implies creating a wireless network between two XBee modules.
    One of them will be physically connected to the mbed module though a serial link. We'll call it the 'local XBee module'. The other one will be called the 'remote XBee module'

    Remote Setup

    The more comfortable remote setup to evaluate these examples is having the remote XBee module mounted in baseboard (XBIB, TODO....) and connected to the PC through an usb cable to create a serial connection.
    Open XCTU tool and connect to the remote XBee module through corresponding serial connection.
    With XCTU tool its easy to configure the remote XBee module settings so it creates a wireless network with the local XBee module. Once the network is created, you can even discover the local XBee module through the air and check that the module settings match the requirements explained in the 'Local Setup' chapter.
    The XCTU tool is later used to evaluate the examples by injecting or monitoring packets in the network.


    When using ZigBee modules, it's usual that the 'Remote XBee' it's an X-STICK module acting as the network coordinator.

    Local Setup

    The local setup includes:

    1. The mbed module and its debug connection to the PC (normally an usb cable)
      So you can see the sample application debug messages. For that you have to configure the DEBUG_TX and DEBUG_RX pins in config.h and open a console in the PC on the corresponding serial port.
      See Configuring the library and Debugging the library chapters for more info.
    2. The connection between the mbed module and the local XBee module
      That includes at least wiring and configuring RADIO_TX and RADIO_RX in config.h. Wiring RADIO_RESET is highly recommended as well.
      See Configuring the library and Initializing modules chapters for more info.
    3. The local XBee module persistent configuration
      This library expects that the local XBee module has the default settings stored (but for the "AP" setting that must be set to 1 or 2). You can verify those settings previous to run the example using XCTU tool through following two options:
      - Having the local radio wired to the mbed module, you can discover the local XBee module from the remote XBee module in the same network as explained in the 'Remote Setup' chapter.
      - You can temporarily unplug the local XBee module from the mbed module and plug it to the PC.
      Special care must be taken with following settings:
    • "ID" and rest of Networking settings: Leave them default or customize them as in your remote XBee module. The important thing is that both local and remote XBee modules create a network. This library has methods to change these settings but the sample applications are not calling them.
    • Firmware: In S2B modules, end-device firmware will complicate evaluation of standard examples because the radio will sleep automatically. To avoid that it's recommended to flash 'router' firmware that make devices don't sleep.
    • "SM" setting: Set it to 0=No Sleep.
    • "BD" setting: The sample applications expect it set to 3=9600bps. If you change it, change it in the sample application accordingly (See Initializing modules chapters for more info).
    • "AP" setting: It's compulsory to change this setting set to 1 or 2 !!!!.

    All wikipages