Skip to content

Ble suite v4 - #2823

Open
Ninja-jr wants to merge 46 commits into
BruceDevices:devfrom
Ninja-jr:Ble_suite_v4
Open

Ninja-jr wants to merge 46 commits into
BruceDevices:devfrom
Ninja-jr:Ble_suite_v4

Conversation

@Ninja-jr

@Ninja-jr Ninja-jr commented Aug 24, 2026 •

Copy link
Copy Markdown
Contributor

Complete overhaul of BLE Suite with 10+ new features, improved reliability, NimBLE compatibility awareness, and memory & radio lifecycle fixes.

───

New Features

· Device Scoring System - RSSI + stability-based attack potential (0-100)
· Connection Caching - 60-80% faster reconnections with stored params
· Graduated Connection Strategy - 5-phase: Probe → Fast → Aggressive → Exploit → Reconnect
· Robust GATT Client - Retry logic with exponential backoff
· GATT Explorer & GATT Server - Integrated from #2865 and adapted to the v4 architecture (all credit to original author Martin @mknblch)
· Attack Orchestrator - Chain attacks with rollback capability
· BLE Mirage - Device cloning/spoofing (single instance - NimBLE limitation)
· Attack Scheduler - Optimal timing analysis based on device patterns
· Device Fingerprinting - Personality profiles (response times, MTU, capabilities)
· Attack Logging - JSON export to SD/LittleFS

Enhanced Modules

· BLEStateManager - Initialized once per suite session instead of per-attempt init/deinit cycles (prevents DMA leaks and false low-RAM checks); initBLE() now calls wifiSuspend() to release Wi-Fi DMA buffers rather than wifiDisconnect() alone, resuming cleanly on exit
· HFPExploitEngine - Full AT command support, NimBLE-optimized (SCO disabled)
· FastPairCrypto - Proper HKDF, AES-CCM, key derivation
· UI - Clean theme integration with bleListLoop and proper text wrapping

NimBLE Compatibility

· Clear flags for unsupported features (SCO, audio routing, LE Audio)
· Graceful fallbacks where possible
· Polling-based event monitoring (no async notifications)
· Session-scoped BLE lifecycle where attacks create/delete clients rather than tearing down the stack

───

Breaking Changes

· None - fully backward compatible
· HFP audio/SCO functions now return false with warning (NimBLE limitation)

───

Testing

☐ Device scoring works with multiple targets
☐ Connection caching speeds up reconnects
☐ Graduated connection handles edge cases
☐ GATT Explorer and GATT Server operate properly under v4 lifecycle
☐ HFP AT commands work over GATT
☐ FastPair handshake completes
☐ Attack orchestration executes chain
☐ Attack logs export to JSON
☐ UI renders properly on small screens
☐ Session-scoped BLE init/deinit and wifiSuspend()/wifiResume() release DMA without false low-RAM toasts

@Huzzla101

Huzzla101 commented Aug 24, 2026 via email

Copy link
Copy Markdown

@Ninja-jr

Copy link
Copy Markdown
Contributor Author

Thanks...well I just try to do my best to enhance what I know

Ninja-jr pushed a commit to Ninja-jr/Bruce_firmware that referenced this pull request Aug 25, 2026
@Ninja-jr

Copy link
Copy Markdown
Contributor Author

Well tested now and ready to mzrge

Removed legacy UI helper functions and comments from BLE_Suite.cpp to streamline the codebase. Updated the file selection and menu handling logic for improved clarity and performance.
Ninja-jr pushed a commit to Ninja-jr/Bruce_firmware that referenced this pull request Aug 30, 2026
Ninja-jr pushed a commit to Ninja-jr/Bruce_firmware that referenced this pull request Aug 30, 2026
Updated BLE Suite with new mirage functionality and improved device name resolution.
Updated BLE_Suite.h to include new parameters and default values for address types in various structures and functions.
Updated connection parameters and added fallback connection logic for HFP service. Enhanced error handling and improved attribute discovery process.
Ninja-jr pushed a commit to Ninja-jr/Bruce_firmware that referenced this pull request Nov 13, 2026
Ninja-jr pushed a commit to Ninja-jr/Bruce_firmware that referenced this pull request Nov 13, 2026
Ninja-jr pushed a commit to Ninja-jr/Bruce_firmware that referenced this pull request Nov 15, 2026
Ninja-jr pushed a commit to Ninja-jr/Bruce_firmware that referenced this pull request Nov 17, 2026
Ninja-jr pushed a commit to Ninja-jr/Bruce_firmware that referenced this pull request Nov 17, 2026
Ninja-jr pushed a commit to Ninja-jr/Bruce_firmware that referenced this pull request Nov 17, 2026
Ninja-jr pushed a commit to Ninja-jr/Bruce_firmware that referenced this pull request Nov 17, 2026
Ninja-jr pushed a commit to Ninja-jr/Bruce_firmware that referenced this pull request Nov 17, 2026
Ninja-jr pushed a commit to Ninja-jr/Bruce_firmware that referenced this pull request Nov 17, 2026
Ninja-jr pushed a commit to Ninja-jr/Bruce_firmware that referenced this pull request Nov 17, 2026
Ninja-jr pushed a commit to Ninja-jr/Bruce_firmware that referenced this pull request Nov 17, 2026
Ninja-jr pushed a commit to Ninja-jr/Bruce_firmware that referenced this pull request Nov 17, 2026
Ninja-jr pushed a commit to Ninja-jr/Bruce_firmware that referenced this pull request Nov 17, 2026
Added functions to suspend and resume the WiFi driver, along with a check for its suspended state.
Added functions to suspend and resume WiFi operations, managing the WiFi state more effectively.
@Ninja-jr
Ninja-jr marked this pull request as draft November 18, 2026 18:44
Updated README for BLE Security Suite Module to version 4.1, detailing enhancements in memory management and BLE lifecycle. Added GATT Explorer and GATT Server integration, and clarified session-scoped initialization.
Updated version to 4.1 and modified last updated date. Added changes for memory management and WiFi suspension.
Updated version from 4.0 to 4.1 and modified BLE initialization to prevent memory leaks and improve connection stability.
@Ninja-jr
Ninja-jr marked this pull request as ready for review November 19, 2026 19:31
Enhanced memory management for BLE by attempting to free WiFi resources when DMA memory is insufficient.
Removed WiFi suspend/resume functionality and related state variables.
Removed functions related to WiFi suspension and resumption.
Updated BLE Suite version from 4.1 to 4.0 and modified various BLE connection handling strategies to improve memory management and connection stability.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants