2017年9月18日 星期一

nRF51: A precise description of DFU_OTA

In this article will have 2 parts.
part 1 will describe how to make a DFU zip  file
part 2 will describe how to resolve "DFUtarg" after program bootloader.
(which means you don't need to press S4 button)

PART 1.

STEP 1. hex file in ./build folder.

this is  BLE advertisng name of my device
you can see it in mobile app

and I try to OTA the device and change its advertisng name.


























__________________________________________________________________________



I program again and change  DEVICE_NAME  to "nrf_agatha"
like this




find the .hex in
C:\..\pca10028\s130\arm5_no_packs\_build





















STEP 2. install necessary application on PC
please install below applicaiton on your PC

nrf command line tool
https://www.nordicsemi.com/eng/Products/Bluetooth-low-energy/nRF51822

master control panel (MCP)
https://www.nordicsemi.com/eng/nordic/Products/nRF51-DK/nRF-MCP-x64/38907


STEP 3.command for making a zip file

copy this .hex file to
C:\Program Files (x86)\Nordic Semiconductor\Master Control Panel\3.10.0.14\nrf

open cmd.exe
and type the below command

cd C:\Program Files (x86)\Nordic Semiconductor\Master Control Panel\3.10.0.14\nrf
nrfutil.exe dfu genpkg --application nrf51422_xxac_s130.hex --application-version 0xffff --dev-revision 0xffff --dev-type 0xffff --sd-req 0xfffe nrf_agatha.zip

the result








and put nrf_agatha.zip to your mobile .


STEP 4.OTA upload test

start app nRF_Toolbox and press DFU























select .zip file























select device























start upload























disconnect























and you will the name change












PART 2. how to avoid "DFUtarg"
after programing

Softdevice  >
C:\..\nRF5x_SDK_11.0.0\components\softdevice\s130\hex

application >
(as your folder)

bootloader  >
C:\...\nRF5x_SDK_11.0.0\examples\dfu\bootloader\pca10028\dual_bank_ble_s130\arm5_no_packs\_build


go to
C:\Program Files (x86)\Nordic Semiconductor\nrf5x\bin

open cmd and type this command
cd C:\Program Files (x86)\Nordic Semiconductor\nrf5x\bin
nrfjprog.exe --family nrf51 --memwr 0x3fc00 --val 1

and type this
nrfjprog.exe --family nrf51 --reset



Note :
the above info had already write in my previous blogger, and this article just only for step-by-step




















沒有留言:

張貼留言