-
Notifications
You must be signed in to change notification settings - Fork 1
nRF51822_OTA
Device Firmware Update for RedBearLab nRF51822 / BLE Nano Over The Air.
Last updated: 2014/11/21
-
Mount your BLE Nano onto MK20 USB board. Connect MK20 USB board or RedBearLab nRF51822 to your host PC. It will prompt that there is a disk named MBED plugging in.
-
Drag and drop the DFU-OTA bootloader for nRF51822, which is under the "nRF51/Bootloader" foler, to the MBED disk.
NOTE: The DFU-OTA bootloader for nRF51822 contains the BLE Soft Device.
You may not find the hex or bin file after Arduino IDE compiling the sketch, since the hex and bin file are temporary files and are deleted after compilation finished. Please follow the steps to obtain the hex or bin file after you compiling the sketch.
-
Download our nRF51822 add-on pakage for Arduino 1.5.8 and follow the README to add it to Arduino.
-
Open Arduino IDE. Click on "File->Preferences".
-
On the pop up window, click on the string below "More preferences can be edited directly in the file" and it will pop up the file browser to show where the preferences.txt located.
-
Close the Arduino IDE! It is important to close the Arduino IDE before editing the preferences.txt, otherwise, the modification of the file will make no effect.
-
Open the preferences.txt with text editor. Add a variable "build.path". The value of the variable is the path that you want to place the hex and bin files after compiling a corresponding sketch. E.g.,
build.path=C:\Users\dell\Documents\Arduino\Hex
Then the hex file and the other object files will be placed under the "C:\Users\dell\Documents\Arduino\Hex" folder when compiling a sketch.
-
Open your sketch with Arduino IDE 1.5.8. Select the board: "Tools > Board > RBL nRF51822" or "Tools > Board > BLE Nano".
-
Click on the "Compile" button at the IDE toolbar to begin compiling. When compilation complete, the hex and bin file should have been placed at the path: "C:\Users\dell\Documents\Arduino\Hex".
-
You should have seen that there are lots of object files when you navigate to the path you have specified. The hex or the bin file you need is "<your sketch name>.cpp.hex" or "<your sketch name>.cpp.bin". You can delete other files without any concern.
Currently not support.
-
Download nRF Toolbox on App Store or Google play.
-
Download and install Dropbox, Mail, QQ or any other Apps that can synchronize the firmware from PC to your iOS or Android device.
-
Synchronize the firmware (e.i. the hex file generated after compiling the sketch), to your iOS or Android device. Navigate to the firmware you have synchronized and open it with nRF Toolbox.
-
Power on RedBearLab nRF51822 or BLE Nano. If there is no application running on it, it will run the DFU-OTA bootloader forever. Otherwise, it will last running the bootloader for about 5 seconds, and then jump to the application. When running application, you can also reset it to run the DFU-OTA bootloader again for 5seconds. You should ensure that it is running the DFU-OTA bootloader when performing the DFU OTA using nRF Toolbox.
-
Touch the "SELECT DEVICE" button on nRF Toolbox. It will show the device list around you and select the "DFUTag" device as the target.
-
Touch the "Upload" button to begin uploading the firmware to RedBearLab nRF51822 or BLE Nano Over-The-Air. When upload completed, the application begins running if it is valid.
In the "Tools\Mac OS X" folder, you will find the DFU_OTA.zip. After unzip the package, it is the App that implement you uploading firmware to RedBearLab nRF51822 or BLE Nano.
-
Please follow the "Firmware preparation" section to set up the path where the firmware will be placed after compiling the sketch.
-
Run the App and click on the ".hex / .bin" button. It will pop up the file browser to let you select the firmware (either be a hex or a bin file) for RedBearLab nRF51822 or BLE Nano.
-
Navigate to where the firmware is located and select it to be uploaded.
-
Power on RedBearLab nRF51822 or BLE Nano. If there is no application running on it, it will run the DFU-OTA bootloader forever. Otherwise, it will last running the bootloader for about 5 seconds, and then jump to the application. When running application, you can also reset it to run the DFU-OTA bootloader again for 5seconds. You should ensure that it is running the DFU-OTA bootloader when performing the DFU OTA using the App.
-
Click on "Upload" to begin uploading the firmware to RedBearLab nRF51822 or BLE Nano Over-The-Air. When upload completed, the sketch begins running if it is valid.
Currently not support.