Add comprehensive BLE debug logging #2510
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
Add detailed debug logging throughout the BLE connection implementation to help diagnose connection issues, particularly on Windows where data is sent but not received.
Problem
Users report BLE connections on Windows that appear to connect successfully and start notifications, but no data is received (Sent: 27 bytes, Received: 0 bytes). Without detailed logging, it's impossible to diagnose where the data flow breaks down.
Changes
Added comprehensive logging for:
Connection Sequence:
Service & Characteristic Discovery:
Data Transmission (Send):
Data Reception (Receive):
Error Handling:
Testing
Use Case
When user connects BLE device:
[BLE]prefixThis will help identify root cause of Windows BLE receive issues.