Closed lesleyxyz closed 1 year ago
I'm transitioning from @abandonware/noble to node-ble. I have the following code in noble to enable notifications:
let descriptors = characteristic.discoverDescriptorsAsync() let descriptor = descriptors[0] descriptor.once('valueWrite', this.sendConnectSequence.bind(this)); characteristic.on('data', this.onReceive.bind(this)) await descriptor.writeValueAsync(Buffer.from([0x01, 0x00]))
How do I achieve this with node-ble? I currently have the characteristic and tried this:
await this.mepResponseChar.on('valuechanged', this.onMepResponse.bind(this)) await this.mepResponseChar.startNotifications()
but this isn't triggering any of the callbacks. I'm assuming this because I need access to the descriptors?
Nevermind, was an issue with specifically my code base
I'm transitioning from @abandonware/noble to node-ble. I have the following code in noble to enable notifications:
How do I achieve this with node-ble? I currently have the characteristic and tried this:
but this isn't triggering any of the callbacks. I'm assuming this because I need access to the descriptors?