Cannot reconfigure P2 (DIO12) over the air as a Digital Output High/Low

Hello,

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.

Any help would be greatly appreciated!
Matthew

Are you able to change its settings via the UART and the ATP2 command directly?

1 Like

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.

Sounds like you are in transparent mode instead of API mode.

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?

No, only the node sending the commands needs to be in API mode.

As for SPI, on the modules in quesiton, is the SPI port Enabled?

Yes it appears that the SPI port is enabled.

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.

The settings on the base unit:

00FFFFFFFFFFF7FFFF
0
527C
3
4
A
0
0
7
1
3
0
FFFF
C0
I2R AgMaster Base
82
5
11
1

  3
  0
  0
  3
  13F
  2
  0
  1
  0
  0
  0
  0
  1
  0
  1
  1
  1
  1
  0
  0
  1
  1
  7FFF
  7FFF
  0
  0
  0
  28
  1
  0
  1
  0
  0
  2
  1
  12C
  BB8
  0
  2B
  64
  3E8
  B0000

And the settings on the remote node:

00FFFFFFFFFFF7FFFF
0
527C
3
4
A
0
0
7
1
3
0
FFFF
C0
Node 1
82
0
11
0

  3
  0
  0
  3
  13F
  0
  0
  2
  2
  1
  1
  1
  4
  0
  0
  0
  3
  1
  0
  1
  1
  1
  7FFF
  7FFF
  0
  0
  0
  28
  1
  0
  1
  0
  0
  2
  1
  12C
  BB8
  0
  2B
  64
  3E8
  B0000

I can switch D5 to Digital Output Low and High but cannot change P2 (DIO12).

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.

Yes it appears you are correct. The third party breakout board appears to hold the SPI lines on and will not let them switch to digital IO mode.