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 () returns err_code = 16 (#define NRF_ERROR_INVALID_ADDR (NRF_ERROR_BASE_NUM + 16) ///< Bad Memory Address)

Hi, I am using nRF52832 with S132 softdevice and SDK version 11. I am getting bad memory address error code.

err_code = sd_ble_uuid_vs_add (&base_uuid, &ble_service->uuid_type);
if (err_code != NRF_SUCCESS){
SEGGER_RTT_printf(0, "err_code: %d \n", err_code);
return err_code;
}

Can anybody help me to figure out what could be the reason for such errors? Thank!

Parents
  • Thanks John for the comment, I defined base uuid like this

     #define BLE_UUID_BASE_UUID            		{0x5B, 0xB3, 0x03, 0x64, 0x0C, 0x16, 0x5D, 0x8A, 0x1B, 0x48, 0x84, 0x63, 0x00, 0x00, 0x1F, 0xC0} // 128-bit base UUID
    

    then in service.c file,

    ble_uuid128_t base_uuid = {BLE_UUID_BASE_UUID};
    

    When printed out uuid_type

    SEGGER_RTT_printf(0, "uuid_type: %d \n", ble_service->uuid_type); 
    

    I got uuid_type 0, it means invalid UUID type.

    #define BLE_UUID_TYPE_UNKNOWN       0x00 /**< Invalid UUID type. */
    

    What else could you guess? Do you need any more info? Thank you very much for your time.

Reply
  • Thanks John for the comment, I defined base uuid like this

     #define BLE_UUID_BASE_UUID            		{0x5B, 0xB3, 0x03, 0x64, 0x0C, 0x16, 0x5D, 0x8A, 0x1B, 0x48, 0x84, 0x63, 0x00, 0x00, 0x1F, 0xC0} // 128-bit base UUID
    

    then in service.c file,

    ble_uuid128_t base_uuid = {BLE_UUID_BASE_UUID};
    

    When printed out uuid_type

    SEGGER_RTT_printf(0, "uuid_type: %d \n", ble_service->uuid_type); 
    

    I got uuid_type 0, it means invalid UUID type.

    #define BLE_UUID_TYPE_UNKNOWN       0x00 /**< Invalid UUID type. */
    

    What else could you guess? Do you need any more info? Thank you very much for your time.

Children
No Data
Related