I have an XBee that I want to use on a Raspberry Pi that I would like to use use to receive and transmit data through the Raspberry Pi's SPI port. I am using a shield (https://www.cooking-hacks.com/documentation/tutorials/raspberry-pi-to-arduino-shields-connection-bridge/) that connects both the serial and the SPI ports of the XBee to the Raspberry Pi.
The regular serial port (Tx and Rx pins) on the Raspberry Pi is already used for something else. I would like to avoid the use of the USB ports as these will need to be free and the whole solution should be fairly compact (only room for the shield) so no external USB hubs or whatever.
I've seem in the user manual that the XBee is usable in API mode through its SPI interface. So I've been looking everywhere for an API library that can send and receive frames in API mode through SPI to the XBee to avoid having to rewrite my own. However, I can only find implementations that communicate through Serial (UART). I have found the following 3 options:
- ANSI C library (from Digi)
- Python XBee (https://pypi.python.org/pypi/XBee)
- arduPi + XBee Arduino
All of their interfaces seem imcompatible with SPI as far as I can see. Is there a way I could use them without having to modify these libraries? Or perhaps, are there existing libraries or a method to do this that I am unaware of?
Thanks in advance!