NNN40 Bootloader with BLE DFU service
You are viewing an older revision! See the latest version
Homepage
Introduction¶
The main software components which go into a FOTA capable system. These include:
Softdevice: this is Nordic's encapsulation of the bluetooth stack. Application: the user's BLE application. Bootloader: which is responsible for firmware updates.
We release a prebuild Bootloader;nrf51822_BLDR.hex for Delta NNN40 BLE-Wifi Combo module. No need to build this program. Just download (do not import) this program and unzip it. First, To combine nrf51822_BLDR.hex with the program which you developed on mbed. Second, download/flash the combined image to target. Then, User can develop the application and update it to the target platform via BLE without USB cable.
Combine Bootloader-DFU with application which you developed¶
The User Guide of Firmware Over The Air (or FOTA for short) for this platform. You can programm the NNN40 without going through the mbed interface chip over USB.
Preparing before you start 1. nrf51822_BLDR.hex (The bootloader Delta provided) The Bootloader with BLE OTA service for nRF51822 and NNN40 which we prebuild already.
2. BLE_OTA_APP.hex (Your Applicatoin builded on mBed) If you build your application on mbed the hex image combined Nordic SoftDevice with the application.
- Softdevice: this is Nordic's encapsulation of the bluetooth stack.
- Application: the user's BLE application.
3. You need to combine bootloader.hex and your application. by using srec_cat.exe (Download it from http://sourceforge.net/projects/srecord/files/srecord-win32/ ) We recommand / verify srecord-1.59-win32 by trial.
The combine command example; srec_cat s130_SD.hex -intel BLE_OTA_APP.hex -intel nrf51822_BLDR.hex -intel -exclude 0x3FC00 0x3FC20 -generate 0x3FC00 0x3FC04 -l-e-constant 0x01 4 -generate 0x3FC04 0x3FC08 -l-e-constant 0x00 4 -generate 0x3FC08 0x3FC0C -l-e-constant 0xFE 4 -generate 0x3FC0C 0x3FC20 -constant 0x00 -o combined_DFU_OTA.hex -intel pause
Preparing the Application you want to update (program) to NNN40¶
1. Download and install nRF Master Control APK from Google Paly/Google Market (for Andorid phone installation)
Picture
2. Install nRF Master Control Panel (for PC installation) https://www.nordicsemi.com/eng/Products/nRFready-Demo-Apps/nRF-Master-Control-Panel-application
3. Build the image which you want to update on mbed by using *App for FOTA* mode.
4. The format of the firmware image that you use to update the device firmware depends on the tool that you use to perform the DFU. The DFU bootloader expects the image in binary format; however, some tools automatically convert the image from HEX format to binary format.
- Creating a zip with image and init packet*
If you use Master Control Panel or other tools by Nordic Semiconductor to update the device firmware, you must provide a zip that contains the image file and a corresponding init packet. To create this zip file, use the nrf.exe tool that is installed with the Master Control Panel. By default, the tool is located in the C:\Program Files (x86)\Nordic Semiconductor\Master Control Panel\<version>\nrf\ folder. Run nrf.exe dfu genpkg help to display usage instructions.
- Generate a hex to a zip with image and init packet*
In my case; Open Windows CMD console with administator permittion. Go to C:\Program Files (x86)\Nordic Semiconductor\Master Control Panel\3.10.0.14\nrf\ copy your applicaiton; the .hex file to same destinatioin. In the prompt:
include the mbed library with this snippet
nrfutil.exe dfu genpkg --application BLE_OTA_APP.hex BLE_OTA_APP.zip
Then, BLE_OTA_APP.zip will be generated. Unzip it you will get BLE_OTA_APP.bin and BLE_OTA_APP.dat Copy thoseBLE_OTA_APP.dat and BLE_OTA_APP.hex to the Android phone which will be using for DFU OTA.