Topic

FAQ
Login Register
NLME-NWK-STATUS.indication
Apr 07, 2022 16:31

/

A

/A


I have a problem with NLME status indication. I want to know how to use this struct 

typedefstruct
{
u16nwkAddr;
nwk_statusCode_tstatus;
}nlme_nwkStatus_ind_t;


or how I know COORDINATOR or parent node is online.

Thank you


4 replies
TL_Soyo Apr 08, 2022 11:18
1
/A

Hi ,

   the struct "nlme_nwkStatus_ind_t" is used by SDK, user can not use it.

    if your device is orphan node now,u can invoke the rejoin function(zb_rejoinReq(NLME_REJOIN_METHOD_REJOIN, zb_apsChannelMaskGet())) periodically,when u rejoined the Coordinator,the "zbdemo_bdbCommissioningCb(u8 status, void *arg)" function will be invoked by SDK,the status is "BDB_COMMISSION_STA_SUCCESS" as follow 


sirius [Author] Apr 08, 2022 11:50
0
/A


Thank Soyo.

Can DEVICE_TYPE_ROUTER know its parent node is online?

TL_Soyo Apr 08, 2022 13:49
1
/A

Hi sirius,

    U can send ZCL msg to his parent node periodically,

    Router is belong to Full Function Device ,So router node has not orphan status,and it can work as usual while his parent is offline

sirius [Author] Apr 08, 2022 14:14
0
/A

Thank Soyo.

I use a callback function when sending data and it work.

staticvoid_check_send_data(void*arg)
{
apsdeDataConf_t*pApsDataCnf= (apsdeDataConf_t*)arg;
if (pApsDataCnf->status!=0) {
switch (pApsDataCnf->status ) {
caseMAC_STA_NO_ACK:
printf("MAC_STA_NO_ACK");
break;

caseNWK_STATUS_ROUTE_DISCOVERY_FAILED:
printf("NWK_STATUS_ROUTE_DISCOVERY_FAILED");
break;

default:
break;
}
TL_SCHEDULE_TASK(zigbee_signal_callback, (void*)ZIGBEE_STATE_DISCONNECTED);
}

}



zigbee_mesh_handle_tzigbee_mesh_init(zigbee_mesh_config_t*config)
{
zigbee_mesh_handle_tzigbee= (zigbee_mesh_handle_t)ev_buf_allocate(sizeof(zigbee_mesh_t));
CHECK_IF_NULL(zigbee, returnNULL);

g_mesh_Ctx.channel=config->channel;
g_mesh_Ctx.auto_provisioning=config->auto_provisioning;
zb_init();
zb_zdoCbRegister((zdo_appIndCb_t*)&appCbLst);


// tl_nwkDataIndRegister(ack_check_handler);
// TL_ZB_TIMER_SCHEDULE()

af_nodeDescManuCodeUpdate(MANUFACTURER_CODE_TELINK);

af_endpointRegister(RELAY_ENDPOINT_1_ID, (af_simple_descriptor_t*)&touch_simpleDesc, zigbee_mesh_rx_handler, _check_send_data);


But I hope I can know the data callback struct NLME-NWK-STATUS.indication.