Part Number: LP-CC2652RB
Hello. I have removed the UI and UART components of a sample app in order to reduce consumption and achieve uC sleep. In doing so, all the commissioning functionality is removed and am unable to trigger pairing by pressing the side buttons. To overcome this, i have implemented a commissioning routine as a button callback as follows:
static uint16_t bdbCommissioningModes =
BDB_COMMISSIONING_MODE_NWK_STEERING | BDB_COMMISSIONING_MODE_FINDING_BINDING;
static void commissioningBtnCallback(Button_Handle _buttonHandle,
Button_EventMask _buttonEvents)
{
if ((_buttonEvents & Button_EV_CLICKED) && (_buttonHandle == gLeftButtonHandle))
{
zstack_bdbStartCommissioningReq_t zstack_bdbStartCommissioningReq;
zstack_bdbStartCommissioningReq.commissioning_mode =
bdbCommissioningModes;
Zstackapi_bdbStartCommissioningReq(appServiceTaskId,
&zstack_bdbStartCommissioningReq);
}
}
void configureCommissioningCb()
{
Button_Params bparams;
Button_Params_init(&bparams);
gLeftButtonHandle = Button_open(CONFIG_BTN_LEFT, &bparams);
Button_setCallback(gLeftButtonHandle, commissioningBtnCallback);
}
The button callback works and is triggered correctly, however i end up stuck in a loop inside sendReqDefaultRsp, namely at:
while(!gotRsp)
{
// Wait for the response message
OsalPort_blockOnEvent(Task_self());
pCmdStatus = (zstackmsg_genericReq_t*)OsalPort_msgFindDequeue(appServiceTaskId, pMsg->hdr.event);
if(pCmdStatus)
{
gotRsp = true;
}
}
It seems that the app waits for a response that never arrives. Is there something missing from my configuration of commissioning requests?