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

Adding DFU service support. Error 4 when calling ble_dfu_init()

My application uses the following:

  • Proximity Profile (including Link Loss Service, Immediate Alert Service, Tx Power Service)

  • Battery Service

  • My own custom service with a 128-bit UUID (including 4 characteristics)

The application has worked so far.

Now I try to add DFU service support to my application.

But when calling ble_dfu_init() I get error 4.

Error 4 = NRF_ERROR_NO_MEM (No more free slots for VS UUID)

What can I do to solve this?

Parents
  • I found an answer. Go to softdevice_enable_get_default_config().

    uint32_t softdevice_enable_get_default_config(uint8_t central_links_count,
                                                  uint8_t periph_links_count,
                                                  ble_enable_params_t * p_ble_enable_params)
    {
        memset(p_ble_enable_params, 0, sizeof(ble_enable_params_t));
        p_ble_enable_params->common_enable_params.vs_uuid_count   = 1;
        p_ble_enable_params->gatts_enable_params.attr_tab_size    = SOFTDEVICE_GATTS_ATTR_TAB_SIZE;
        p_ble_enable_params->gatts_enable_params.service_changed  = SOFTDEVICE_GATTS_SRV_CHANGED;
        p_ble_enable_params->gap_enable_params.periph_conn_count  = periph_links_count;
        p_ble_enable_params->gap_enable_params.central_conn_count = central_links_count;
        if (p_ble_enable_params->gap_enable_params.central_conn_count != 0)
        {
            p_ble_enable_params->gap_enable_params.central_sec_count  = SOFTDEVICE_CENTRAL_SEC_COUNT;
        }
    
        return NRF_SUCCESS;
    }
    

    Change:

    p_ble_enable_params->common_enable_params.vs_uuid_count   = 1;
    

    to

    p_ble_enable_params->common_enable_params.vs_uuid_count   = 2;
    

    This will allow for two Vendor Specific UUID.

  • Hai mosi,

    Have good day. I following your previous question Add BLE DFU service when using Peer Manager?. IF you are complete dfu service in your Proximitty aplication please support.

    Thank you.

Reply Children
No Data
Related