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

Help with buttonless DFU

Hello!

nRF52832, SDK15, SES

I'm working on a project where DFU is activated by receiving a command from the app. I took ble_app_buttonless_dfu as reference. 

For starters, I will first explain what i added to my project.

Functions:

    -app_shutdown_handler()

    -NRF_PWR_MGMT_HANDLER_REGISTER

    -buttonless_dfu_sdh_state_observer()

    -NRF_SDH_STATE_OBSERVER

    -ble_dfu_evt_handler()

In the services_init() i added

   -ble_dfu_buttonless_init_t dfus_init = {0};
    // Initialize the async SVCI interface to bootloader.
    err_code = ble_dfu_buttonless_async_svci_init();
    APP_ERROR_CHECK(err_code);

    dfus_init.evt_handler = ble_dfu_evt_handler;

    err_code = ble_dfu_buttonless_init(&dfus_init);
    APP_ERROR_CHECK(err_code);

What I thought to do is to force a call on ble_dfu_buttonless_on_ble_evt, something like this:

if(p_evt_write->data[0] == 0x01)
{
       //START DFU
       ble_dfu_buttonless_on_ble_evt(BLE_GATTS_EVT_HVC, NULL);
}

But i'm sure that's not how it's supposed to be done. Can i get some guidance about this? (I have already check Getting started with Nordic's Secure DFU bootloader, a step by step guide and they use an older SDK)

Parents Reply Children
No Data
Related