From 918577b5b5220cbda976fde7ccf23335d4d91320 Mon Sep 17 00:00:00 2001 From: Manuel <71137295+mverch67@users.noreply.github.com> Date: Sun, 26 Apr 2026 21:57:30 +0200 Subject: [PATCH] added maintainers note to bluetooth variants Co-authored-by: Copilot --- src/bluetooth/HostedBluetooth.cpp | 15 +++++++++++++++ src/nimble/NimbleBluetooth.cpp | 3 +++ 2 files changed, 18 insertions(+) diff --git a/src/bluetooth/HostedBluetooth.cpp b/src/bluetooth/HostedBluetooth.cpp index 8a6a64476..791305125 100644 --- a/src/bluetooth/HostedBluetooth.cpp +++ b/src/bluetooth/HostedBluetooth.cpp @@ -30,6 +30,21 @@ namespace { +/* + * Maintainer note: HostedBluetooth intentionally stays close to NimbleBluetooth + * but is not a strict drop-in equivalent. + * + * Intentional differences from NimbleBluetooth include: + * - ESP-Hosted transport lifecycle handling (event callbacks + CP reset GPIO control). + * - Data-length update behavior (Hosted currently requests ble_gap_set_data_len on connect). + * - No Battery Service exposure here. + * + * If you modify common BLE flow in one class, review and likely mirror in both: + * - PhoneAPI queueing/synchronization between BLE callbacks and runOnce(). + * - Security/pairing config and passkey UX/status updates. + * - Mesh GATT characteristics, permissions, and advertising setup. + * - Connection parameter tuning and reconnect/disconnect cleanup paths. + */ constexpr uint16_t kPreferredBleMtu = 517; constexpr uint16_t kPreferredBleTxOctets = 251; constexpr uint16_t kPreferredBleTxTimeUs = (kPreferredBleTxOctets + 14) * 8; diff --git a/src/nimble/NimbleBluetooth.cpp b/src/nimble/NimbleBluetooth.cpp index b894261df..fe03482f6 100644 --- a/src/nimble/NimbleBluetooth.cpp +++ b/src/nimble/NimbleBluetooth.cpp @@ -25,6 +25,9 @@ namespace { +// Maintainer note: this backend intentionally diverges from HostedBluetooth in a few platform-specific areas. +// If you change shared BLE flow here (PhoneAPI queue/sync, security/pairing, mesh GATT/advertising, +// connect/disconnect handling), review and update HostedBluetooth.cpp as needed. constexpr uint16_t kPreferredBleMtu = 517; constexpr uint16_t kPreferredBleTxOctets = 251; constexpr uint16_t kPreferredBleTxTimeUs = (kPreferredBleTxOctets + 14) * 8;