I have a functional application that was developed using the nRF5 SDK. I am trying to port this to NRF Connect and I am having difficulties in achieving the same. I am still in the learning stage on NRF Connect.
I set up a scan using my Custom UUID Service. It has two Characteristics, each with its own UUID.
The scan is set for Auto Connect.
In the nrF5 SDK Code when I see the connect I do the following:
case BLE_GAP_EVT_CONNECTED:
NRF_LOG_INFO("Connected as client.");
NRF_LOG_FLUSH();
err_code = ble_bsc_c_handles_assign(&m_ble_bsc_c, p_gap_evt->conn_handle, NULL);
APP_ERROR_CHECK(err_code);
err_code = ble_db_discovery_start(&m_db_disc, p_gap_evt->conn_handle);
The discovery process then completes and everything works.
I get the folowing event
BLE_BSC_C_EVT_DISCOVERY_COMPLETE:
I have been trying to achieve the same on NRF Connect but I am missing something.
It only seems to work if a Pair is initiated which is not what I require. I do not want to pair.
If I call the following on the connected event
gatt_discover(conn);
Then I get an error saying that the service was not found.
I can provide more info if required.