我用的SDK是simplelink_cc13x2_26x2_sdk_3_30_00_03
我现在的入网方式是调用
zstack_bdbStartCommissioningReq_t zstack_bdbStartCommissioningReq;
zstack_bdbStartCommissioningReq.commissioning_mode = BDB_COMMISSIONING_MODE_NWK_STEERING;
Zstackapi_bdbStartCommissioningReq(appServiceTaskId,&zstack_bdbStartCommissioningReq);
但这只能发一次beacon request,所以我在
static void zclSampleSw_ProcessCommissioningStatus(bdbCommissioningModeMsg_t *bdbCommissioningModeMsg)
case BDB_COMMISSIONING_NWK_STEERING:
中再次调用,
但我觉得这不是一个很好的方式,是否有方式可以设置入网持续时间,调用一次入网API就能持续join或者rejoin呢?
Susan Yang:
您可以在BDB_COMMISSIONING_PARENT_LOST内进行相关的设置
case BDB_COMMISSIONING_PARENT_LOST:if(bdbCommissioningModeMsg->bdbCommissioningStatus == BDB_COMMISSIONING_NETWORK_RESTORED){//We did recover from losing parent}else{//Parent not found, attempt to rejoin again after a fixed delayTimer_setTimeout( EndDeviceRejoinClkHandle, SAMPLEAPP_END_DEVICE_REJOIN_DELAY );Timer_start(&EndDeviceRejoinClkStruct);}break;