RN4020 Device Firmware Update Over-The-Air (OTA)

Last modified by Microchip on 2023/11/10 11:11

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

Back to Top

Reference Materials

Back to Top


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:

Connection Diagram

Back to Top

Procedure

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

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.

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

Board view showing JP1 in off position

Determine which COM port number has been assigned.

Device Manager window showing COM port number assigned.

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

TeraTerm window showing serial port setup

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

Back to Top

Detailed Steps – iOS Device

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

iOS app showing Bluetooth Smart Data

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.

App scanning for devices. Select your device from the list shown.

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 accompanying screen capture shows BTLE v1.10.09. Depending on which version your RN4020 contains will be shown on the screen.

Version number shows on the screen

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

Select "DFU-OTA" option

Select Download RN4020 DFU File to pull the image from iTunes®.

Select "Download RN4020 DFU File"

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

Select Browse

Select the DFU file.

Select the DFU file

On the Status activity window, move the Module to DFU mode slider switch to the ON position.

"Module to DFU Mode" Slider Switch io the ON position.

Select Upgrade.

Upgrade selected

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

App download progress bar

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

App dialog message shows "success"

The module will reboot and output CMD:

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

TeraTerm screen shows version

Back to Top

Results

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

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

Although the accompanying screen capture shows BTLE v1.23.5, please ensure that your RN4020 module contains the latest version of firmware.

Back to Top