Beware that this post is related to an SDK in maintenance mode
More Info: Consider nRF Connect SDK for new designs
This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Instead of octets 12-13 of 128-bit UUID can we use octets 1-2

Hi,

I've defined a base uuid 455449424C5545544845524DB87AD700 

For adding the service to the database CUS_SERVICE_UUID = 0x4942 which alters my 12th and 13 octets 

Instead I wan use 0xD700 to alter 1st and 2nd octets.

so I need UUID as follow

PS 455449424C5545544845524DB87AD700

PC-1  455449424C5545544845524DB87AD701 

PC-2  455449424C5545544845524DB87AD702

PC-3  455449424C5545544845524DB87AD703

PC-4  455449424C5545544845524DB87AD704

How can I do this....?

  • Hi,

    0 is NRF_SUCCESS so there must be something else. Looking at the log in your screenshot I see that you have not tested with a debug build. Please do that and let me know what the error code is.

  • Hi Einar,

    I was in debug build and error code = 0x00000004 call address 0x00028128

  • Hi,

    Sorry, I was multitasking a bit too much. Error code 4 is NRF_ERROR_NO_MEM, and from the API doc for sd_ble_uuid_vs_add() you see that it is returned if there are no more free slots for VS UUIDs. So you need to increase the NRF_SDH_BLE_VS_UUID_COUNT. Set this higher, and adjust the application RAM start address and size, as this will cause the SoftDevice RAM usage to increase slightly.

    I am a bit surprised about what you write before, as this happens on the second base you add and you set it to 2, but you do not have full overview of you app and also add another bae UUID somewhere else (for instance if you incorporate a BLE service from the SDK that use a 128 bit UUID)?

  • After changing the RAM Size as follow

    ***OLD Flash Macro***
    FLASH_PH_START=0x0
    FLASH_PH_SIZE=0x100000
    RAM_PH_START=0x20000000
    RAM_PH_SIZE=0x40000
    FLASH_START=0x27000
    FLASH_SIZE=0xd9000
    RAM_START=0x20002270
    RAM_SIZE=0x3dd90
    ***Try-1 Flash Macro***
    FLASH_PH_START=0x0
    FLASH_PH_SIZE=0x100000
    RAM_PH_START=0x20000000
    RAM_PH_SIZE=0x40000
    FLASH_START=0x27000
    FLASH_SIZE=0xd9000
    RAM_START=0x20001800
    RAM_SIZE=0x3e800

    I got the following error:

    <info> app_timer: RTC: initialized.
    <warning> nrf_sdh_ble: Insufficient RAM allocated for the SoftDevice.
    <warning> nrf_sdh_ble: Change the RAM start location from 0x20001800 to 0x20002270.
    <warning> nrf_sdh_ble: Maximum RAM size for application is 0x3DD90.
    <error> nrf_sdh_ble: sd_ble_enable() returned NRF_ERROR_NO_MEM.
    <error> app: Fatal error

    ***Try-2 Flash Macro***

    FLASH_PH_START=0x0
    FLASH_PH_SIZE=0x100000
    RAM_PH_START=0x20000000
    RAM_PH_SIZE=0x40000
    FLASH_START=0x27000
    FLASH_SIZE=0xd9000
    RAM_START=0x20002ce0
    RAM_SIZE=0x3d320

    Still returns the same error code 4( NRF_ERROR_NO_MEM)

  • The first error is because you have configured app RAM start and size wrongly. Then you fixed that, and you get NRF_ERROR_NO_MEM returned from sd_ble_uuid_vs_add() add again. That means that you need to increase NRF_SDH_BLE_VS_UUID_COUNT

Related