Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Obtain device hardware and firmware versions in DFU mode #462

Open
Dario-GoldenSpear opened this issue Oct 18, 2021 · 7 comments
Open

Obtain device hardware and firmware versions in DFU mode #462

Dario-GoldenSpear opened this issue Oct 18, 2021 · 7 comments

Comments

@Dario-GoldenSpear
Copy link

Dario-GoldenSpear commented Oct 18, 2021

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)

@philips77
Copy link
Member

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
Copy link
Member

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

@Dario-GoldenSpear
Copy link
Author

@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
Copy link
Member

You will be by being subscribed to this issue.

@CoderXLL-new
Copy link

Has this feature been implemented now?

@philips77
Copy link
Member

philips77 commented Aug 29, 2024

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
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants