測試範例 BLE Secure DFU Bootloader@nRF52832 - PCA10040 - S132 DK開發板

動機:如何在 nRF52832 - PCA10040 S132 DK開發板上 測試範例 BLE Secure DFU Bootloader(learning by doing做中學) 呢?!

目的
Updating an nRF52 application with OTA DFU(Over The Air Device Firmware Update)


準備環境
1.Windows10/MacBook筆電 (安裝VirtualBox 5.2.6 + Ubuntu 17.10虛擬機)
2.nRF52832 - S132 DK開發板(需連接USB數據線)

實作步驟
1.將 nRF52832 開發板插入筆電USB

2.於 Ubuntu虛擬系統 按下 Ctrl +Alt + T 進入 終端機,並進入 範例目錄,指令如下
$ cd examples/dfu/secure_dfu_test_images/ble/nrf52832/

刪除 nRF52 開發板的flash memory,指令如下
$ nrfjprog --eraseall
如下圖

3.燒寫範例 .hex nRF52開發板,指令如下
$ nrfjprog --reset --program softdevice_bootloader_secure_ble_debug_without_bonds_s132.hex --family NRF52
如下圖
燒寫完成後,可見 nRF52開發板的 LED1 LED3 是亮的...

4.使用 nRF Connect App 上傳 .zip 檔案,如下圖
按下 Connect 連至開發板(DfuTest)
此時,LED2 LED3 是亮的
 按下 右上角 DFU 圖示 上傳檔案
選擇 ZIP 
 選擇 softdevice_s132.zip (之前已上傳至 Google Drive雲端硬碟) 
 可見上傳進度表... 100%

另外,使用 nRF Toolbox App 上傳 .zip 檔案,如下圖
按下 DFU
 按下 SELECT DEVICE
 選 DfuTest
 按下 OK
 選擇 softdevice_s132.zip (之前已上傳至 Google Drive雲端硬碟) 
 按下 OK
 上傳.zip檔案時,LED2 及 LED3 是亮的

5.可於 Windows10 -- 命令提示字元 中操作上述指令,如下圖
指令如下
>nrfjprog --eraseall
>nrfjprog --reset --program softdevice_bootloader_secure_ble_debug_without_bonds_s132.hex

6.使用 nRFgo Studio 查看 開發板,如下圖


參攷
1.Software Development Kit > nRF5 SDK > nRF5 SDK v14.2.0 > Examples > DFU bootloader examples > BLE Secure DFU Bootloader, https://infocenter.nordicsemi.com/topic/com.nordic.infocenter.sdk5.v14.2.0/ble_sdk_app_dfu_bootloader.html?cp=4_0_0_4_4_0
2.Updating an nRF52 application over the air with OTA DFU, https://thingtype.com/blog/dfu-ota-updating-an-nrf52-application-over-the-air/
3.nRF51822: secure DFU OTA via BLE, https://pcbreflux.blogspot.tw/2016/10/nrf51822-secure-dfu-ota-via-ble.html'
4.nRF51822 #16: secure DFU OTA via BLE (english), https://www.youtube.com/watch?v=T80kzxu7M04&feature=youtu.be

留言