cannot find router's parent address (in API)

hello,
i am a student ,i use xbee-pro-S2B.In my project,there is one coordinator and seven router, the router can send data to the coordinator ,i want to find the 16-bit parent address ,but i cannot use the MY command in API mode,the command always return 0xfffe,is it a problem or my configuration is wrong ?
i use the parent address to build a topological graph (a tree),can you give me some suggestion?
Any help would be appreciated! Thanks (especially if you read through it all)
Li Ning

Hello In1990,

It’s a common mistake: Parent Node only matters for End Devices. A parent node is the one that buffers the messages for the end-device until it wakes up. So, nothing is wrong with your configuration, routers and coordinators don’t have parent nodes, so they always report 0xFFFE (undetermined 16-bit address) for ATMY.

What you can do to determine a topology is to ask/retrieve Neighbor Tables along with Routing tables. It’s kind of complex but there is an Application note in this link that will help you to send and receive these commands.

Let us know if this helped you. Best regards,

thank you very much ,i will read it very carefully and try your request.

hello,thank you for your advice.
now, i use the DN command to find the routing tables,
but the command always return 7E 00 05 88 01 44 4E 01 E3,
i read the datasheet,it says that ‘‘In the case of an ERROR, Command Mode is not exited. The radius of the DN command is set by the BH command.’’,but my BH value is 0x00;why ? is that my configuration is wrong ?
i also use the ND command , it return other module’s routing table,but my own module’s routing table is not return.
Any help would be appreciated! Thanks (especially if you read through it all)
Li Ning

hello,thank you for your advice.
now, i use the DN command to find the routing tables,
but the command always return 7E 00 05 88 01 44 4E 01 E3,
i read the datasheet,it says that ‘‘In the case of an ERROR, Command Mode is not exited. The radius of the DN command is set by the BH command.’’,but my BH value is 0x00;why ? is that my configuration is wrong ?
i also use the ND command , it return other module’s routing table,but my own module’s routing table is not return.
Any help would be appreciated! Thanks (especially if you read through it all)
Li Ning

Hello Lin Ning,

Bear in mind that you are not receiving routing tables, just XBee nodes in the same network. It’s not the same to send an ND (Node Discovery) or a DN (Destination Node):
ND doesn’t take any argument and returns a response per node discovered with all the information. While on the other hand DN takes the detinator XBee’s Node Identifier (NI), and it returns only the 64-bit address.

So, the problem is that you were sending an DN without an NI. Find here the Xbee S2B reference manual and here an online frame builder. Also, you may find useful the ZigBee Operator software for sending frames from the PC.

Nothing is wrong with BH=0, set it to ‘0’ for the maximum radius. Ignore the “In the case of an ERROR, Command Mode is not exited.” part, it only applies for a module with AT firmware.

hi did you find any solution?