The ConnectCore MP25 Development Kit assembles an XBee socket that allows you to connect a through-hole XBee module.
| See the ConnectCore MP25 Hardware Reference Manual for the XBee socket pin-out description. |
On the ConnectCore MP25 Development Kit:
The XBee module is interfaced through two interfaces:
-
UART5 of the STM32MP25 CPU. UART5 is configured (4-wires) on the ConnectCore MP25 Development Kit device tree include file and enabled by default on the ConnectCore MP25 Development Kit device tree file.
-
Port 4 of the USB hub connected to USB2H bus.
This bus is also routed to the USB expansion connector. If using the XBee via USB, make sure you don’t connect another device via the expansion connector.
See Universal Asynchronous Receiver/Transmitter (UART) and Universal Serial Bus (USB) for more information about these interfaces.
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 socket.
XBee configuration in meta-digi
Digi Embedded Yocto provides a script that initializes the GPIOs connected to the RESET_N and SLEEP_RQ lines:
-
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).
The meta-digi layer contains the following variables to configure the XBee at the platform configuration file meta-digi-arm/conf/machine/ccmp25-dvk.conf:
| Variable | Description | Default value for DVK |
|---|---|---|
XBEE_TTY |
UART node routed to the XBee connector (symlink |
|
XBEE_RESET_N_GPIO |
GPIO connected to the XBee reset line |
|
XBEE_SLEEP_RQ_GPIO |
GPIO connected to the XBee SLEEP_REQUEST line |
|
Configure your own values by setting these variables on your project’s conf/local.conf.
User space
Basic validation
You can use the serial port to check that the XBee module is connected correctly.
-
Configure the serial port to match the configured speed of the XBee. For example:
# stty -F /dev/ttyXBee speed 9600 rawIf your XBee is configured with specific parity and flow control settings, you may have to configure those settings on your serial port. -
On one terminal console, read from the serial port:
# cat /dev/ttyXBee -
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. |
See also
See Cellular for additional information on the use of XBee cellular devices.