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

S140 returns 0x04 error when add the DFU service

Hi,

I'm using nRF52840 and S140 based on the ble_app_hrs_rscs_relay example. I get a error code 4 when I add DFU service refer to the experimental_ble_app_buttonless_dfu .

I have tried to increase the attribute table size as follow:

ble_cfg_t ble_cfg; memset(&ble_cfg, 0x00, sizeof(ble_cfg)); ble_cfg.gatts_cfg.attr_tab_size.attr_tab_size = 8000; err_code = sd_ble_cfg_set(BLE_GATTS_CFG_ATTR_TAB_SIZE, &ble_cfg, ram_start); APP_ERROR_CHECK(err_code);

Then I also have adjusted the IRAM1 start address and size settings. I have tried set the attr_tab_size to 6000 8000 and 10000, but the problem still cann't be solved and it still return 0x04 error.

Could anyone give me some advice? Thanks

Parents
  • Firstly, adding the DFU Service means that you 're adding a vendor specific UUID(i.e. a 128-bit UUID), thus you need to set the vendor specific UUID count passed to the BLE Stack from 0 to 1 in ble_stack_init(), i.e.

     ble_cfg.common_cfg.vs_uuid_cfg.vs_uuid_count = 1;
    

    Secondly, you need to increase the RAM start address and size to make room for the additional UUID, so you should set the IRAM1 size to the following

    IRAM1 Start: 0x20002C10  Size: 0x3D3F0
    
Reply
  • Firstly, adding the DFU Service means that you 're adding a vendor specific UUID(i.e. a 128-bit UUID), thus you need to set the vendor specific UUID count passed to the BLE Stack from 0 to 1 in ble_stack_init(), i.e.

     ble_cfg.common_cfg.vs_uuid_cfg.vs_uuid_count = 1;
    

    Secondly, you need to increase the RAM start address and size to make room for the additional UUID, so you should set the IRAM1 size to the following

    IRAM1 Start: 0x20002C10  Size: 0x3D3F0
    
Children
No Data
Related