Warn "'bluetooth' is not allowed for specified platform" on Google Chrome for Linux
Reported by
acas...@gmail.com,
Jun 27 2016
|
||
Issue descriptionChrome Version : Google Chrome 51.0.2704.103 (Official Build) (64-bit) OS Linux Command Line /usr/bin/google-chrome-stable --window-depth=24 --flag-switches-begin --enable-web-bluetooth --enable-experimental-extension-apis --flag-switches-end What steps will reproduce the problem? (1) Create an extention with bluetooth tag in the manifest.json (2) At chrome://extensions it will report this warn: "There were warnings when trying to install this extension: 'bluetooth' is not allowed for specified platform." (3) Also the example at https://developer.chrome.com/apps/app_bluetooth are outdated or doesn't work for Chrome on Linux (maybe only for Chrome on ChromeOS). It reports the error: Uncaught TypeError: Cannot read property 'addListener' of undefined What is the expected result? I really was expecting that it works as explained he because the samples from here https://googlechrome.github.io/samples/web-bluetooth/index.html are working fine! What happens instead? Chrome reports that bluetooth is not allowed! I got it "working" using the Web Bluetooth API: navigator.bluetooth.requestDevice({filters: filters}) .then(device => { console.log('> Name: ' + device.name); console.log('> Id: ' + device.id); console.log('> Allowed Services: ' + device.uuids.join('\n' + ' '.repeat(20))); console.log('> Connected: ' + device.gatt.connected); }) .catch(error => { console.log('Argh! ' + error); }); But I noticed that even if the BLE device is turned off (removing its battery) the log still showing the device: navigator.bluetooth Bluetooth > Name: Nordic_UART > Id: R51ytvmO6IoBRMqaqbLB/w== > Allowed Services: > Connected: false I think it is returning the cached result instead of searching for new devices.
,
Jun 27 2016
I need to use Chrome Extension because the software I'm developing is a device Configurator that needs to support Serial Port communication and Bluetooth. The Serial is already working.
,
Jun 27 2016
Does it have to be an extension? Can't it be a chrome app?
,
Jun 27 2016
Yes, it could be a Chrome App, but chrome.bluetooth doesn't work on Linux, from https://developer.chrome.com/apps/bluetooth: "Important: This API works only on OS X, Windows and Chrome OS. " This Configurator needs to work at least on Linux and Android, Windows and Mac will be extra bonus. And Web Bluetooth "appears" to work in the Chrome Extension but doesn't show the Bluetooth Chooser. I think the same thing will happen on Chrome App.
,
Jun 27 2016
Right, chrome.bluetooth doesn't work on all platforms but Web Bluetooth does and it will be available on Chrome Apps starting in m53. You can try it out in Chrome's Dev Channel[1] https://www.google.com/chrome/browser/desktop/index.html?platform=linux&extra=devchannel
,
Jun 27 2016
Amazing! Thank you very much!
,
Jun 28 2016
|
||
►
Sign in to add a comment |
||
Comment 1 by fbeaufort@chromium.org
, Jun 27 2016