Is there an Arduino port for the xbee ansi c library?

Does anyone know if there is an Arduino port for the XBEE ANSI library?



Not that I’m aware of. When I considered it in the past, I think the issue was that the Arduino didn’t support hardware flow control on its serial port. That’s a key requirement for the library to work well. It needs to stop sending based in the XBee module’s CTS signal, and it needs to use its RTS signal to tell the XBee module when to stop sending.

If that’s changed in the past 7 years, then it shouldn’t be difficult to port the code. The “ports” directory has a README describing what’s necessary to get it onto another platform. You’d have to set up a platform header file and then write some glue functions to connect the “xbee_serial” APIs to the native Arduino serial port APIs.

Teensy 4.1 supports hardware flow control on 2 UART ports.

Unfortunately 1 is consumed by one of the 3 CAN channels so that leaves one UART channel with hardware flow control.