One bluetooth event, should receive many
Reported by
d...@nimblea.pe,
Oct 26 2016
|
|||
Issue descriptionChrome Version : 56.0.2901.0 URLs (if applicable) : Run the code at https://github.com/nimbleape/novalia-web-bluetooth What steps will reproduce the problem? (1) Connect the bluetooth device (2) Which runs the code and starts notifications on changes of value (3) Only one event is received What is the expected result? Many events What happens instead? One event only Tested on Chrome OS and Android and I receive many events (and nRF shows all the notifications too) Please provide any additional information below. Attach a screenshot if possible. address: F2:24:E6:EC:71:74 (nRF on android) uuid: 92:10:F6:CD:95:2D (bluetooth internals) Attached is a packet log Francois took a look and thinks its an OSX bug - currently running 10.11.6 (15G31)
,
Oct 26 2016
Here is where startNotifications() happens in packet-log:
[Oct 26 10:31:35.354] [ATT Send] Write Request - Handle:0x000c
Write Request - Handle:0x000c
Opcode: 0x12
Attribute Handle: 0x000c (12)
Value: 01 00
[Oct 26 10:31:35.354] [L2CAP SEND] Channel ID: 0x0004 Length: 0x0005 (05) [ 12 0C 00 01 00 ]
[Oct 26 10:31:35.376] [ATT Receive] Write Response
Write Response
Opcode: 0x13
[Oct 26 10:31:35.376] [L2CAP RECEIVE] Channel ID: 0x0004 Length: 0x0001 (01) [ 13 ]
[Oct 26 10:31:35.377] [ATT Receive] Handle Value Notification - Handle:0x000b - Value:80 80 90 AA 00
Handle Value Notification - Handle:0x000b - Value:80 80 90 AA 00
Opcode: 0x1b
Attribute Handle: 0x000b (11)
[Oct 26 10:31:35.377] [L2CAP RECEIVE] Channel ID: 0x0004 Length: 0x0008 (08) [ 1B 0B 00 80 80 90 AA 00 ]
,
Oct 26 2016
Chrome logs please https://www.chromium.org/developers/how-tos/file-web-bluetooth-bugs
,
Oct 27 2016
Here are btmon logs provided by Dan on ChromeOS: http://pastebin.com/raw/Yiwtq2zX And here's an extract: < ACL Data TX: Handle 3585 flags 0x00 dlen 9 [hci0] 16.319946 ATT: Write Request (0x12) len 4 Handle: 0x000c Data: 0100 > HCI Event: Number of Completed Packets (0x13) plen 5 [hci0] 16.325243 Num handles: 1 Handle: 3585 Count: 1 > ACL Data RX: Handle 3585 flags 0x02 dlen 5 [hci0] 16.394481 ATT: Write Response (0x13) len 0 > ACL Data RX: Handle 3585 flags 0x02 dlen 12 [hci0] 16.394759 ATT: Handle Value Notification (0x1b) len 7 Handle: 0x000b Data: 808090aa00 > ACL Data RX: Handle 3585 flags 0x02 dlen 12 [hci0] 17.304529 ATT: Handle Value Notification (0x1b) len 7 Handle: 0x000b Data: 8080903b7f > ACL Data RX: Handle 3585 flags 0x02 dlen 12 [hci0] 17.374609 ATT: Handle Value Notification (0x1b) len 7 Handle: 0x000b Data: 8080903b00
,
Oct 27 2016
Chrome Log from OSX Canary - log cleared just before before clicking on connect which uses bluetooth APIs
,
Oct 31 2016
Ah damn we have no logs for that part of the code. I'll update when we add logs.
,
Nov 3 2016
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/61b7c1766f78c2577d85a8cb4442d6df791bf8ad commit 61b7c1766f78c2577d85a8cb4442d6df791bf8ad Author: ortuno <ortuno@chromium.org> Date: Thu Nov 03 01:56:39 2016 bluetooth: Add logging for peripheral events on mac Sometimes users have problems with the API and the lack of logging has made it difficult to pinpoint the issue. BUG= 659608 Review-Url: https://codereview.chromium.org/2465283003 Cr-Commit-Position: refs/heads/master@{#429508} [modify] https://crrev.com/61b7c1766f78c2577d85a8cb4442d6df791bf8ad/device/bluetooth/bluetooth_low_energy_device_mac.mm
,
Nov 3 2016
Ok. I added some logging statements so that we can see where the notifications are getting lost. Could you try again in a couple of days and send the logs?
,
Nov 3 2016
Sure, thanks!
,
Nov 22 2016
#9: Where you able to get any new logs?
,
Nov 23 2016
New website but doing the same commands - website is https://novalia.nimbleape.xyz
,
Nov 23 2016
I've cleaned up logs and from what I can see (below), it looks like we've received only one GATT notification from macOS and then Bluetooth device gets disconnected 40 seconds after first connection. Is that right? [80120:1295:1123/100203:VERBOSE1:bluetooth_device_chooser_controller.cc(63)] requestDevice called with the following filters: [80120:1295:1123/100203:VERBOSE1:bluetooth_device_chooser_controller.cc(66)] Filter #1 [80120:1295:1123/100203:VERBOSE1:bluetooth_device_chooser_controller.cc(74)] Services: [80120:1295:1123/100203:VERBOSE1:bluetooth_device_chooser_controller.cc(75)] [ [80120:1295:1123/100203:VERBOSE1:bluetooth_device_chooser_controller.cc(77)] 0000feaa-0000-1000-8000-00805f9b34fb [80120:1295:1123/100203:VERBOSE1:bluetooth_device_chooser_controller.cc(78)] ] [80120:1295:1123/100203:VERBOSE1:bluetooth_device_chooser_controller.cc(66)] Filter #2 [80120:1295:1123/100203:VERBOSE1:bluetooth_device_chooser_controller.cc(74)] Services: [80120:1295:1123/100203:VERBOSE1:bluetooth_device_chooser_controller.cc(75)] [ [80120:1295:1123/100203:VERBOSE1:bluetooth_device_chooser_controller.cc(77)] 03b80e5a-ede8-4b33-a751-6ce34ec4c700 [80120:1295:1123/100203:VERBOSE1:bluetooth_device_chooser_controller.cc(78)] ] [80120:1295:1123/100203:VERBOSE1:bluetooth_low_energy_discovery_manager_mac.mm(50)] TryStartDiscovery != CBCentralManagerStatePoweredOn [80120:1295:1123/100203:VERBOSE1:bluetooth_adapter.cc(299)] BluetoothAdapter::OnStartDiscoverySession [80120:1295:1123/100203:VERBOSE1:bluetooth_device_chooser_controller.cc(481)] Started discovery session. [80120:1295:1123/100203:VERBOSE1:bluetooth_low_energy_discovery_manager_mac.mm(66)] TryStartDiscovery scanForPeripheralsWithServices ... [80120:1295:1123/100207:VERBOSE1:bluetooth_discovery_session.cc(45)] Stopping device discovery session. [80120:1295:1123/100207:VERBOSE1:bluetooth_low_energy_discovery_manager_mac.mm(80)] StopDiscovery [80120:1295:1123/100207:VERBOSE1:bluetooth_allowed_devices_map.cc(28)] Adding a device to Map of Allowed Devices. [80120:1295:1123/100207:VERBOSE1:bluetooth_allowed_devices_map.cc(46)] Id generated for device: wZB5kNqz/MGGqYQ4P73mEw== [80120:1295:1123/100207:VERBOSE1:web_bluetooth_service_impl.cc(792)] Device: novppia1 [80120:1295:1123/100207:VERBOSE1:web_bluetooth_service_impl.cc(449)] Services not yet discovered. [80120:1295:1123/100207:VERBOSE1:bluetooth_low_energy_device_mac.mm(196)] DidDiscoverPrimaryServices. [80120:1295:1123/100207:VERBOSE1:bluetooth_low_energy_device_mac.mm(235)] DidDiscoverCharacteristics. [80120:1295:1123/100207:VERBOSE1:bluetooth_low_energy_device_mac.mm(235)] DidDiscoverCharacteristics. [80120:1295:1123/100207:VERBOSE1:bluetooth_low_energy_device_mac.mm(235)] DidDiscoverCharacteristics. [80120:1295:1123/100207:VERBOSE1:web_bluetooth_service_impl.cc(268)] Services discovered for device: 92:10:F6:CD:95:2D [80120:1295:1123/100207:VERBOSE1:web_bluetooth_service_impl.cc(158)] Looking for service: 03b80e5a-ede8-4b33-a751-6ce34ec4c700 [80120:1295:1123/100207:VERBOSE1:web_bluetooth_service_impl.cc(161)] Service in cache: 00001530-1212-efde-1523-785feabcd123 [80120:1295:1123/100207:VERBOSE1:web_bluetooth_service_impl.cc(161)] Service in cache: 0000180a-0000-1000-8000-00805f9b34fb [80120:1295:1123/100207:VERBOSE1:web_bluetooth_service_impl.cc(161)] Service in cache: 03b80e5a-ede8-4b33-a751-6ce34ec4c700 [80120:1295:1123/100207:VERBOSE1:web_bluetooth_service_impl.cc(755)] Services found in device. [80120:1295:1123/100207:VERBOSE1:web_bluetooth_service_impl.cc(139)] Looking for characteristic: 7772e5db-3868-4112-a1a9-f2669d106bf3 [80120:1295:1123/100207:VERBOSE1:web_bluetooth_service_impl.cc(143)] Characteristic in cache: 7772e5db-3868-4112-a1a9-f2669d106bf3 [80120:1295:1123/100207:VERBOSE1:bluetooth_low_energy_device_mac.mm(305)] DidUpdateNotificationState [80120:1295:1123/100207:VERBOSE1:bluetooth_low_energy_device_mac.mm(285)] DidUpdateValue. [80120:1295:1123/100207:INFO:CONSOLE(530)] "170", source: https://novalia.nimbleape.xyz/src/my-bluetooth.html (530) [80120:1295:1123/100245:VERBOSE1:web_bluetooth_service_impl.cc(393)] Disconnecting device: wZB5kNqz/MGGqYQ4P73mEw== [80120:1295:1123/100245:VERBOSE1:bluetooth_adapter_mac.mm(685)] Disconnected from peripheral.
,
Nov 23 2016
Absolutely, I checked the console and my logs in the console showed only 1 notification and then after a while pressing buttons on the device, I disconnected the device using the disconnect API
,
Nov 23 2016
I don't think the problem is on our side :( Based on the logs it seems chrome is receiving a single notification from macOS.
,
Nov 23 2016
,
Nov 23 2016
Isn't this what Francois said? So who can raise this with Apple? I'm guessing I will have less luck trying to issue it somewhere than the chromium team will?
,
Nov 23 2016
Yeah, but I was hoping there was something we could do. You will probably have better luck given than you are an actual user and have all the information regarding your peripheral and your Mac and they can follow up with you more easily. Also are you using an external adapter or does your machine support BLE already? We've had problems in the past with unsupported BLE adapters.
,
Nov 23 2016
Built in BLE adapter in a 2013 Macbook Pro
,
Nov 24 2016
For the record, can you copy paste Bluetooth version information you can find in "About this Mac / System Report / Bluetooth" ? What is your MacOS version by the way? Sierra?
,
Nov 24 2016
No I'm still on El Capitan - didn't want to break my laptop while I had a load of talks/travelling/client work :D - So that is one avenue to go down Apple Bluetooth Software Version: 4.4.6f1 17910 Hardware, Features, and Settings: Name: Dan’s MacBook Pro Address: 60-03-08-99-05-D3 Bluetooth Low Energy Supported: Yes Handoff Supported: Yes Instant Hot Spot Supported: Yes Manufacturer: Broadcom Transport: USB Chipset: 20702B0 Firmware Version: v118 c9121 Bluetooth Power: On Discoverable: Off Connectable: Yes Auto Seek Pointing: On Remote wake: On Vendor ID: 0x05AC Product ID: 0x8289 HCI Version: 4.0 (0x6) HCI Revision: 0x23A1 LMP Version: 4.0 (0x6) LMP Subversion: 0x4176 Device Type (Major): Computer Device Type (Complete): Mac Portable Composite Class Of Device: 0x38010C Device Class (Major): 0x01 Device Class (Minor): 0x03 Service Class: 0x1C0 Auto Seek Keyboard: On |
|||
►
Sign in to add a comment |
|||
Comment 1 by fbeaufort@chromium.org
, Oct 26 2016