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

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

0 votes
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:
Code:
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
asked Mar 24, 2015 in RF Solutions and XBee by matqua New to the Community (1 point)
edited Mar 24, 2015 by matqua

Please log in or register to answer this question.

1 Answer

+1 vote
Are you able to change its settings via the UART and the ATP2 command directly?
answered Mar 25, 2015 by mvut Veteran of the Digi Community (12,354 points)
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?
The settings on the base unit:

  <setting command="CM">00FFFFFFFFFFF7FFFF</setting>
      <setting command="HP">0</setting>
      <setting command="ID">527C</setting>
      <setting command="MT">3</setting>
      <setting command="PL">4</setting>
      <setting command="RR">A</setting>
      <setting command="CE">0</setting>
      <setting command="BH">0</setting>
      <setting command="NH">7</setting>
      <setting command="MR">1</setting>
      <setting command="NN">3</setting>
      <setting command="DH">0</setting>
      <setting command="DL">FFFF</setting>
      <setting command="TO">C0</setting>
      <setting command="NI">I2R AgMaster Base</setting>
      <setting command="NT">82</setting>
      <setting command="NO">5</setting>
      <setting command="CI">11</setting>
      <setting command="EE">1</setting>
      <setting command="KY"></setting>
      <setting command="BD">3</setting>
      <setting command="NB">0</setting>
      <setting command="SB">0</setting>
      <setting command="RO">3</setting>
      <setting command="FT">13F</setting>
      <setting command="AP">2</setting>
      <setting command="AO">0</setting>
      <setting command="D0">1</setting>
      <setting command="D1">0</setting>
      <setting command="D2">0</setting>
      <setting command="D3">0</setting>
      <setting command="D4">0</setting>
      <setting command="D5">1</setting>
      <setting command="D6">0</setting>
      <setting command="D7">1</setting>
      <setting command="D8">1</setting>
      <setting command="D9">1</setting>
      <setting command="P0">1</setting>
      <setting command="P1">0</setting>
      <setting command="P2">0</setting>
      <setting command="P3">1</setting>
      <setting command="P4">1</setting>
      <setting command="PD">7FFF</setting>
      <setting command="PR">7FFF</setting>
      <setting command="M0">0</setting>
      <setting command="M1">0</setting>
      <setting command="LT">0</setting>
      <setting command="RP">28</setting>
      <setting command="AV">1</setting>
      <setting command="IC">0</setting>
      <setting command="IF">1</setting>
      <setting command="IR">0</setting>
      <setting command="SM">0</setting>
      <setting command="SO">2</setting>
      <setting command="SN">1</setting>
      <setting command="SP">12C</setting>
      <setting command="ST">BB8</setting>
      <setting command="WH">0</setting>
      <setting command="CC">2B</setting>
      <setting command="CT">64</setting>
      <setting command="GT">3E8</setting>
      <setting command="DD">B0000</setting>

And the settings on the remote node:

  <setting command="CM">00FFFFFFFFFFF7FFFF</setting>
      <setting command="HP">0</setting>
      <setting command="ID">527C</setting>
      <setting command="MT">3</setting>
      <setting command="PL">4</setting>
      <setting command="RR">A</setting>
      <setting command="CE">0</setting>
      <setting command="BH">0</setting>
      <setting command="NH">7</setting>
      <setting command="MR">1</setting>
      <setting command="NN">3</setting>
      <setting command="DH">0</setting>
      <setting command="DL">FFFF</setting>
      <setting command="TO">C0</setting>
      <setting command="NI">Node 1</setting>
      <setting command="NT">82</setting>
      <setting command="NO">0</setting>
      <setting command="CI">11</setting>
      <setting command="EE">0</setting>
      <setting command="KY"></setting>
      <setting command="BD">3</setting>
      <setting command="NB">0</setting>
      <setting command="SB">0</setting>
      <setting command="RO">3</setting>
      <setting command="FT">13F</setting>
      <setting command="AP">0</setting>
      <setting command="AO">0</setting>
      <setting command="D0">2</setting>
      <setting command="D1">2</setting>
      <setting command="D2">1</setting>
      <setting command="D3">1</setting>
      <setting command="D4">1</setting>
      <setting command="D5">4</setting>
      <setting command="D6">0</setting>
      <setting command="D7">0</setting>
      <setting command="D8">0</setting>
      <setting command="D9">3</setting>
      <setting command="P0">1</setting>
      <setting command="P1">0</setting>
      <setting command="P2">1</setting>
      <setting command="P3">1</setting>
      <setting command="P4">1</setting>
      <setting command="PD">7FFF</setting>
      <setting command="PR">7FFF</setting>
      <setting command="M0">0</setting>
      <setting command="M1">0</setting>
      <setting command="LT">0</setting>
      <setting command="RP">28</setting>
      <setting command="AV">1</setting>
      <setting command="IC">0</setting>
      <setting command="IF">1</setting>
      <setting command="IR">0</setting>
      <setting command="SM">0</setting>
      <setting command="SO">2</setting>
      <setting command="SN">1</setting>
      <setting command="SP">12C</setting>
      <setting command="ST">BB8</setting>
      <setting command="WH">0</setting>
      <setting command="CC">2B</setting>
      <setting command="CT">64</setting>
      <setting command="GT">3E8</setting>
      <setting command="DD">B0000</setting>

I can switch D5 to Digital Output Low and High but cannot change P2 (DIO12).
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.
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.
...