Hi,
I am using nRF Connect SDK, 2.2.0.
I am developing a Central device, which performs the following, in this order:
- Enables Bluetooth (bt_enable())
- Starts scanning (bt_le_scan_start()) looking for a specific Peripheral
- Once the Peripheral is found - it connects to it (bt_conn_le_create())
- Once connection is established, it starts discovery of primary service and few characteristics (bt_gatt_discover())
- After everything needed is discovered, at some point later, the Central disconnects from the Peripheral (bt_conn_disconnect() with reason
BT_HCI_ERR_REMOTE_USER_TERM_CONN)
All of the above works - no errors/warnings in the console.
After step 5, once the Central is disconnected, the Peripheral is powered OFF. While the Peripheral is OFF, if I repeat steps 1-5 - they all succeed - the Bluetooth stack still finds (scan) the peripheral, is able to connect to it, even though it is not there. The discovery step does not discovery anything - the callback is invoked with attr set to NULL.
My question is - is there a way to clear all cached information? What I want to see is, for example, a scan that does not find the Peripheral.
Thank you,
D.