OTA and DFU¶
DFU v2 is the SiFli-SDK firmware-update middleware for DFU and OTA workflows. It provides three transport channels: USB-CDC, BLE, and Bluetooth PAN. Each channel includes a user application and a matching loader subproject.
Start by selecting the transport that matches the product's update path. Then begin with the corresponding application example; its loader is brought into the build automatically.
DFU v2 Structure¶
dfu_v2/
├── cdc/ USB-CDC channel
│ ├── app/ User application and PC update tool
│ └── loader/ CDC DFU loader
├── ble/ BLE channel
│ ├── app/ BLE peripheral application
│ └── loader/ BLE DFU loader
└── bt_pan/ Bluetooth PAN channel
├── app/ Application that downloads firmware from a server
└── loader/ PAN DFU loader
The application and loader for a given channel are designed to be used together. When you build an application, the SDK uses the AddDFU_* logic in building.py to include the matching loader as a subproject; do not build that loader separately. For BLE, the application supports runtime updates, while an update to the HCPU itself completes through the loader.
Choose an Update Channel¶
| Channel | Documented update path | Typical fit |
|---|---|---|
| USB-CDC | A PC updates the device through a USB virtual serial port. | Production, lab, and wired service workflows. |
| BLE | A BLE peripheral application receives an update. | A mobile app updates a connected product. |
| Bluetooth PAN | The device uses Bluetooth PAN networking to download an update from an HTTP server. | Connected products that retrieve their own update image. |
Product Update Review¶
- The selected transport matches the product's available connection path.
- The application and matching loader are built and tested as one update flow.
- The supported target board is confirmed in that example's README.
- Update interruption, recovery, and factory-service behavior are defined for the product.
- Image authenticity, integrity, version policy, and partition capacity are reviewed for the product release.
- Failed-update logs can be collected without depending on a healthy application.
Build a DFU v2 Example¶
From an example's project/ directory, build with:
Each example README lists its supported boards. The DFU v2 middleware configuration itself is under middleware/dfu_v2 in SiFli-SDK.
DFU v2 SDK Examples¶
| Channel | User application | Loader subproject |
|---|---|---|
| USB-CDC | cdc/app |
cdc/loader |
| BLE | ble/app |
ble/loader |
| Bluetooth PAN | bt_pan/app |
bt_pan/loader |
For the complete source index and current SDK navigation, see DFU v2 examples in SiFli-SDK.