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

Add new service base on SDK13 is failed

Hi Sir,

I add NUS service into CSCS project base on nRF5_SDK_13 follow the steps below, there was no error occurred after build the project, but it didn't work. Please correct me if there is anything I missed or misunderstanding. Thanks.

1' Initialize NUS in the function services_init() in main.c ble_nus_init_t nus_init;

memset(&nus_init, 0, sizeof(nus_init));

nus_init.data_handler = nus_data_handler;

err_code = ble_nus_init(&m_nus, &nus_init);
APP_ERROR_CHECK(err_code);

2' Added the function call below in the function ble_evt_dispatch()

ble_nus_on_ble_evt(&m_nus, p_ble_evt);

3' Change the variable below from 0 to 2 in the function ble_stack_init()

ble_cfg.common_cfg.vs_uuid_cfg.vs_uuid_count 
Parents Reply Children
  • Hi, Thanks for your answer. Could you detail this procedure to RAM memory layout without changing SDK as Clement did. Which particular file and which modifications?

  • There is SoftDevice migration document attached to every release so if you look to any S13x V2/3/4/5 migration document and search for APP_RAM_BASE you will see how sd_ble_enable function should be called, how to find proper value and then depending on specific way how you enable SoftDevice and also depending on toolchain you use there is place where to set the value for linker. Also don't repeat mistake of Clement: this has very little to do with SDK version, this is about SoftDevice version (which might be the same as shipped with SDK or you can update header files manually from other release).

Related