# Discover devices

**URL:** <https://forums.digi.com/t/discover-devices/2117>\
**Category:** XBee - Point-to-Point/Multi-Point\
**Created:** [August 31, 2011, 6:35am UTC](https://forums.digi.com/t/discover-devices/2117 "2011-08-31T06:35:12Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![josher](https://avatars.discourse-cdn.com/v4/letter/j/9d8465/32.png) [@josher](https://forums.digi.com/u/josher)\
**Post date:** [August 31, 2011, 6:35am UTC](https://forums.digi.com/t/discover-devices/2117/1 "2011-08-31T06:35:12Z")

</div>

Hello!  
I am working with XBee-PRO devices. Also I have a XStick-USB to connect with my computer. I work in API mode through X-CTU. I would like to discover neighbors table. How could I do it? What is the kind of frame?  
Thanks!  
Regards!

---

<div class="post-metadata">

**Author:** ![kavya](https://avatars.discourse-cdn.com/v4/letter/k/e480ec/32.png) [@kavya](https://forums.digi.com/u/kavya)\
**Post date:** [September 1, 2011, 7:14am UTC](https://forums.digi.com/t/discover-devices/2117/2 "2011-09-01T07:14:24Z")

</div>

Hi,

You can use AT command - ND(Node Discover) command, it discovers and reports all RF modules found. Please refer the page number 38 of the following document, “[http://ftp1.digi.com/support/documentation/90001020\_B.pdf](http://ftp1.digi.com/support/documentation/90001020_B.pdf)”. Frame type is “0x08”, you will get the AT Command response, the Frame type is 0x88, refer page number 43 of the same document.

Regards!

---

<div class="post-metadata">

**Author:** ![josher](https://avatars.discourse-cdn.com/v4/letter/j/9d8465/32.png) [@josher](https://forums.digi.com/u/josher)\
**Post date:** [September 1, 2011, 11:35am UTC](https://forums.digi.com/t/discover-devices/2117/3 "2011-09-01T11:35:43Z")

</div>

Well, but I tried and it did not work. I send a ND command via API, but I do not receive response. I think my devices are not joint, but if it can be discovered…  
How could I reset the devices to begin?  
Thanks!

---

<div class="post-metadata">

**Author:** ![johnf](https://avatars.discourse-cdn.com/v4/letter/j/848f3c/32.png) [@johnf](https://forums.digi.com/u/johnf)\
**Post date:** [September 1, 2011, 1:04pm UTC](https://forums.digi.com/t/discover-devices/2117/4 "2011-09-01T13:04:32Z")

</div>

Would you like to post the packet you sent? If there’s an error in it, the XBee will have quietly ignored it. Bad checksums are quite a common problem.

---

<div class="post-metadata">

**Author:** ![josher](https://avatars.discourse-cdn.com/v4/letter/j/9d8465/32.png) [@josher](https://forums.digi.com/u/josher)\
**Post date:** [September 1, 2011, 1:48pm UTC](https://forums.digi.com/t/discover-devices/2117/5 "2011-09-01T13:48:20Z")

</div>

For example, there is here a frame to request LQI (neighbor table) to coordinator:  
7E 0014 11 01 00000000 00000000 FFFE 00 00 0031 0000 00 00 BF

---

<div class="post-metadata">

**Author:** ![johnf](https://avatars.discourse-cdn.com/v4/letter/j/848f3c/32.png) [@johnf](https://forums.digi.com/u/johnf)\
**Post date:** [September 1, 2011, 3:52pm UTC](https://forums.digi.com/t/discover-devices/2117/6 "2011-09-01T15:52:27Z")

</div>

Well, that one’s certainly ok. Here’s the decoded output:

API Packet analyzer version 1.4 for XBees (802.15.4, DigiMesh, ZNet, ZB)  
Note: if it prompts for more bytes and you’re done, hit return  
Enter packet: 7E 0014 11 01 00000000 00000000 FFFE 00 00 0031 0000 00 00 BF

Packet: 7E 00 14 11 01 00 00 00 00 00 00 00 00 FF FE 00 00 00 31 00 00 00 00 BF  
7E // Correct packet header byte  
00 14 // payload length (decimal 20)  
11 // Packet type: Explicit addressing ZigBee command frame  
// Valid for DigiMesh, ZigBee, Znet2.5  
01 // frame id: non-zero so response packet expected  
00 00 00 00 00 00 00 00 // 64-bit destination address  
FF FE // 16-bit destination address  
00 // Source endpoint  
00 // Destination endpoint  
00 31 // Destination cluster ID  
00 00 // Destination profile ID  
00 // Broadcast radius (decimal 0)  
00 // Options:  
BF // checksum - correct

Going back to the ND command, you could set the options (NO) to 2. Then the local node will report itself, so you should always get a response. That would tell you that the command was being received and acted on.

You also asked about resetting the XBees. That would be the RE command, if you wanted to restore them to factory default settings.

---

<div class="post-metadata">

**Author:** ![josher](https://avatars.discourse-cdn.com/v4/letter/j/9d8465/32.png) [@josher](https://forums.digi.com/u/josher)\
**Post date:** [September 2, 2011, 12:37pm UTC](https://forums.digi.com/t/discover-devices/2117/7 "2011-09-02T12:37:15Z")

</div>

Another API frame that I send is:  
7E 00 04 08 01 4E 44 64  
It is to say, ND command with parameter NO = 2. However I do not have response

---

<div class="post-metadata">

**Author:** ![johnf](https://avatars.discourse-cdn.com/v4/letter/j/848f3c/32.png) [@johnf](https://forums.digi.com/u/johnf)\
**Post date:** [September 4, 2011, 5:22pm UTC](https://forums.digi.com/t/discover-devices/2117/8 "2011-09-04T17:22:53Z")

</div>

That’s very strange. The packet is fine:

packet-check  
API Packet analyzer version 1.4 for XBees (802.15.4, DigiMesh, ZNet, ZB)  
Note: if it prompts for more bytes and you’re done, hit return  
Enter packet: 7E 00 04 08 01 4E 44 64

Packet: 7E 00 04 08 01 4E 44 64  
7E // Correct packet header byte  
00 04 // payload length (decimal 4)  
08 // Packet type: local AT command with immediate action  
// Valid for 802.15.4, DigiMesh, ZigBee, Znet2.5  
01 // frame id: non-zero so response packet expected  
4E 44 // AT command “ND”  
64 // checksum - correct

And with NO=2, the module should report itself even if it can’t see any others.

What happens if you send ND as a plain AT command, without using API?

And: are you using the latest version of the firmware? In the firmware release notes for the 868 modules I do see references to bug fixes relating to the ND command.

---

<div class="post-metadata">

**Author:** ![josher](https://avatars.discourse-cdn.com/v4/letter/j/9d8465/32.png) [@josher](https://forums.digi.com/u/josher)\
**Post date:** [September 5, 2011, 6:14am UTC](https://forums.digi.com/t/discover-devices/2117/9 "2011-09-05T06:14:50Z")

</div>

The same. There is no response! The firmware is the latest, I always write with update firmware.

---

<div class="post-metadata">

**Author:** ![johnf](https://avatars.discourse-cdn.com/v4/letter/j/848f3c/32.png) [@johnf](https://forums.digi.com/u/johnf)\
**Post date:** [September 5, 2011, 9:27pm UTC](https://forums.digi.com/t/discover-devices/2117/10 "2011-09-05T21:27:59Z")

</div>

Yet, presumably, other commands do give correct responses.

Sorry - I’m going to give up on this one. If no-one else has any ideas, put in a support request to the fine folks at Digi and refer them to this thread. There must be an answer, but I’ve run out of ideas.

Good luck with it - I’m sure the Digi folks will be able to be of more help.

Oh, and when you find out, please tell us what the answer was…

---

<div class="post-metadata">

**Author:** ![lynnl](https://avatars.discourse-cdn.com/v4/letter/l/22d042/32.png) [@lynnl](https://forums.digi.com/u/lynnl)\
**Post date:** [September 6, 2011, 1:31pm UTC](https://forums.digi.com/t/discover-devices/2117/11 "2011-09-06T13:31:02Z")

</div>

I think his nodes are not joined.

If you use the lated XCTU, try using the “Remote Configuration” link to see if your XStick sees any otehr nodes.

There are LOTS of reasons the nodes may not be jointed:

1. is there 1 and only 1 coordinator?  
– If there are multiple coordinators (especially if the XStick is a coordinator), then all your “older” nodes are on a difefrent PAN  
– If there is no coordinator, then no one has joined anything
2. you probably want the XStick to have API Router firmware - assume one of the remote XBEE-PRO is the coordinator.
3. if SE/Smart-Energy is involved, then all bets are off.

Anyway, you need to worry about this more basic situation before the form of your ND command.
