Export BLE peripheral internals (GAP + BLE glue) to apps

Add a data-driven firmware-symbol export mechanism (EXPORT_ENABLE list in
build.sh, applied by the api_symbols.csv editor) and use it to enable all
gap_* functions, the safe ble_glue_* status/lifecycle calls, and
furi_hal_bt_init. Apps can now drive GAP directly, run a custom GATT
server, set the advertised name / extra-beacon config, and read radio-stack
status. The coprocessor FUS stack delete/install calls stay disabled to
avoid erasing the radio firmware. 19 symbols newly exported; firmware links.
This commit is contained in:
2026-09-11 13:07:37 +01:00
parent 999b20f378
commit 9fbbd1aeda
2 changed files with 36 additions and 2 deletions
+14
View File
@@ -165,6 +165,20 @@ Three facts about the Flipper Zero drive the design:
`stm32wb5x_BLE_Stack_full_extended_fw.bin` (BLE 5 extended advertising,
Coded PHY), which loads at 0x080C5000; it is not selected by this script.
### Extra firmware APIs exported to apps
Beyond the ST BLE commands, `build.sh` enables a set of firmware functions that
stock firmware keeps internal, so any `.fap` on this firmware can use them. The
set is a list of name patterns in `build.sh` (`EXPORT_ENABLE`); each enabled
symbol costs one API-table entry.
* **BLE peripheral internals** (`gap_*`, safe `ble_glue_*`, `furi_hal_bt_init`):
drive GAP directly, run a custom GATT server, change the advertised name and
the extra-beacon config, read connection state and radio-stack status,
without going through the firmware's serial profile. The coprocessor
firmware-update calls (`ble_glue_fus_stack_delete/install`) are deliberately
left disabled, since they can erase the radio stack.
`build.sh` also widens the GAP roles the firmware initialises
(`GAP_PERIPHERAL_ROLE | GAP_CENTRAL_ROLE | GAP_OBSERVER_ROLE`) in
`targets/f7/ble_glue/gap.c`. The app itself uses HCI-level scan and connect