XBee socket
The ConnectCore 6 SBC assembles an XBee socket that allows you to connect any XBee module.
Note See the ConnectCore for i.MX6 SBC Hardware Reference Manual for the XBee socket pin-out description.
Device tree bindings and customization
XBee modules are interfaced through UART5 of the i.MX6 CPU. This UART is enabled on the SBC device tree by default, but you must enable it on the Device tree for your platform before you can use it.
See Universal Asynchronous Receiver/Transmitter (UART).
Some GPIOs of the i.MX6 CPU are used to control the following XBee lines:
- XBEE_ON/SLEEP_N
- XBEE_RESET_N
- XBEE_SLEEP_RQ
There is no specific XBee driver, so the IOMUX for these GPIOs must be configured in the hog section of your device tree.
ConnectCore 6 SBC device tree
hog { pinctrl_hog: hog { fsl,pins = < [...] /* XBEE_ON / SLEEP_N */ MX6QDL_PAD_EIM_D27__GPIO3_IO27 0x80000000 /* XBEE_RESET_N */ MX6QDL_PAD_EIM_D28__GPIO3_IO28 0x80000000 /* XBEE_SLEEP_RQ */ MX6QDL_PAD_EIM_D29__GPIO3_IO29 0x80000000 >; }; };
User space
Basic validation
You can use the serial port to check that the XBee module is connected correctly.
Note If 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/ttymxc4
- On a different terminal console, write +++ to the serial port:
echo -n +++ > /dev/ttymxc4
When the connection is successful, the console displays an OK response on the terminal that is reading the port.
XBee libraries
For more advanced use of XBee modules, see the following libraries:
- XBee Java Library: https://github.com/digidotcom/XBeeJavaLibrary
- XBee ANSI C Library: https://github.com/digidotcom/xbee_ansic_library