Repository navigation
Fix BLE characteristic property mapping for writeWithoutResponse - #473
Merged
Merged
Conversation
Found while tracing the Bkool trainer control-write path end to end: this collapsed two genuinely different GATT properties into one string, losing information about a real device's actual write capability. Not the cause of the write-silently-dropped bug that prompted this (write() in the same file branches on an explicit caller-supplied boolean, never consults .properties, and nothing else in this repo reads .properties either) - but it's objectively wrong now that 'writeWithoutResponse' is a real, distinct value, so fixing it while here.
mapProperties()'s fix (previous commit) pushes 'writeWithoutResponse' into a BleProperty[], but this repo keeps its own local copy of that type (src/bindings/ble/types.ts) rather than importing it from incyclist-devices - so widening the devices-repo type wasn't enough, this one needed the same change. CI's type check caught it.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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
mapProperties()in the BLE binding collapsed a discovered characteristic'sWriteWithoutResponseGATT property into'write', losing the distinction from an actual (response-expecting)'write'property. Found while tracing the write path end to end while debugging Bkool trainer support (incyclist/devices).write()in the same file branches on an explicit caller-supplied boolean and never consults.properties, and nothing else in this repo reads.propertieseither) - but it's objectively wrong now that'writeWithoutResponse'is a real, distinct value inincyclist-devices'BlePropertytype.What changed
src/bindings/ble/characteristics.ts-mapProperties()now pushes'writeWithoutResponse'instead of'write'for that propertyTest plan
.propertiesto gate behavior)mapProperties()- worth adding if this file gets touched again