I'm using allmems2 V2.1.0 as an example (many fw are similar in that section, because they all links to the same app), but here are specific instructions:
- in main.c, around line 2010 you should add a aci_gap_set_io_capability(IO_CAP_DISPLAY_ONLY), see the code below
if(ret){
ALLMEMS2_PRINTF("\r\naci_gatt_update_char_value failed\r\n");
while(1);
}
////////////////////// BEGINNING OF CODE TO ADD //////////////////////////
aci_gap_set_io_capability(IO_CAP_DISPLAY_ONLY);
////////////////// END OF CODE TO ADD ////////////////////////
ret = aci_gap_set_authentication_requirement(BONDING,
MITM_PROTECTION_REQUIRED,
SC_IS_SUPPORTED,
KEYPRESS_IS_NOT_SUPPORTED,
7,
16,
DONOT_USE_FIXED_PIN_FOR_PAIRING,
123456,
0x00);
- in sensor_service.c you should add the aci_gap_pass_key_req_event , so at the end of the file just add
void aci_gap_pass_key_req_event(uint16_t Connection_Handle)
{
status = aci_gap_pass_key_resp(CurrentConnHandle, 123456)
}
If you have any more problem coding, please, tell me which errors warning you encounter