Home/Support/Support Forum/Xbee unable to change IOMode of DIO3_AD3 to ADC for remote analog

Xbee unable to change IOMode of DIO3_AD3 to ADC for remote analog

0 votes
Hi guys,

I am currently have 2 XBee-PRO 900HP modules with the Grove Development Boards. I'm using one as a base, connected via a USB cable to my laptop and one that is powered by batteries with a voltage stabilizer giving the Vcc required to power it up. I have a 1V to 2.5V signal coming in on Pin 17 (DIO3_AD3) giving an analog voltage signal.

I'm currently using XBeeJavaLibrary and following this script https://github.com/digidotcom/XBeeJavaLibrary/blob/master/examples/io/RemoteADCSample/src/com/digi/xbee/api/remoteadc/MainApp.java to try to get the readings from my remote module.

But it seems to be getting killed at setting the IOConfiguration [remoteDevice.setIOConfiguration(IOLINE_IN, IOMode.ADC);] with a "Status Error".

So I tried using the XCTU to do the same thing by searching for the remote board and changing the value of "D3" to "ADC", but it gave me a Status Error as well.

Has anyone met with this error and knows what it is looking for or how to solve it?

Appreciate any assistance.

Thanks,
R
asked May 19, 2017 in RF Solutions and XBee by rmus New to the Community (0 points)

Please log in or register to answer this question.

1 Answer

0 votes
What is the command you are provided the 900 HP? That is what is the API frame you are sending?
answered May 23, 2017 by mvut Veteran of the Digi Community (12,302 points)
Hi mvut,

I did not use the API frame to transmit the commands. I tried to use the GUI of the XCTU to "write" the D3 value to the system but it gave me a Status Error pop-up.

I used the XBeeJavaLibrary and tried remoteDevice.setIOConfiguration(IOLINE_IN, IOMode.ADC); to set the IOConfiguration of the remote Xbee but this did not work.

Is there anywhere I am able to find the API frame to transmit the command to setIOConfiguration and subsequently read the ADC from that pin?

R
In order to use the Remote configuration option or ADC, the local radio connected to the PC and the radio that is going to be outputting the ADC value both must be in API mode.
I have both receiving and sending as API mode (AP = 1, API Mode Without Escapes) but I'm still receiving an error.

I tried transmitting the following remote command request:

Remote AT Command Request (API 1)

7E 00 10 17 01 [64 bit dest. address] FF FE 02 44 33 32 B3

Start delimiter: 7E
Length: 00 10 (16)
Frame type: 17 (Remote AT Command Request)
Frame ID: 01 (1)
16-bit dest. address: FF FE
Command options: 02
AT Command: 44 33 (D3)
Parameter: 32
Checksum: B3

And got the following answer:

Remote Command Response (API 1)

7E 00 0F 97 01 [64 bit source address] FF FE 44 33 01 66

Start delimiter: 7E
Length: 00 0F (15)
Frame type: 97 (Remote Command Response)
Frame ID: 01 (1)
16-bit source address: FF FE
AT Command: 44 33 (D3)
Status: 01 (Status Error)
Checksum: 66

I seem to keep getting the Status Error and have no idea why this is happening.

Any ideas?

R
The issue is that you are providing a Hex value for an ASCII character when in fact, the value is already Hex. That is instead of sending a 0x32 value for 2, just issue 0x02.
That doesn't seem to work for me.

Remote AT Command Request (API 1)

7E 00 10 17 01 [64 bit dest. address] FF FE 02 44 33 02 E3

Start delimiter: 7E
Length: 00 10 (16)
Frame type: 17 (Remote AT Command Request)
Frame ID: 01 (1)
16-bit dest. address: FF FE
Command options: 02
AT Command: 44 33 (D3)
Parameter: 02
Checksum: E3

And got the following answer:

Remote Command Response (API 1)

7E 00 0F 97 01 [64 bit source address] FF FE 44 33 01 66

Start delimiter: 7E
Length: 00 0F (15)
Frame type: 97 (Remote Command Response)
Frame ID: 01 (1)
16-bit source address: FF FE
AT Command: 44 33 (D3)
Status: 01 (Status Error)
Checksum: 66

R
What firmware version are you working with on both sides?
Both are on Firmware version 8074
Product family: XBP9B-DM
Function set: XBee PRO 900HP 200K

R
Try 7E 00 0F 17 01 00 00 00 00 00 00 FF FF FF FE 02 44 33 73
I managed to send that out but it doesn't seem to be changing the Remote IO function type
This looks to be reading the remote XBee's D3 parameter?

Remote AT Command Request (API 1)

7E 00 0F 17 01 00 00 00 00 00 00 FF FF FF FE 02 44 33 73

Start delimiter: 7E
Length: 00 0F (15)
Frame type: 17 (Remote AT Command Request)
Frame ID: 01 (1)
64-bit dest. address: 00 00 00 00 00 00 FF FF
16-bit dest. address: FF FE
Command options: 02
AT Command: 44 33 (D3)
Checksum: 73

Remote Command Response (API 1)

7E 00 10 97 01 [64-bit source address] FF FE 44 33 00 01 66

Start delimiter: 7E
Length: 00 10 (16)
Frame type: 97 (Remote Command Response)
Frame ID: 01 (1)
16-bit source address: FF FE
AT Command: 44 33 (D3)
Status: 00 (Status OK)
Response: 01
Checksum: 66

Response is still 01 (SPI Slave Select) instead of 02 (ADC).
That is correct. The API frame of 7E 00 0F 17 01 00 00 00 00 00 00 FF FF FF FE 02 44 33 73 is only querying the value of the D3 parameter.  If you wanted to set it to a value, then the frame would need to look something like 7E 00 10 17 01 00 00 00 00 00 00 FF FF FF FE 02 44 33 03 70
...