bluetooth: Unknown exception when enabling notifications on Mi Band |
||
Issue description
cpBurn:
I am trying to create a simple connection with my Mi Band 2 so I can read Heart Rate. I followed an example here but after requesting device, nothing appears on the list.
I also tried to use the example from the Demos folder. Using the Heart Rate Sensor Demo I observed the same problem, the device doesn't appear at all.
The only way I could connect it was setting acceptAllDevices: true, like this:
navigator.bluetooth.requestDevice({"acceptAllDevices":true, optionalServices: ['heart_rate']})
In this way I can pair and connect the device, but when I try to startNotifications() I get following:
DOMException: GATT operation failed for unknown reason.
Any ideas?
Tested on Chrome 56 and Chrome 59, MacOS 10.12.3
and Chrome Android 56.
,
Mar 7 2017
1. Gio is right. You may also want to use namePrefix filter instead of acceptAllDevices. See https://developers.google.com/web/updates/2015/07/interact-with-ble-devices-on-the-web#request_bluetooth_devices 2. IIRC, with Miband 1 (not 2), I had to send some proper commands before reading Heart rate notifications: https://github.com/beaufortfrancois/sandbox/blob/gh-pages/web-bluetooth/mi-band/miBand.js
,
Sep 13 2017
cpBurn doesn't appear to be monitoring this or likely to respond. If it's still an issue re-open or re-file please. |
||
►
Sign in to add a comment |
||
Comment 1 by ortuno@chromium.org
, Mar 6 2017