Bluetooth caching

Hi,

I am using nRF Connect SDK, 2.2.0.

I am developing a Central device, which performs the following, in this order:

  1. Enables Bluetooth (bt_enable())
  2. Starts scanning (bt_le_scan_start()) looking for a specific Peripheral
  3. Once the Peripheral is found - it connects to it (bt_conn_le_create())
  4. Once connection is established, it starts discovery of primary service and few characteristics (bt_gatt_discover())
  5. 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.

Parents Reply Children
No Data
Related