-
-
Notifications
You must be signed in to change notification settings - Fork 47
Add BLE log streaming with runtime toggle and read capability #714
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: develop
Are you sure you want to change the base?
Conversation
Co-authored-by: doudar <[email protected]>
…anges Co-authored-by: doudar <[email protected]>
Co-authored-by: doudar <[email protected]>
Changed BLE_BLELogging characteristic code from 0x2F to 0x30 in commit 38a474f. Updated all references in the header file, implementation, and documentation. |
|
@copilot instead of creating your own BLE notification, use the function already in the custom characteristic. |
Co-authored-by: doudar <[email protected]>
Refactored BleAppender to use |
BLE Log Streaming Implementation - COMPLETE ✅
This PR successfully implements BLE-based log streaming capability in SmartSpin2k firmware, mirroring existing UDP logging behavior.
Implementation Summary
Runtime Flag
bleLogEnabledtoRuntimeParameters(defaults to false, runtime-only)BLE Custom Characteristic (0x30 - BLE_BLELogging)
0x02, 0x30, <0|1>to enable/disable logging0x01, 0x30returns last cached log messageBLE_ss2kCustomCharacteristic::notify()functionBleAppender Class
ILogAppenderinterfaceIntegration & Documentation
logHandlerinMain.cppCustomCharacteristic.mddocumentationUsage Examples
Enable BLE logging:
0x02, 0x30, 0x01Disable BLE logging:
0x02, 0x30, 0x00Read last log:
0x01, 0x30→0x80, 0x30, [message]Real-time logs: Subscribe to characteristic, then enable logging
Testing Status
Key Features
Files Changed (8 files, +100 lines, -35 lines removed)
include/SmartSpin_parameters.hsrc/SmartSpin_parameters.cppinclude/BLE_Custom_Characteristic.hsrc/BLE_Custom_Characteristic.cppinclude/BleAppender.h(new)src/BleAppender.cpp(new, simplified)src/Main.cppCustomCharacteristic.mdOriginal prompt
This pull request was created from Copilot chat.
💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.