RN4020 Device Firmware Update (OTA)

 Objective

This page shows you how to upgrade RN4020 firmware to the latest version via the Over-The-Air (OTA) process using Microchip's "Bluetooth Smart Data" app running on an iOS device. The following conditions must be met when the RN4020 performs a Device Firmware Update (DFU) through OTA:

  • Only a one-to-one connection is allowed between the device whose firmware is to be updated and the device that provides the update image
  • Avoid RF interference whenever possible
  • The module that is streaming the image to the remote device must have UART hardware flow control enabled

 Materials

Hardware Tools

Tool About Purchase
RN-4020-PICTAIL-50px.png
RN-4020-PICTAIL
RN4020 Bluetooth Low Energy PICtail™/PICtail Plus

Software Tools

This lab requires the following software tools:

 Connection Diagram

A host is required to enter commands that place the RN4020 into OTA DFU mode with Microchip Low-energy Data Profile (MLDP ) enabled and advertising enabled. The following connections are required at a minimum:

rn4020-dfu-ota-connection.png

 Procedure

Detailed Steps – RN4020 Device Under Test (DUT) – RN-4020-PICtail Daughter board

1

Ensure that the minimum signal connections as shown in the diagram above are connected. If you are using the RN4020 PICtail, they are already connected.

2

Connect the RN-4020-PICtail to the PC via supplied USB cable (make sure jumper JP1 is in the OFF position).

Jumper1.png

3

Determine which COM port number has been assigned.

SerialPort.png

4

Start Tera Term (115200, 8, n, 1, none)

TeraTerm.png

and enter the following:

+               // echo on
SF,2            // perform complete factory reset
SR,10008000     // support MLDP, enable OTA 
                //   (peripheral mode is enabled by default)
R,1             // reboot to apply settings
                // wait for "CMD"
A               // start advertising

Detailed Steps – iOS Device

1

On your iOS device, go to the App Store, search for "Bluetooth Smart Data" and install it.

SmartData.png

2

Launch the app and enable your Bluetooth interface (if required). The app will then begin scanning for devices. Once finished, select your device from the list shown.

DiscoveredList.png

3

The Module will output "Connected" when a connection is made. Also, the module's PIO1 (CONNECTION) pin will go high (GREEN LED on the PICtail daughter board).

The screen capture below shows BTLE v1.10.09. Depending on which version your RN4020 contains will be shown on the screen.

ModuleConnected.png

4

On the Status activity window, select "DFU-OTA" option at the bottom of the screen.

DFUOTA.png

5

Select "Download RN4020 DFU File" to pull the image from the Apple iTunes store.

DownloadDFU.png

6

Once the file is downloaded to your device, click the "Browse" button to browse to the DFU file.

Browse.png

7

Select the DFU file.

SelectDFU.png

8

On the Status activity window, move the "Module to DFU Mode" Slider Switch to the ON position.

ModuleToDFU.png

9

Select "Upgrade".

Upgrade.png

10

You will see a download status bar displaying status of the download.

Progress.png

11

Upon successful completion, you will see the following dialog on success. Click OK.

Completed.png

The module will reboot and output CMD:

The screen capture below shows BTLE v1.10.09. Depending on which version your RN4020 contains will be shown on the screen.

Reboot.png

 Results

Type V in Tera Term to verify the new firmware version:

Upgraded.png

The screen capture above shows BTLE v1.23.5. Ensure that your RN4020 module contains the latest version of firmware available at http://www.microchip.com/wwwproducts/en/RN4020

© 2024 Microchip Technology, Inc.
Notice: ARM and Cortex are the registered trademarks of ARM Limited in the EU and other countries.
Information contained on this site regarding device applications and the like is provided only for your convenience and may be superseded by updates. It is your responsibility to ensure that your application meets with your specifications. MICROCHIP MAKES NO REPRESENTATIONS OR WARRANTIES OF ANY KIND WHETHER EXPRESS OR IMPLIED, WRITTEN OR ORAL, STATUTORY OR OTHERWISE, RELATED TO THE INFORMATION, INCLUDING BUT NOT LIMITED TO ITS CONDITION, QUALITY, PERFORMANCE, MERCHANTABILITY OR FITNESS FOR PURPOSE. Microchip disclaims all liability arising from this information and its use. Use of Microchip devices in life support and/or safety applications is entirely at the buyer's risk, and the buyer agrees to defend, indemnify and hold harmless Microchip from any and all damages, claims, suits, or expenses resulting from such use. No licenses are conveyed, implicitly or otherwise, under any Microchip intellectual property rights.