Skip to content

Commit

Permalink
fix(BLE): Connection-Parameter-Update (#805)
Browse files Browse the repository at this point in the history
  • Loading branch information
EricB-ADI authored Nov 22, 2023
1 parent 4461e6d commit 803b93a
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions Libraries/Cordio/ble-profiles/sources/af/app_slave.c
Original file line number Diff line number Diff line change
Expand Up @@ -523,9 +523,13 @@ static void appSlaveConnUpdate(dmEvt_t *pMsg, appConnCb_t *pCb)
{
if (pAppUpdateCfg->idlePeriod != 0)
{
/* if successful */
if (pMsg->hdr.status == HCI_SUCCESS)
const bool_t intervalInBetween = pAppUpdateCfg->connIntervalMin <= pMsg->connUpdate.connInterval &&
pMsg->connUpdate.connInterval <= pAppUpdateCfg->connIntervalMax;

/* if successful and we got an update using one of our requested values*/
if (pMsg->hdr.status == HCI_SUCCESS && intervalInBetween)
{
pCb->attempts = 0;
/* stop connection update timer */
appConnUpdateTimerStop(pCb);
}
Expand Down Expand Up @@ -970,7 +974,9 @@ static void appSlaveConnUpdateTimeout(wsfMsgHdr_t *pMsg, appConnCb_t *pCb)
connSpec.minCeLen = 0;
connSpec.maxCeLen = 0xffff;

DmConnUpdate(pCb->connId, &connSpec);

DmConnUpdate(pCb->connId, &connSpec);

}
else
{
Expand Down

0 comments on commit 803b93a

Please sign in to comment.