8.1 DFU Utility
The DFU utility is a python-based tool and is used to communicate with the bootloader running on the RNWF11 via UART interface. It supports configuring the RNWF11 module into the Bootloader mode and performing write operations on the RNWF11 module’s Flash memory for DFU over the UART interface. The DFU utility is available as part of the RNWF11 release
Hardware and Software Dependencies
- Hardware
- RNWF11 module
 - PC
 
 - Software
- Python 3.x and higher
 - The 
btl_host.pyutility used for DFU is part of thernwf11_utilities_vX.X.X.zippackage available in the RNWF11 product web page. - It requires pyserial
                                package to communicate with device over UART. Use the following
                                command to install the pyserial
                                package.
pip3 install pyserial 
 
Hardware Setup
| RNWF11 Module | Pin | Description | 
|---|---|---|
| U1TX | 29 | UART Tx | 
| U1RX | 30 | UART Rx | 
Select J5 connector to the jumper “PC 3v3” on Add On board for the use of the USB port.
(Or)
Select “Host 3v3” if the DFU is performed with the Host MCU.
DFU Setup
>python btl_host.py -h
Usage: btl_host.py [options]
Options:
  -h, --help            show this help message and exit
  -v, --verbose         enable verbose output
  -r BAUD, --baud=BAUD  UART baudrate
  -u PARITY, --parity=PARITY
                        UART Parity (none/even/odd)
  -t, --tune            auto-tune UART baudrate
  -i PATH, --interface=PATH
                        communication interface
  -f FILE, --file=FILE  binary file to program
  -a ADDR, --address=ADDR
                        destination address (0x90000000)
  -b, --boot            enable write to the bootloader area
The user can find the images in the RNWF11_Firmware_vX.X.X.zip
                package from the RNWF11 product web page or the
                directory ota_demo\tools in the Host MCU examples of the RNWF11 for DFU tests.
at_cmd_app_rtos.X.production.ota.bin– the image which contain the default FLFS contents. The FLFS contents include the certificates and keys for secure connection.at_cmd_app_rtos.X.production.without_flfs.ota.bin– the image which do not contain the FLFS contents. This image is used when the user prefer to retain the FLFS contents after DFU is performed.
python btl_host.py -v -i COM32 -a 0x90000000 -f at_cmd_app_rtos.X.production.ota.bin