W3C home > Mailing lists > Public > public-web-bluetooth-log@w3.org > July 2017

Re: [web-bluetooth] errorSecurityError: Origin is not allowed to access the service. Tip: Add the service UUID to 'optionalServices' in requestDevice() options. https://goo.gl/HxfxSQ

From: François Beaufort via GitHub <sysbot+gh@w3.org>
Date: Tue, 18 Jul 2017 13:27:43 +0000
To: public-web-bluetooth-log@w3.org
Message-ID: <issue_comment.created-316063265-1500384461-sysbot+gh@w3.org>
If you use `acceptAllDevices: true` and your `filters` don't include `00000000-0000-1000-8000-00805f9b34fb` you may want to use `optionalServices` as in https://googlechrome.github.io/samples/web-bluetooth/read-characteristic-value-changed.html

I guess something like this should work:

  options.acceptAllDevices = true;
  options.optionalServices = ['00000000-0000-1000-8000-00805f9b34fb'];

GitHub Notification of comment by beaufortfrancois
Please view or discuss this issue at https://github.com/WebBluetoothCG/web-bluetooth/issues/370#issuecomment-316063265 using your GitHub account
Received on Tuesday, 18 July 2017 13:27:49 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 18 July 2017 13:27:57 UTC