bluetooth: notifications are received in disconnected state
Reported by
emil.len...@gmail.com,
Jan 16 2017
|
||||||||
Issue descriptionChrome Version: 57.0.2982.0 Canary OS: Mac OS X 10.10.2 Steps to reproduce: In Tab 1: 1. Connect to a BLE device 2. Start listen to notifications for some characteristic and register a characteristicvaluechanged event handler In Tab 2: 3. Connect to the same BLE device In Tab 1: 4. Disconnect the gatt object 5. Make the peripheral fire a notification 6. The characteristicvaluechanged event listener is now called and the corresponding value can be read out Expected outcome: Step 6 is never observed In the standard ยง5.6.4, step 2: "If characteristicObject.service.device.gatt.connected is false, abort these sub-steps." This does not seem to be followed. If you manually read out the gatt.connected property, it is false.
,
Jan 16 2017
,
Jan 16 2017
,
Jan 16 2017
Thanks for reporting this Emil! I can reproduce in Chrome OS 57.0.2970.0: 1. Use BLE Peripheral Android App (https://play.google.com/store/apps/details?id=io.github.webbluetoothcg.bletestperipheral) to advertise a Battery Service 2. Tab #1: Go to https://googlechrome.github.io/samples/web-bluetooth/device-disconnect-async-await.html?service=battery_service 3. Tab #1: Connect to Android device and listen to notifications 4. Tab #2: Go to https://googlechrome.github.io/samples/web-bluetooth/device-disconnect-async-await.html?service=battery_service 4. Tab #2: Connect to Android device 5. Tab #1: Open DevTools console and type "myCharacteristic.service.device.gatt.disconnect();" to disconnect GATT from this web page 6. Trigger a notification from the Android device Boom! It should not appear in Tab #1! @scheib Can you have a look?
,
Jan 27 2017
I believe @ortuno has already started on working on it at https://codereview.chromium.org/2648583004/. Can you confirm and update this bug accordingly?
,
Jan 27 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/c4ac85eec321202ca4ecd56f0364dd49d9fb8236 commit c4ac85eec321202ca4ecd56f0364dd49d9fb8236 Author: ortuno <ortuno@chromium.org> Date: Fri Jan 27 22:53:27 2017 bluetooth: Stop firing value changed events after gatt disconnects Checks gatt.connected before firing an event. BUG= 681436 Review-Url: https://codereview.chromium.org/2648583004 Cr-Commit-Position: refs/heads/master@{#446809} [add] https://crrev.com/c4ac85eec321202ca4ecd56f0364dd49d9fb8236/third_party/WebKit/LayoutTests/bluetooth/characteristic/notifications/notification-after-disconnection.html [modify] https://crrev.com/c4ac85eec321202ca4ecd56f0364dd49d9fb8236/third_party/WebKit/LayoutTests/bluetooth/server/disconnect/detach-gc.html [modify] https://crrev.com/c4ac85eec321202ca4ecd56f0364dd49d9fb8236/third_party/WebKit/LayoutTests/bluetooth/server/disconnect/gc-detach.html [delete] https://crrev.com/cfefdd7db190a5161e39488c1f09e36635f7b8d4/third_party/WebKit/LayoutTests/resources/bluetooth/connect-iframe.html [add] https://crrev.com/c4ac85eec321202ca4ecd56f0364dd49d9fb8236/third_party/WebKit/LayoutTests/resources/bluetooth/heart-rate-iframe.html [modify] https://crrev.com/c4ac85eec321202ca4ecd56f0364dd49d9fb8236/third_party/WebKit/Source/modules/bluetooth/BluetoothRemoteGATTCharacteristic.cpp
,
Jan 27 2017
,
Jan 30 2017
Verified in Chrome 58.0.2997.0
,
Jan 30 2017
,
Feb 27 2017
|
||||||||
►
Sign in to add a comment |
||||||||
Comment 1 by fbeaufort@chromium.org
, Jan 16 2017