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

How to flash hex file using dfu in nrf Tool box application

hi, i am working on blinky example code. i was build the code and generated hex file using Eclipse IDE. i have nrf51822 ble module. image description

want to flash the hex file using dfu in nrf tool box mobile application(through bluetooth). i am able to select the hex file but unable flash hex file. because it is(nrf tool box app) displaying dfu service not found. is dfu service required to add existing blinky example. otherwise any dfu examples are there in sdk examples which can possible to flash code through nrf tool box app.

Parents
  • In order for DFU to work you have to flash bootloader and softdevice onto your board. Also as you are using custom board it's important that you define buttons and leds as by default bootloader is triggered by holding button4 and reseting the board. For a quick debug you may try to connect buttons and leds to the same pins as in Nordic nRF51-DK so no code changes will be necessary. Assuming that you are using SDK11 you should:

    1. do a full chip erase in nrfGo Studio or using nrfjprog -e
    2. flash S130v2 hex file
    3. flash bootloader hex file examples\dfu\bootloader\hex\dfu_dual_bank_ble_s130_pca10028
    4. after board reset equivalents of LEDs 1 and 3 should be on. Board is stuck in bootloader mode because there's no application flashed. There should be bootloader peripheral device 'DfuTarg' on you BLE scanner
    5. using nRFConnect app for android flash examples\dfu\ble_dfu_send_hex\test_images_update_nrf51\dfu_test_app_hrm_s130_w_dfu.zip:
    • connect to 'DfuTarg' device there
    • should be DFU button next to
    • disconnect button, press it select update .zip file and press start
    • there should be graph showing update progress
    1. after operation completes there should be Nordic_HRM peripheral
    2. if you connect to it there should be a DFU service and DFU button should be active so you can try to flash something else.

    For a first time approach I strongly recommend connecting button to DK button 4 pin and all 4 LEDs. Also try SDK11 as it's more automated than in case of 12. After you make it work you may try to switch to SDK12 where there's no automated way of entering bootloader from app so far and you need to have custom bootloader build with you crypto keys.

Reply
  • In order for DFU to work you have to flash bootloader and softdevice onto your board. Also as you are using custom board it's important that you define buttons and leds as by default bootloader is triggered by holding button4 and reseting the board. For a quick debug you may try to connect buttons and leds to the same pins as in Nordic nRF51-DK so no code changes will be necessary. Assuming that you are using SDK11 you should:

    1. do a full chip erase in nrfGo Studio or using nrfjprog -e
    2. flash S130v2 hex file
    3. flash bootloader hex file examples\dfu\bootloader\hex\dfu_dual_bank_ble_s130_pca10028
    4. after board reset equivalents of LEDs 1 and 3 should be on. Board is stuck in bootloader mode because there's no application flashed. There should be bootloader peripheral device 'DfuTarg' on you BLE scanner
    5. using nRFConnect app for android flash examples\dfu\ble_dfu_send_hex\test_images_update_nrf51\dfu_test_app_hrm_s130_w_dfu.zip:
    • connect to 'DfuTarg' device there
    • should be DFU button next to
    • disconnect button, press it select update .zip file and press start
    • there should be graph showing update progress
    1. after operation completes there should be Nordic_HRM peripheral
    2. if you connect to it there should be a DFU service and DFU button should be active so you can try to flash something else.

    For a first time approach I strongly recommend connecting button to DK button 4 pin and all 4 LEDs. Also try SDK11 as it's more automated than in case of 12. After you make it work you may try to switch to SDK12 where there's no automated way of entering bootloader from app so far and you need to have custom bootloader build with you crypto keys.

Children
No Data
Related