This repository contains firmware for an EFR32MG24-based WSTK target.
The project started from the SoC Empty template, but now includes a secure, bonded-only Application OTA DFU implementation, custom advertising payloads, and delayed-bonding logic tailored for the hardware running in-house tests.
- Encrypted & bonded BLE operation with delayed security escalation to avoid boot-time races.
- Manufacturer-specific advertising payload that exposes the device identity and “needs pairing” indicator.
- Application-level OTA DFU (no Apploader) that writes the new GBL into the internal storage slot and reboots automatically after verification.
- UART logging helpers (
app_log_mine) for both normal operation and OTA state/status messages. - Bootloader slot alignment with the internal single-slot (0x80C0_000 start, 737 280 bytes) configuration from
/ref3.
wstkble/
├─ app.c / app.h Main application logic and BLE event handling
├─ autogen/ Generated SDK sources (GATT DB, linker script, etc.)
├─ config/ Project-specific configuration headers
├─ image/ Reference screenshots for documentation
├─ ref/ / ref2/ / ref3/ Reference projects (original template, Apploader BL, new internal-storage BL)
└─ .gitignore Ignores build artifacts such as “GNU ARM v10.3.1 - Default”
-
Tooling
- Simplicity Studio 5 with Gecko SDK Suite 4.3.x.
GNU ARM v10.3.1toolchain (installed automatically by Simplicity Studio).
-
Hardware
- Silicon Labs EFR32MG24 radio board (tested with BRD4188B).
- WSTK mainboard with VCOM enabled (for UART debug output).
-
Bootloader
- Flash the
ref3/bootloader-storage-internal-single-1536kproject (build then flash the*.s37).
This bootloader provides the internal storage slot the application OTA flow depends on.
- Flash the
- Open
wstkble.slcpin Simplicity Studio to generate the project files. - Build via Studio or CLI (
make -C "GNU ARM v10.3.1 - Default"). - Flash
bootloader-storage-internal-single-1536k.s37once, then flashwstkble.s37. - Open a serial terminal (115200 8N1) to observe the logs.
- Pair/bond the device (Just-Works). The app logs when the security level reaches mode 1 level 2.
- Use EFR Connect → Application OTA (not Apploader) on iOS/Android.
- The OTA control/data characteristics are set to
bonded + encryptedonly, so non-bonded devices receive a write-reject. - Monitor UART for lines such as:
OTA state: READY -> DOWNLOAD_BEGIN
OTA state: DOWNLOAD_END -> VERIFY
OTA image ready. Rebooting to install...
- The board reboots automatically, the bootloader copies the verified slot image, and the updated firmware runs.
| Message snippet | Meaning |
|---|---|
Bonding: delayed bonding scheduled |
Bonding will be requested ~300 ms later |
Connection parameters updated: sec_mode=1 |
Link is encrypted (Mode 1 Level 2) |
OTA denied: link not bonded+encrypted |
Client attempted OTA without pairing |
OTA storage slot start=0x080C0000 size=737280 |
Bootloader slot info (from handler) |
OTA error: … |
See ota_error_code for cause |
- OTA session resets to READY: the phone closed the connection before the state machine reached
WAIT_FOR_REBOOT. Keep the client in Application OTA mode until you see the reboot log. - No reboot after OTA: Ensure you are using the internal-storage bootloader (ref3) and that the linker script still ends the app at
0x80C0000. - Build errors about missing headers: regenerate the project from
wstkble.slcpso Studio re-createsautogen/with the proper include paths.
Derived from Silicon Labs examples under the Zlib license (see headers in source files). Any additional code in this repository follows the same license unless noted otherwise.