NordicSemiconductor / IOS-DFU-Library

OTA DFU Library for Mac and iOS, compatible with nRF5x SoCs

Home Page:http://www.nordicsemi.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Obtain device hardware and firmware versions in DFU mode

Dario-GoldenSpear opened this issue · comments

DFU Bootloader version (please complete the following information):

  • SDK version: 17.0.2
  • Bonding used: no
  • Library version: 4.10.4

Device information (please complete the following information):

  • Device: iPhone 7+
  • OS: 14.8
  • Nordic Device: nRF 52 Dev. Kit.

Your question
we have an iOS app based on Nordic's nRF Toolbox project (and hence using this library). We were able to:

  • flash the dev. kit using Segger and the sample SDK project:
    ../nRF5_SDK/nRF5_SDK_17.0.2_d674dde/examples/dfu/secure_bootloader/pca10040_s132_ble/
  • enter DFU mode (button 4 + reset, no buttonless mode yet)
  • perform OTA DFU from the iOS application using a custom .zip firmware package with our devkit code downloaded from a backend using the device's name.

Question:
We would like to obtain the device hardware and firmware revision to obtain the latest .zip firmware package from the backend.
Is it possible to do that in DFU mode (no buttonless) from the iOS application? and if so, how do we get that information?

ADDITIONAL NOTES:
I've tried exposing the required data by setting this:
#define NRF_DFU_PROTOCOL_REDUCED 0

in:
.../nRF5_SDK_17.0.2_d674dde/examples/dfu/secure_bootloader/pca10040_s132_ble/config/sdk_config.h(1252

which in turn enables a couple of methods (that afaik may be part of the solution to expose the required data):

static void on_hw_version_request(nrf_dfu_request_t const * p_req, nrf_dfu_response_t * p_res);
static void on_fw_version_request(nrf_dfu_request_t const * p_req, nrf_dfu_response_t * p_res);

in:
...nRF5_SDK_17.0.2_d674dde/components/libraries/bootloader/dfu/nrf_dfu_req_handler.c(107)

Hi,
The requested feature is not yet supported by the library. You'd have to send the commands manually, before starting dfu. Have a look here for details what to send and expect in response.

I'll mark your issue as a feature request. We'll try to add it, but I can't promise any dates.

@philips77 that sounds great! thanks for the prompt feedback and adding this as a feature request. Is there a way I could get notified if/when that feature is implemented? no rush, just to be aware of it.

You will be by being subscribed to this issue.