How do I know if the XBee module has joined a network (spi API mode)?

After I send all the AT commands on powerup, I can see the “ASSOCIATE” output blinking, but I haven’t been able to find a command to send to the module to query its status.

If I just wait after sending the last initialization command nothing happens, I thought the XBee module was going to indicate me it’s status with the nINT line but it does not do that.

What would be the command to send to check if it has already joined? Or check its general status for that matter?

I’m controlling the XBee module with an MCU using the SPI-API mode only and I have no access to the UART, also the module is soldered to a board so no XCTU is possible. Additionally, I’m not using the xbee_ansi_c_lib because it’s not well suited for my needs.


You are looking for the AT Command: AI

Which will be 0 when it is connected to a network.

Nice! Thanks! I don’t know how that went over my head, there are so many commands.