This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

ble_db_discovery_start () returns NRF_ERROR_INVALID_PARAM (0x7)

ble_db_discovery_start () returns NRF_ERROR_INVALID_PARAM (0x7)

This problem occurs when two peripherals are connected to one central unit.
The two peripherals use the same UUID.

step-by-step
  1. Connect the A peripheral to Central.
  2. Connect the B peripheral to Central.
  3. The connection with the A Peripheral is broken for some reason.
  4. Connect to the A peripheral again.
  3. If ble_db_discovery_start () is executed after connection, error value 0x7 is returned.


ble_db_discovery_start() argument
> conn_handle
   Pass p_ble_evt-> evt.gap_evt.conn_handle of BLE_GAP_EVT_CONNECTED event.
> p_db_discovery
   Declare BLE_DB_DISCOVERY_ARRAY_DEF (m_db_disc, CONNECT_PERI_MAX) and pass the following:
   m_db_disc [p_ble_evt-> evt.gap_evt.conn_handle]

* Just before passing m_db_disc as an argument, the following processing is performed to delete the remaining data.
    m_db_disc [p_ble_evt-> evt.gap_evt.conn_handle] .discovery_in_progress = 0;
    m_db_disc [p_ble_evt-> evt.gap_evt.conn_handle] .discovery_pending = 0;
    m_db_disc [p_ble_evt-> evt.gap_evt.conn_handle] .conn_handle = BLE_CONN_HANDLE_INVALID;

Parents Reply Children
Related