The ConnectCore 8M Nano Development Kit contains two different XBee sockets for connecting through-hole XBee modules:

  • XBEE CELLULAR (J39, J40): to connect an XBee Cellular module

  • XBEE USER (J41, J42): to connect an XBee RF module (non-cellular)

On the ConnectCore 8M Nano Development Kit:

  • XBee Cellular socket:

    • The XBee socket for cellular devices is connected through two interfaces:

      • MCA_UART0 of the MCA. MCA_UART0 is configured (4-wires) and enabled on the default ConnectCore 8M Nano Development Kit device tree.

      • USB_OTG1 bus (multiplexed with USB Hub).

    • The following XBee lines are connected to MCA GPIOs:

      • XBEE_RESET: Connected to MCA_IO15

      • XBEE_SLEEP_RQ: Connected to MCA_IO11

      • XBEE_ON/SLEEP_N: Connected to MCA_IO16

See MCA UART serial port, Universal Serial Bus (USB), and MCA General Purpose Input/Output (GPIO) for more information about these interfaces.

  • XBee User socket:

    • The XBee socket for RF modules is connected through UART4 of the {cpu-family} CPU. UART4 is configured (4-wires) and enabled on the default ConnectCore 8M Nano Development Kit device tree.

    • The following XBee lines are connected to {cpu-family} CPU GPIOs:

      • XBEE_RESET: Connected to GPIO1_IO08

      • XBEE_SLEEP_RQ: Connected to GPIO1_IO07

      • XBEE_ON/SLEEP_N: Connected to GPIO1_IO09

Kernel driver

The XBee does not require a specific driver.

Device tree bindings and customization

The XBee does not have specific device tree bindings. If using GPIOs of the CPU to control some XBee lines (such as RESET_N and SLEEP_RQ), you can configure the pinctrl for these as part of the UART node that is connected to the XBee User socket.

User space

XBee control lines

Digi Embedded Yocto provides a script that initializes the GPIOs connected to the RESET_N and SLEEP_RQ lines. The script requests such GPIOs through the sysfs, configures them as outputs, and:

  • sets SLEEP_RQ line low (to prevent the XBee device from entering sleep mode).

  • toggles RESET_N line on boot (to reset the XBee device).

If you are using different GPIOs than the Digi reference board defaults for connecting to the XBee, define them in your project’s conf/local.conf file:

conf/local.conf
# XBee (Cellular,User)
XBEE_RESET_N_GPIO ?= "508,8"
XBEE_SLEEP_RQ_GPIO ?= "504,7"

The GPIOs are defined as a list to support both XBee sockets (Cellular and User) assembled in the ConnectCore 8M Nano Development Kit board.

Basic validation

XBee RF module:

You can use the serial port to check that the XBee RF module is connected correctly.

  1. Configure the serial port to match the configured speed of the XBee. For example:

    # stty -F /dev/ttyXBee speed 9600 raw
    If your XBee is configured with specific parity and flow control settings, you may have to configure those settings on your serial port.
  2. On one terminal console, read from the serial port:

    # cat /dev/ttyXBee
  3. On a different terminal console, write +++ to the serial port:

    # echo -n +++ > /dev/ttyXBee

When the connection is successful, the console displays an OK response on the terminal that is reading the port.

See XBee libraries for additional information on advanced use of XBee modules.

XBee Cellular device:

The cellular support in Digi Embedded Yocto is based on the NetworkManager and ModemManager open source software packages. If the cellular device is configured correctly and plugged into the ConnectCore 8M Nano Development Kit board, the boot process automatically detects and initializes it. You can verify whether the cellular device was detected by executing the following command:

# mmcli -L

Found 1 modems:
        /org/freedesktop/ModemManager1/Modem/0 [u-blox] SARA-R410M-02B

Also you can use the serial port to communicate with the XBee Cellular module and verify the serial connectivity.

  1. Configure the serial port to match the configured speed of the XBee. For example:

    # stty -F /dev/ttyMCA0 speed 9600 raw
    If your XBee is configured with specific parity and flow control settings, you may have to configure those settings on your serial port.
  2. On one terminal console, read from the serial port:

    # cat /dev/ttyMCA0
  3. On a different terminal console, write +++ to the serial port:

    # echo -n +++ > /dev/ttyMCA0

When the connection is successful, the console displays an OK response on the terminal that is reading the port.

See also

See Cellular for additional information on the use of XBee Cellular devices.