NordicSemiconductor / IOS-DFU-Library

OTA DFU Library for Mac and iOS, compatible with nRF5x SoCs
http://www.nordicsemi.com
BSD 3-Clause "New" or "Revised" License
525 stars 214 forks source link

Obtain device hardware and firmware versions in DFU mode #462

Open Dario-GoldenSpear opened 3 years ago

Dario-GoldenSpear commented 3 years ago

DFU Bootloader version (please complete the following information):

Device information (please complete the following information):

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

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)

philips77 commented 3 years ago

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.

philips77 commented 3 years ago

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

Dario-GoldenSpear commented 3 years ago

@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.

philips77 commented 3 years ago

You will be by being subscribed to this issue.

CoderXLL-new commented 2 months ago

Has this feature been implemented now?

philips77 commented 2 months ago

Hello, It hasn't been added to the library, but you may send required packet and parse the response manually in your app. Here's a link to the protocol documentation: https://docs.nordicsemi.com/bundle/sdk_nrf5_v17.1.0/page/lib_dfu_transport.html

I'm afraid this taks will have to wait much longer, as we are busy with lots of other projects.

CoderXLL-new commented 2 months ago

Anyway, thank you for your reply. Wish you a happy life