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
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
The text was updated successfully, but these errors were encountered:
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
The text was updated successfully, but these errors were encountered: