After DFU completed new firmware is running but advertised name of new firmware not updated.

Hi

The issue is that after a buttonless DFU is completed the new firmware runs as expected but the new advertised name doesn't change.

device name in firmware before DFU p27_5f0181cb63ff 

device name in firmware after DFU p28_5f0181cb63ff  however after DFU the device is still advertising as DFU p27_5f0181cb63ff

if I then connect to the device with nRF Connect view the services and disconnect then the advertised name is seen correctly as p28_5f0181cb63ff

I am using  nRF5_SDK_15.2.0_9412b96  and secure_bootloader_ble_s140_pca10056

It seems for some reason the DEVICE_NAME is not updated/fetched on completion of a secure DFU

#define DEVICE_NAME                     DEVICE_NAME_PREFIX SOFTWARE_VERSION

Any pointers much appreciated

 

 

Parents
No Data
Reply
  • static void gap_params_init(void)
    {
        uint32_t                err_code;
        ble_gap_conn_params_t   gap_conn_params;
        ble_gap_conn_sec_mode_t sec_mode;
    
    
        ble_gap_addr_t ble_addr;
        sd_ble_gap_addr_get(&ble_addr);
    
        sprintf(&strDeviceName[0], "%s_%.2x%.2x%.2x%.2x%.2x%.2x", &DEVICE_NAME[0], 
            ble_addr.addr[0],
            ble_addr.addr[1],
            ble_addr.addr[2],
            ble_addr.addr[3],
            ble_addr.addr[4],
            ble_addr.addr[5]
        );
    
        sprintf(&strBleAddress[0], "%.2x:%.2x:%.2x:%.2x:%.2x:%.2x",  
            ble_addr.addr[0],
            ble_addr.addr[1],
            ble_addr.addr[2],
            ble_addr.addr[3],
            ble_addr.addr[4],
            ble_addr.addr[5]
        );
    
        
        
        BLE_GAP_CONN_SEC_MODE_SET_OPEN(&sec_mode);
    
    
    //    device_name_set(); 
        err_code = sd_ble_gap_device_name_set(&sec_mode, (uint8_t *) strDeviceName, strlen(strDeviceName));
    
    
    //    err_code = sd_ble_gap_device_name_set(&sec_mode,
    //                                          (const uint8_t *)strDeviceName,
    //                                          strlen(strDeviceName));
        APP_ERROR_CHECK(err_code);
    
        /* YOUR_JOB: Use an appearance value matching the application's use case.
           err_code = sd_ble_gap_appearance_set(BLE_APPEARANCE_);
           APP_ERROR_CHECK(err_code); */
    
        memset(&gap_conn_params, 0, sizeof(gap_conn_params));
    
        gap_conn_params.min_conn_interval = MIN_CONN_INTERVAL;
        gap_conn_params.max_conn_interval = MAX_CONN_INTERVAL;
        gap_conn_params.slave_latency     = SLAVE_LATENCY;
        gap_conn_params.conn_sup_timeout  = CONN_SUP_TIMEOUT;
    
        err_code = sd_ble_gap_ppcp_set(&gap_conn_params);
        APP_ERROR_CHECK(err_code);
    }

Children
No Data
Related