This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

SDK12 ble_app_buttonless_dfu

Hi,

Im tryin to use the ble_dfu service example from SDK12, I get DFU SERVICE NOT FOUND when trying to update from Android. Any suggestions what to look for?

I use S132v3, bootloader is flashed and I performed successful upload of the application via BLE when there was no app loaded.

  • Hi, Sergey Does your application contain service for "Buttonless DFU"? Once you successfully flashed your application the bootloader will no longer sit in DFU mode. So android application should force your application to reset with flags to activate bootloader DFU mode. See infocenter.nordicsemi.com/.../lib_dfu_transport_ble.html

  • Hi Konstantin, Im flashing ble_app_buttonless_dfu from the examples folder, so yes there is a DFU service. After the buttonless_dfu service is enabled device should reset and go into bootloader as far as I understand, but it doesnt.

  • When I write 0x01 into characteristics we get into the following code:

    static void on_rw_authorize_req(ble_dfu_t * p_dfu, ble_evt_t const * p_ble_evt)
    

    { if (p_ble_evt->evt.gatts_evt.conn_handle != p_dfu->conn_handle) { return; }

    const ble_gatts_evt_rw_authorize_request_t * p_auth_req =
        &p_ble_evt->evt.gatts_evt.params.authorize_request;
    
    if (
        (p_auth_req->type == BLE_GATTS_AUTHORIZE_TYPE_WRITE)
        &&
        (p_auth_req->request.write.handle == p_dfu->control_point_char.value_handle)
        &&
        (p_auth_req->request.write.op != BLE_GATTS_OP_PREP_WRITE_REQ)
        &&
        (p_auth_req->request.write.op != BLE_GATTS_OP_EXEC_WRITE_REQ_NOW)
        &&
        (p_auth_req->request.write.op != BLE_GATTS_OP_EXEC_WRITE_REQ_CANCEL)
       )
    {
        on_ctrlpt_write(p_dfu, &p_auth_req->request.write);
    }
    

    }

    and this condition fails: (p_auth_req->request.write.handle == p_dfu->control_point_char.value_handle)

  • Be aware that current version of nRFConnect app for both PC and android as well as MCP doesn't recognize new DFU services and upload method from SDK12. The only thing that works for me is PC application nrfutil version 1.5.0 (the most recent update) connected to nRF52 as BLE radio.

  • @keton : The nRF Connect for Mobile app v4.4.0 supports Secure DFU, it was released yesterday(05.09.16)