I am having issues using remote AT commands to set P2 (DIO12) on an Xbee Pro to a digital output high/low.
I have two XBP9B-DMST-022(-ND) Xbee units, one is connected to my PC via a USB Xbee Explorer adaptor using X-CTU and the other is connected to an IO expander board.
There are two relays that I wish to control remotely and they are connected to DIO5 and DIO12.
When manipulating DIO5, there is no problem but attempting to set P2 (DIO12) to Digital Output High (5) I get a “Status Error”. A copy of the remote command request and response is below:
Remote AT Command Request
7E 00 10 17 01 00 13 A2 00 40 C8 D3 16 FF FE 02 50 32 05 BB
Remote Command Response
7E 00 0F 97 01 00 13 A2 00 40 C8 D3 16 FF FE 50 32 01 41
I have searched this forum and the knowledgebase along with searching through the user manual but cannot find why I cannot manipulate this pin.
When connected directly to the module via the USB explorer, X-CTU will allow me to set P2 as a Digital Out. I have not tried setting it directly with the AT command from a serial console though.
I thought that initially as well but the main base module has API=2 and I can switch other pins to Digital Out Low/High fine, just P2 (DIO12) and a couple of other pins that seem to be initially set for SPI comms.
Just so I am sure, do all the modules need API mode set or just the master/base one that is issuing the remote AT commands?
If I look at the IO settings for the module in X-CTU it shows D2, D3, D4 and P2 (DIO12) with SPI settings. If I try and change any of them to say Disabled it gives me a status error.
You are going to need to re-enable the UART on that module directly before you are going to be able to disable the SPI port settings. You are most likely going to need to change the settings first and then reset the module with the SPI lines disconnected for it to work.