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

adding custom uuid

Hi,

I would like to add custom UUID in my ble application. Due to this fact, I increase NRF_SDH_BLE_VS_UUID_COUNT constant to value equal to 1 which implies NRF_ERROR_NO_MEM error. I read in this thread https://devzone.nordicsemi.com/f/nordic-q-a/24695/add-new-service-in-sdk14 that I have to change the address of softdevice if I would like to solve the problem, is it true? I am using SDK 16 and softdevice s112.

Thanks in advance.

Samo

Parents
  • Hi,

    Yes, you usually have to increase the APP_RAM_BASE (see mem layout) address after increasing the NRF_SDH_BLE_VS_UUID_COUNT setting because the Softdevice needs more RAM to fit the larger UUID buffer.

    Which IDE are you using, and do you have logging over RTT or UART enabled? The debug log should print out the minimum APP_RAM_BASE address you can use if sd_ble_enable returned NRF_ERROR_NO_MEM .

  • I am using nrf log module. My project is written based on ble template project. I added build configuration "Debug" which inherits from common The optimization level I can not set to None because I get the following error:

    C:/Program Files/SEGGER/SEGGER Embedded Studio for ARM 4.52c/gcc/arm-none-eabi/bin/ld: error: .rodata is too large to fit in FLASH memory segment
    1> C:/Program Files/SEGGER/SEGGER Embedded Studio for ARM 4.52c/gcc/arm-none-eabi/bin/ld: error: .data is too large to fit in FLASH memory segment
    Build failed

    I am using the same optimization level (level 2 for size) for debug and release.  I also set NRF_LOG_BACKEND_RTT_ENABLED 1.

  • The linker errors show that you run out of flash when you turn off optimization. However, this is not related to the NRF_ERROR_NO_MEM  you get from sd_ble_enable(). Were you able to view the RTT log messages?

    Note that you can view the RTT messages while debugging in Segger if you disable the NRF_FPRINTF_FLAG_AUTOMATIC_CR_ON_LF_ENABLED option in sdk_config.h.

  • I solve the problem. The error was shown in J-Link RTT Viewer and not directly in the output panel in the segger studio.  I added two characteristics but I see only the first one which was added first. Do you know what can be the problem because I do not get any error? The constant BLE_GATT_DB_MAX_CHARS is set to 6.

  • It could be that client has cached the characteristics from a previous connection and that is why it doesn't see the new characteristic you added. If you use nRF connect on Android, try to select "Refresh device cache" after establishing the connection. Or if you are on iOS, kill the app and toggle flight mode enable button in settings, then re-open the app and re-connect.

Reply
  • It could be that client has cached the characteristics from a previous connection and that is why it doesn't see the new characteristic you added. If you use nRF connect on Android, try to select "Refresh device cache" after establishing the connection. Or if you are on iOS, kill the app and toggle flight mode enable button in settings, then re-open the app and re-connect.

Children
Related