In Android smartphones (with webbluetooth) device.subscribeToCharacteristic() and device.writeToCharacteristic() cannot run concurrently without triggering the error in #131 , i.e., GATT operation failed for unknown reason.
To avoid that, in _determineLPF2HubType we need to await device.subscribeToCharacteristic() before starting device.writeToCharacteristic(). We also need subscribeToCharacteristic() to return the promise returned by startNotifications() (in webbleabstraction.ts)
This seems to have fixed all my connection problems.
It is just four lines changed, I'll submit a pull request...
In Android smartphones (with webbluetooth) device.subscribeToCharacteristic() and device.writeToCharacteristic() cannot run concurrently without triggering the error in #131 , i.e., GATT operation failed for unknown reason.
To avoid that, in _determineLPF2HubType we need to await device.subscribeToCharacteristic() before starting device.writeToCharacteristic(). We also need subscribeToCharacteristic() to return the promise returned by startNotifications() (in webbleabstraction.ts)
This seems to have fixed all my connection problems.
It is just four lines changed, I'll submit a pull request...
Thanks for a great library!
Antonio