Question
Trying to setup BlueNRG Chat example with fixed PIN, but having no success.
My device init looks like this:
ret = aci_gap_init(GAP_PERIPHERAL_ROLE, 0,0x08, &service_handle, &dev_name_char_handle, &appearance_char_handle);
if(ret != BLE_STATUS_SUCCESS) {
//PRINTF("GAP_Init failed: 0x%02x\n", ret);
return ret;
}
ret = aci_gap_set_io_capability (IO_CAP_NO_INPUT_NO_OUTPUT);
ret = aci_gap_set_authentication_requirement(BONDING,MITM_PROTECTION_REQUIRED,SC_IS_SUPPORTED,KEYPRESS_IS_NOT_SUPPORTED,7,16,USE_FIXED_PIN_FOR_PAIRING,123456,1);
if(ret != BLE_STATUS_SUCCESS)
{
//PRINTF("aci_gap_set_authentication_requirement()--> Failed 0x%02x\r\n", ret);
while(1);
}
/* Add Device Service & Characteristics */
ret = Add_ChatService();
if(ret != BLE_STATUS_SUCCESS) {
//PRINTF("Error while adding service: 0x%02x\n", ret);
return ret;
}But when I use the nrf Connect, or lightBlue android App to test, it just connects without prompting for a PIN. Anyone able to point out what I might be missing?
