You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When subscribing to a notify attribute on a BLE device with startNotifications() the created listener is not removed when a device.disconnect() is called.
This will cause the subsequent connect and subscription to have corrupt data in the valuedchanged event.
e.g.
`
const readNotify = await service.getCharacteristic('aUUid');
await readNotify .startNotifications();
readNotify.on('valuechanged',buffer=>{ buffer has some data});
await device.disconnect();
await device.connect();
await readNotify .startNotifications();
readNotify.on('valuechanged',buffer=>{ buffer has previous data and some new data});
`
The text was updated successfully, but these errors were encountered:
When subscribing to a notify attribute on a BLE device with startNotifications() the created listener is not removed when a device.disconnect() is called.
This will cause the subsequent connect and subscription to have corrupt data in the valuedchanged event.
e.g.
`
const readNotify = await service.getCharacteristic('aUUid');
await readNotify .startNotifications();
readNotify.on('valuechanged',buffer=>{ buffer has some data});
await device.disconnect();
await device.connect();
await readNotify .startNotifications();
readNotify.on('valuechanged',buffer=>{ buffer has previous data and some new data});
`
The text was updated successfully, but these errors were encountered: