Home/Support/Support Forum/API Remote AT command of Node Discover

API Remote AT command of Node Discover

0 votes
Hi,

I am a little confused whether it is possible to send remote AT command (specifically ND) through API packet.

The digi representative told me that what I'm attempting is sending local command (ND) remotely, and is not possible. However, on the XBee product manual, under "API Operation: Remote Command Response" section, it says:

"Some commands may send back multiple frames--for example, Node Discover (ND) command."

suggesting this is implemented and probably possible.

Has anyone successfully tried sending ND over API, or does anyone know for sure whether it works?


Thank you very much.

Yubo

Hardware: XBee 802.15.4, FW 10E6.
asked Oct 20, 2010 in IEEE 802.15.4 by gyokuya New to the Community (0 points)

Please log in or register to answer this question.

3 Answers

0 votes
My guess is that it would work. But why don't you try it and let us know.
answered Oct 25, 2010 by waltr Community Contributor (85 points)
0 votes
I tried this some tine ago, and it didn't work for me. I don't think you can do it. The ND command works on the local node, but I don't believe you can use it on a remote node.
answered Nov 13, 2010 by johnf Veteran of the Digi Community (464 points)
0 votes
Quote:
Hi,

I am a little confused whether it is possible to send remote AT command (specifically ND) through API packet.

....

Hardware: XBee 802.15.4, FW 10E6.


Yes - it is very possible to do this -- or at least it is for the XBee ZB modules -- what follows assumes that the API for the 802.15.4 modules is equivalent.

This assumption seems reasonable, based on a quick look at the 802.15.4 module documentation , pg 60.

Quick version --- here is a sample line that does work for the ZB version and should work for you, when sent from the XCTU:

7E 00 0F 17 01 00 13 A2 00 nn nn nn nn FF FE 00 4E 44 ZZ [0D]

where:

- each pair above is a single byte -- e.g. "7E" is the hex byte 0x7E, etc.

- "nn nn nn nn" is the low 4 bytes of the 64 bit address of the module you are commanding

- "ZZ" is the correctly calculate checksum for the API command (from the 0x17 to the "0x44").

- 0x0D is an ASCII carraige return


Details

To try this using the XCTU tool, be sure to
0. go to the terminal tab and click the "Show Hex" button
1. open the "Assemble Packet" window on the terminal tab;
2. check the "HEX" radio button in the lower right
3. Enter the values above into the window, (after substituting for "nn..." and calculating the checksum, obviously)
4. Hit the "send data" button.

You should get back one 0x97 API message for every node that responds to your target node - If the target gets replies from five nodes to it's ND command, then you would get five 0x97 messages out the UART.

Gotcha's I had to work through to figure out the above...

1. Use assemble packet in hex mode when building API commands for XCTU -- otherwise typing "7E" generates two hex bytes (0x37 0x45) instead of the single byte 0x7E, etc.

2. You will not get any response unless you have a non-zero value for the frame ID --- try the above sample, but change the 5th byte to 00 instead of 01 -- no response.

This is a bit counter- intuitive -- after all why wouldn't I want to see the answer to my query? - but the API is being consistent, and does say

"If set to ‘0’, no AT Command Response will be given."


3. That "0D" on the end is (in general) not optional -- for some commands, nothing will happens if it's not there -- (or unless you enter the CR on the terminal window

Curiously, it wasn't needed above, but it is needed if one tries to send the _local_ ATND command using 7E 00 04 08 01 4E 44 64



Obviously, this description applies to using the XCTU tool (5.2.5.0 is what I have), but the gotcha's should be similar for whatever code you're using to generate input to the module.


good luck,

NATP


One more thing -- Digi has an 'unofficial' utility called "DigiPacket" that makes it much easier to construct API commands "by hand" -- might be worth asking them for a copy -- if enough people do it might get officially released.


[tested using an XBee Pro S2B on the dev board, XCTU talking over the serial port.]
answered Nov 15, 2010 by NATP New to the Community (5 points)
...