Skip to content
Snippets Groups Projects

feat(ble): Show the name of a successful pairing

Merged schneider requested to merge schneider/bonding-show-name into master
All threads resolved!
Files
7
+ 12
1
@@ -224,6 +224,7 @@ wsfHandlerId_t bleHandlerId;
static dmConnId_t pair_connId = DM_CONN_ID_NONE;
static uint32_t pair_confirm_value;
static appDbHdl_t last_pairing = NULL;
static void BleHandler(wsfEventMask_t event, wsfMsgHdr_t *pMsg);
@@ -578,6 +579,15 @@ uint32_t epic_ble_get_compare_value(void)
return pair_confirm_value;
}
int epic_ble_get_last_pairing_name(char *buf, size_t buf_size)
{
if(last_pairing == NULL) {
return -ENOENT;
}
return AppDbGetPairingName(last_pairing, buf, buf_size);
}
void epic_ble_compare_response(bool confirmed)
{
if(!active) {
@@ -765,7 +775,8 @@ static void bleProcMsg(bleMsg_t *pMsg)
pMsg->dm.pairCmpl.auth);
DmSecGenerateEccKeyReq();
AppDbNvmStoreBond(AppDbGetHdl((dmConnId_t) pMsg->hdr.param));
last_pairing = AppDbGetHdl((dmConnId_t) pMsg->hdr.param);
AppDbNvmStoreBond(last_pairing);
pair_connId = DM_CONN_ID_NONE;
trigger_event(BLE_EVENT_PAIRING_COMPLETE);
Loading