device under a router is actively off the network

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

device under a router is actively off the network

895 Views
yblinyblin
Contributor I

The project I used is JN-AN-1216
When a device under a router is actively off the network, the coordinator does not receive tZPS_EVENT_NWK_LEAVE_INDICATION event. The device under the router is off the network, what notification will the coordinator receive?

Labels (1)
0 Kudos
6 Replies

724 Views
mario_castaneda
NXP TechSupport
NXP TechSupport

Hi,

 

As I am understanding the router left the network and you are looking for the Leave Indication. 

You could define the #define BDB_SET_DEFAULT_TC_POLICY               (FALSE) as true in the bdb_options.h

You are defining a callback that you can add the event that you are looking for. bdb_nf.c

PRIVATE bool vNfTcCallback (uint16 u16ShortAddress,
                             uint64 u64DeviceAddress,
                             uint64 u64ParentAddress,
                             uint8 u8Status,
                             uint16 u16MacId )
{
.
.
.
    else if(u8Status == BDB_TC_STATUS_DEVICE_LEFT)
    {
     DBG_vPrintf(TRUE,"BDB_TC_STATUS_DEVICE_LEFT %d\r\n",u8Status);
     DBG_vPrintf(TRUE,"u64DeviceAddress %016x\n",u64DeviceAddress);
     DBG_vPrintf(TRUE,"u16ShortAddress %04x\n",u16ShortAddress);

    }

.
.
.

Note: You must commend the ZPS_vTCSetCallback( APP_bSendHATransportKey ); beacuse you are defining 2 callbacks.

Hope it helps.

Regards,

Mario

0 Kudos

724 Views
yblinyblin
Contributor I

Thank you for your reply.

What's the difference between ZPS_vTCSetCallback and vNfTcCallback?ZPS_vTCSetCallback can get off-line events.

My problem is, I found that after the sub-device under the coordinator is off the network, the TClinkkey saved in the PDM area will be cleared. However, after the sub-device under the router is off-grid, the TClinkkey in the PDM area will not be cleared. Off, this will cause an old device to remain in the coordinator, causing new devices to not be added.

yblin

0 Kudos

724 Views
mario_castaneda
NXP TechSupport
NXP TechSupport

Hi,

ZPS_vTCSetCallback Callback function on the Trust Centre, where this callback function allows the application to react to a notification from another network node. The vNfTcCallback is the function callback.

You could send a management leave request to that specific device, you will see the device will be deleted from the table.

Regards,

Mario

0 Kudos

724 Views
yblinyblin
Contributor I

Thank you for your reply.

Are you talking about the table NT? However, if the device is not online and cannot receive the off-grid request, NT will not delete the device information. How to solve this situation

asTclkStruct is Store the offset position of the TClinkkey,When a child device under a router is off the network, asTclkStruct does not clear the linkkey of the device. Will cause new devices to not be added。

How to solve this situation。

yblin

0 Kudos

724 Views
mario_castaneda
NXP TechSupport
NXP TechSupport

Hi,

You can send a management leave request to the device, if it is offline you will not receive an ack from them, but the information will be deleted. But, if the device comes online, it will join the network again, because it already knows the keys. So, if it returns you should create in your application a table for the leave devices that you erase previously.

Regards,

Mario

0 Kudos

724 Views
qingshuzhuang
Contributor II

How to send  a management leave request ?

Is use APP_eZdpMgmtLeave() function?

I have sam problem。

I have try use APP_eZdpMgmtLeave(), But did not solve the problem.

0 Kudos