Hello BLE Apps team,
I have been testing few example codes (BLE 4.2 simple peripheral & simple_central) to use connection_monitor in BLE SDK v2.30.49.
As we already know, BLE access code is decided by Central Device. I expect that there is a way to get the access code on peripheral device if BLE connection has been established. However, HCI_EXT_GetActiveConnInfoCmd API only returned the access code as 0x00 in peripheral device.
I attached necessary code snippet (simple_peripheral) to reproduce this issue.
case GAPROLE_CONNECTED: { linkDBInfo_t linkInfo; uint8_t numActive = 0; hciActiveConnInfo_t *pConnInfo; pConnInfo = ICall_malloc(sizeof(hciActiveConnInfo_t)); if (pConnInfo != NULL) { // Get the connection info of a single connection HCI_EXT_GetActiveConnInfoCmd(0, pConnInfo); Display_print1(dispHandle, 10, 0, "AccessAddress: 0x%x", pConnInfo->accessAddr); Display_print1(dispHandle, 11, 0, "Connection Interval: %d", pConnInfo->connInterval); Display_print3(dispHandle, 12, 0, "HopVal: %d, nxtCh: %d, mSCA: %d", pConnInfo->hopValue, pConnInfo->nextChan, pConnInfo->mSCA); Display_print5(dispHandle, 13, 0, "ChanMap: \"%x:%x:%x:%x:%x\"", pConnInfo->chanMap[4], pConnInfo->chanMap[3], pConnInfo->chanMap[2], pConnInfo->chanMap[1], pConnInfo->chanMap[0]); ICall_free(pConnInfo); } else { Display_print0(dispHandle, 4, 0, "ERROR: Failed to allocate memory for return connection information"); } } break;