I use the chip is JN5189, I now through ZPS_u64NwkNibGetMappedIeeeAddr (ZPS_pvAplZdoGetNwkHandle (), 0).To get the long address of the parent node, using ZPS_u16AplZdoLookupAddr(Parente64id);To get the short address of the parent node. After the enddevice is connected to the coordinator, the long address and short address of the parent node can be read correctly.
However, the parent node of the enddevice is the router, and the parent node of the router is the coordinator. After successful networking, the router is turned off, and the enddevice detects the loss of the parent node after a period of time, and rejoins the coordinator. At this time, the long address of the parent node is displayed as 0x000000000000000, and the short address of the parent node is 0xFFFE.That is, the address of the parent node cannot be read correctly.The reason is that there is no long address exchange process (no Association Request and Association Response process) when the enddevice thinks that the router is disconnected and rejoins the coordinator.
In this case, how to correctly read the parent node short address and long address?
Hope you are doing well. You can use the ZPS_eAplZdpMgmtLqiRequest (Page 329 of the ZigBee 3.0 Stack User Guide), which request a remote node to provide a list of neighboring nodes from its Neighbor Table.
If you have any question, please let me know.