Skip to content

Commit 6150c3d

Browse files
dugganbwp91
authored andcommitted
fix BLE control characteristic UUID regression (#1208)
The BLE write characteristic UUID was mistakenly changed from the correct value (…2b11) to the service UUID (…1910) during the refactoring in 14f3bd8, causing "Control characteristic not found" errors on BLE-only devices like the H617A. Also adds debug logging of discovered characteristic UUIDs when the control characteristic is not found, to aid future diagnosis.
1 parent 55a52b3 commit 6150c3d

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

lib/connection/ble.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ process.on('unhandledRejection', (reason) => {
3333

3434
const H5075_UUID = 'ec88'
3535
const H5101_UUID = '0001'
36-
const CONTROL_CHARACTERISTIC_UUID = '000102030405060708090a0b0c0d1910'
36+
const CONTROL_CHARACTERISTIC_UUID = '000102030405060708090a0b0c0d2b11'
3737
const CONNECTION_TIMEOUT = 10000 // 10 seconds
3838
const WRITE_TIMEOUT = 5000 // 5 seconds
3939

@@ -237,6 +237,8 @@ export default class BLEConnection {
237237
)
238238

239239
if (!characteristic) {
240+
const discoveredUuids = Object.values(characteristics).map(c => c.uuid)
241+
accessory.logDebug(`discovered characteristics: ${JSON.stringify(discoveredUuids)}`)
240242
throw new Error('Control characteristic not found')
241243
}
242244
accessory.logDebug('found control characteristic')

0 commit comments

Comments
 (0)