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

sd_ble_uuid_vs_add error

Hello, i am using the Nrf52, i am facing problem on the following line

    #define MESH_SERVICE_BASE_UUID128 0x23, 0xD1, 0xBC, 0xEA, 0x5F, 0x78, 0x23, 0x15, 0xDE,     
                                                               0xEF, 0x12, 0x12, 0x00, 0x00, 0x00, 0x00
    ble_uuid128_t baseUUID128 = { MESH_SERVICE_BASE_UUID128 };
    err = sd_ble_uuid_vs_add(&baseUUID128, &meshService.serviceUuid.type);

sd_ble_uuid_vs_add return the error code 16. the Error code 16 is Bad memory Address.

this problem came from the gap_enable_parameters as i think. if i select the maxoutconnection to 3 then everything is ok but if i select this to 7 then i got this issue. i also would like to share the information about sd_ble_enable

Here is code for ble_enable

u32 __application_ram_start_address = 0x20003F30;

err = sd_ble_enable(&params, &app_ram_base);

using this address i have no error from the ble_enable.

thank you

Parents
  • FormerMember
    0 FormerMember

    To allocate enough RAM for vendor specific (custom) UUIDs, the correct number of such UUIDs should be provided to softdevice_enable(..) --> sd_ble_enable(..).

    Setting the correct number of vendor specific UUIDs could be done the following way:

    ble_enable_params_t ble_enable_params;
    err_code = softdevice_enable_get_default_config(CENTRAL_LINK_COUNT,
                                                    PERIPHERAL_LINK_COUNT,
                                                    &ble_enable_params);
     ...
    
    ble_enable_params.common_enable_params.vs_uuid_count = 3; // set number of vendor specific UUIDs.
    err_code = softdevice_enable(&ble_enable_params);
    APP_ERROR_CHECK(err_code);
    
  • THAT makes it a lot simpler. Thank you a lot for this first breadcrumb. Would be great if there were an up-to-date tutorial explaining the neccessary steps to create a simple BLE application with service + characteristic, based on the "ble_app_template" from the SDK.

Reply Children
No Data
Related