Tool/software: TI-RTOS
Hello,
I am working on Launch pad with multi-role sample TI example code (reference code C:\ti\simplelink_cc2640r2_sdk_1_30_00_25\examples\rtos\CC2640R2_LAUNCHXL\blestack\multi_role) and I am able to connect to multiple devices(Central/peripherals).
I have few questions to be clarified :
1) " multi_role_paramUpdateDecisionCB() " Function in multi_role.c is a Callback for application to decide whether or not to accept a parameter update request coming from Client.
But it seems like this function is never used.
2) In multi.c File, gapRole_processGAPMsg() Function has case GAP_UPDATE_LINK_PARAM_REQ_EVENT: which is Sent during a Connection Parameter Update Procedure from Client.
case GAP_UPDATE_LINK_PARAM_REQ_EVENT: { gapUpdateLinkParamReqEvent_t *pReq; gapUpdateLinkParamReqReply_t rsp; pReq = (gapUpdateLinkParamReqEvent_t *)pMsg; // Add in connection handle. rsp.connectionHandle = pReq->req.connectionHandle; // If forwarding to the application to decide if(gapRole_updateConnParams.paramUpdateEnable == GAPROLE_LINK_PARAM_UPDATE_APP_DECIDES) { if (pGapRoles_AppCGs && pGapRoles_AppCGs->pfnParamUpdateAppDecision) { // Call application callback pGapRoles_AppCGs->pfnParamUpdateAppDecision(&(pReq->req), &rsp); } // Reject if there is no registered callback else { rsp.accepted = FALSE; } } // If rejecting all parameter update requests else if (gapRole_updateConnParams.paramUpdateEnable == GAPROLE_LINK_PARAM_UPDATE_REJECT) { rsp.accepted = FALSE; } // If accepting all parameter update rqeuests else if (gapRole_updateConnParams.paramUpdateEnable == GAPROLE_LINK_PARAM_UPDATE_ACCEPT) { // Link Parameter update is accepted rsp.accepted = TRUE; // Use remote requested values rsp.intervalMin = pReq->req.intervalMin; rsp.intervalMax = pReq->req.intervalMax; rsp.connLatency = pReq->req.connLatency; rsp.connTimeout = pReq->req.connTimeout; } // Send parameters back to stack VOID GAP_UpdateLinkParamReqReply(&rsp); }
But i have checked it by putting breakpoints, when I am connecting with a BLE client(phone) , control will never hit this break point.
I think Ideally it should come here for application to take decision to Accept/Reject the parameter Update, using the same function in point 1 above.
I simply want to receive the update request from BLE client and send the response with my updated connection parameters.
This all should be done by the APIs already provided.
Please point out if my understanding is wrong or an appropriate way to handle this issue.
Any help will be appreciated...!
Thanks..!