Good morning nordic team,
I use BLE app HID Keyboard with softdevice 7.2.0, nRF5 SDK 17.1.0 and for the hardware I use nrf52840's SoC. The connecting and disconnecting well works. My issue rises when I reset the SoC with reset pin or a power-up cycle because battery depleted. The master (smartphone or computer) is connected always and in my application i lauch advertising_start() with the parameter "erase_bonds"! I think that I make the wrong things !
Maybe before deleting the links using the advertising_start(erase_bond) function, I need to know if I'm paired with a master and if there's a connection attempt ?
1) I would like to know how to reconnect me because the smartphone try to reconnect ?
2) Do you have a tutorial for best understand the process of adverting, pairing, connecting, reconnnecting, unpair for BLE because it's a misunderstanding of the BLE software stack !
below the main() function:
/**@brief Function for application main entry.
*/
int main(void)
{
bool erase_bonds;
// Initialize.
#ifdef AT_DBG
uart_init();
#endif
gestion_cmd_init();
log_init();
timers_init();
buttons_leds_init(&erase_bonds);
power_management_init();
ble_stack_init();
scheduler_init();
gap_params_init();
gatt_init();
advertising_init();
services_init();
sensor_simulator_init();
conn_params_init();
buffer_init();
peer_manager_init();
// Start execution.
send_trame_asyn(ASYN_MODULE_STATUS, LEN_STRING_STATUS_RADIO_MODULE, str_event_RST_RADIO_MODULE);
strncpy((char *)&value_status_ble, RST_RADIO_MODULE, 1);
transmission_send_trame_asyn();
NRF_LOG_INFO("HID Keyboard example started.");
timers_start();
advertising_start(erase_bonds);
// Enter main loop.
for (;;)
{
idle_state_handle();
}
}
Thanks for help
alexandre