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

NRF_ERROR_NOT_SUPPORTED when adding GATT service changed characteristic

I would like to be able to use the Nordic Connect app for debugging and be able to observe the current UUIDs/handles of my attributes as I change them.

I have attempted to connect a perihperal and refresh the new UUIDs/handles in the Nordic app to no avail

settings > refresh services

I read in the specs that I should add the GATT service changed characteristic if my peripheral's service UUIDs or attribute handles are expected to change, like for example in the case of a DFU.

So in the ble_evt_handler in the BLE_GAP_EVT_CONNECTED I have added the following code from the multi-connect example

case BLE_GAP_EVT_CONNECTED:
					
	// ....

	err_code = sd_ble_gatts_service_changed(m_conn_handle, 0x0000, 0xffff);

	if ((err_code == BLE_ERROR_INVALID_CONN_HANDLE) ||
			(err_code == NRF_ERROR_INVALID_STATE) ||
			(err_code == NRF_ERROR_BUSY))
	{
			// Those errors can be expected when sending trying to send Service Changed indication
			// if the CCCD is not set to indicate. Thus set the returning error code to success.
		  SEGGER_RTT_printf(0,"Client did not have the Service Changed indication set to enabled. Error: %u\n",err_code);
			err_code = NRF_SUCCESS;
		
	} else {
		 
		  // Print's Error: 6 (NRF_ERROR_NOT_SUPPORTED)
			SEGGER_RTT_printf(0,"Error: %u\n",err_code);
	}

	// ....

The above code prints Error: 6 (NRF_ERROR_NOT_SUPPORTED)

Any advice? Thanks

Related