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 MLDP (Microchip Low-energy Data Profile) 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 Card

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 TeraTerm (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 Card).

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

10

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

Completed.png

The module will reboot and output CMD

Reboot.png

 Results

Type V in TeraTerm to verify the new firmware version:

Upgraded.png

20th Annual
Microchip MASTERs Conference 2016
Register now - Deadline: July 29

JW Marriott Desert Ridge Resort-Phoenix, AZ

© 2016 Microchip Technology, Inc.
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.