Skip to content

Realtek BLE OTA

Zhiyuan edited this page Oct 29, 2025 · 6 revisions

Overview

This chapter provides an overview of the Over-The-Air (OTA) firmware upgrade schemes for Realtek Bluetooth Low Energy (BLE) devices. For the detailed introduction of Realtek BLE OTA design specifications, please refer to the RTL8752H Subsystems: OTA.

OTA Schemes

  • Bank Switching Scheme (Dual Bank)

    • Utilizes OTA Bank0 and Bank1 for firmware storage and backup.
    • Allows rollback to the previous version in case of update failure.
  • Non-Bank Switching Scheme (Single Bank)

    • Uses an OTA TMP area instead of Bank1.
    • Saves flash space, but increases reboot time after upgrade.

Process Description

  • The OTA process involves:
    • Controller: Usually a mobile phone, which initiates and manages the upgrade.
    • Target: The Realtek SoC receiving the firmware update.
  • The Controller and Target establish a connection to check if an upgrade can be performed.

Transmission Protocols

  • Silent OTA

    • Device functions remain available during the firmware upgrade.
    • A short restart occurs to enable new features.
  • Normal OTA

    • Device enters DFU (Device Firmware Upgrade) mode.
    • All device functions are disabled until the upgrade is complete.

The supporting status of Realtek BLE OTA on Zephyr is shown below:

SoC Series Silent OTA Normal OTA
RTL8752H Supported WIP
RTL87x2G WIP WIP

OTA and DFU Services

  • OTA Service

    • Manages the transmission of upgrade images from the Controller to the Target device.
  • DFU Service

    • Handles image data transfer and control commands.
    • Ensures successful data transmission and validation before rebooting the device.

How to Enable Realtek BLE OTA

To enable Realtek BLE OTA on Zephyr, add the following configurations to your BLE project's prj.conf.

# Enable Realtek BLE OTA
CONFIG_REALTEK_OTA=y
# Increase BT_RX_THREAD stack size for OTA memory requirements
CONFIG_BT_RX_STACK_SIZE=3000

Note: If you want to enable OTA in a non-BLE project (such as hello_wolrd), you must add the BLE features first.

To ensure logging is reliable and not dropped during the OTA process, add the following configuration to your prj.conf:

# Enlarge the log buffer size
CONFIG_LOG_BUFFER_SIZE=3072

Step-by-Step OTA Upgrade Guide

For a detailed, step-by-step guide on how to perform a full OTA upgrade flow on RTL8752H, refer to the Peripheral OTA sample guide.

Clone this wiki locally