Issue metadata
Sign in to add a comment
|
Web bluetooth readValue() value does not change for repeated reads.
Reported by
ben.ox...@gmail.com,
Jan 5
|
||||||||||||||||||||||||
Issue description
Chrome Version : 71.0.3578.98
Other browsers tested:
Other browsers do not support this functionality.
What steps will reproduce the problem?
(1) Use the attached file to connect to a bluetooth device. The example reads the battery level characteristic.
(2) Open the console so that log messages can be shown.
(3) Use BLE Perhiperhal Simulator or similar to emulate a device with battery level.
(4) Click the Connect button and select the device to read.
(5) Click the read button and confirm that the batter level is read correctly.
(6) Change the characteristic value in the simulator.
(7) Click the read button again. The value shown in the log has not changed.
What is the expected result?
It is expected that the value shown should be the same as the value on the bluetooth device when readValue() is called.
What happens instead?
It appears that readValue() does not change unless the page is refreshed. readValue() always returns the first value read from the device. Reconnecting to the device (calling navigator.bluetooth.requestdevice()) without refreshing the page does not allow the value to changes.
Please provide any additional information below. Attach a screenshot if
possible.
I have tested this both with the BLE Perhipheral Simulator and actual hardware (Microchip RN4020). I have had success when using characteristic notifications, but not readValue().) I have encountered the same issues when using Windows and an external bluetooth adapter (CSR 4.0) and on a Macbook Pro with inbuilt bluetooth. Hence, I suspect that the implementation of readValue() is not working correctly.
,
Jan 5
Correction: I have encountered the same issues when using Windows and an external bluetooth adapter (CSR 4.0) but works fine when using the same adapter on a Macbook Pro. Hence, I suspect that the windows implementation of readValue() is not working correctly.
,
Jan 6
,
Jan 8
Tried testing the issue on reported chrome version #71.0.3578.98 using Windows 10 by following below steps. Steps: ===== 1.Launched chrome. 2.Navigated to bluetooth-repeat-read-bug-example.html 3.Tried connecting to bluetooth using Use BLE Perhiperhal Simulator from mobile device. observation : unable to connect. @reporter: Could you please review above steps and let us know if anything is being missed here. Request you to retry the issue by creating a new person without any apps and extensions in it, reset all flags to default and let us know if issue still exists. please confirm if external bluetooth adapter is necessary to reproduce the issue ? Thanks.!
,
Jan 9
Hi! Sorry, you couldn't replicate with the instructions before. I've added some more detail and added a possibly crucial step (enable chrome://flags/#enable-experimental-web-platform-features)! I've also updated the attached example to make it clearer! I have now confirmed on another windows 10 laptop with integrated bluetooth and confirmed the same issue is reproducible following these steps. This should confirm that the Bluetooth drivers/adapter are not the issue. What steps will reproduce the problem? (1) Open Chrome and navigate to chrome://flags/#enable-experimental-web-platform-features and enable this. (2) Use the attached file to connect to a bluetooth device. The example reads the battery level characteristic. (3) Open the console so that log messages can be shown. (4) Use BLE Perhiperhal Simulator or similar to emulate a device with battery level. (5) In the BLE perhipheral simulator app, click the battery level button to advertise a battery level charateristic. (6) Click the Connect button and select the device to read. (7) Click the read button and confirm that the batter level is read correctly. (8) Change the characteristic value in the simulator. (9) Click the read button again. The value shown in the log has not changed.
,
Jan 9
Thank you for providing more feedback. Adding the requester to the cc list. For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
,
Jan 9
,
Jan 9
I believe this is a duplicate of issue 904114 which has already been fixed. Can you please try this in Chrome 73 (currently on dev-channel)? https://chromiumdash.appspot.com/commit/d810f68079066a4a8f9e9a3c3730fc1bcdf72f7a
,
Jan 10
I can confirm that this is fixed in 73.0.3664.3. Apologies for the duplicate! |
|||||||||||||||||||||||||
►
Sign in to add a comment |
|||||||||||||||||||||||||
Comment 1 by ben.ox...@gmail.com
, Jan 5