The ConnectCore 8X SBC Express and ConnectCore 8X SBC Pro assemble an XBee socket that allows you to connect a through-hole XBee module.

See the ConnectCore 8X SBC Pro Hardware Reference Manual for the XBee socket pin-out description.

On the ConnectCore 8X SBC Express:

  • The XBee module is connected through two interfaces:

    • LPUART0 of the i.MX8QXP CPU. LPUART0 is configured (4-wires) and enabled on the default ConnectCore 8X SBC Express device tree.

    • USB_OTG2 bus.

      The USB_OTG2 bus is also routed to the bottom port of the stackable dual USB A-type connector on the top side of the board. If using the XBee via USB, make sure you don’t connect another device on the USB connector.

The following XBee lines are connected to i.MX8QXP CPU GPIOs:

  • XBEE_RESET: Connected to GPIO3_IO13

  • XBEE_SLEEP_RQ: Connected to GPIO3_IO16

  • XBEE_ON/SLP_N: Connected to GPIO3_IO14

On the ConnectCore 8X SBC Pro:

  • The XBee module is connected through two interfaces:

    • MCA_UART2 of the MCA. MCA_UART2 is configured (4-wires) and enabled on the default ConnectCore 8X SBC Pro device tree.

    • USB_OTG1 bus.

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

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 (like in the case of ConnectCore 8X SBC Express) for controlling some XBee lines (RESET_N, SLEEP_RQ…​) you can configure the pinctrl for these as part of the UART node that’s connected to the XBee 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 (for having XBee running)

  • sets RESET_N line low and high (to reset the XBee)

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:

# XBee

Basic validation

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

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

    ~# stty -F /dev/ttyLP0 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/ttyLP0
  3. On a different terminal console, write +++ to the serial port:

    ~# echo -n +++ > /dev/ttyLP0

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.

See also

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