Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Redesign access to advertising data for a single device. #212

Closed
scheib opened this issue Feb 4, 2016 · 0 comments
Closed

Redesign access to advertising data for a single device. #212

scheib opened this issue Feb 4, 2016 · 0 comments

Comments

@scheib
Copy link
Contributor

scheib commented Feb 4, 2016

Current spec for access to the advertising data of a single device appears as:

interface BluetoothDevice {
  readonly attribute BluetoothAdvertisingData adData;
  ...
}
interface BluetoothAdvertisingData {
  readonly attribute unsigned short? appearance;
  readonly attribute byte? txPower;
  readonly attribute byte? rssi;
  readonly attribute BluetoothManufacturerDataMap manufacturerData;
  readonly attribute BluetoothServiceDataMap serviceData;
};

However, as discussed on https://code.google.com/p/chromium/issues/detail?id=568137 (ortuno & jyasskin) this is limited in many ways:

  • You have to be actively scanning to get the TxPower and the RSSI
  • Many devices don't advertise if they are connected to.
  • comment 6 details on RSII updates from Adv packets and connected device polling.

We could safely let web sites "scan" for devices they already have access to, which would let them opt into the increased power use and get advertising data updates. I think we'd change the .adData field into a "watch" function and event. Thoughts?

This issue is distinct from issue Let websites scan for nearby advertisements which would scan for all advertisements. Though, perhaps if #191 is solved this issue may be omitted as a subset of what could be done scanning for all AD packets.

jyasskin added a commit to jyasskin/web-bluetooth-1 that referenced this issue May 3, 2016
This removes the enforcement that a site can only see service data for services
from its allowed services list. Since an advertisement is broadcast and
read-only, I think there's neither any private data in the advertisement nor a
need to protect the device from hostile sites.

Fixes WebBluetoothCG#117 and fixes WebBluetoothCG#212.
jyasskin added a commit that referenced this issue May 6, 2016
This removes the enforcement that a site can only see service data for services
from its allowed services list. Since an advertisement is broadcast and
read-only, I think there's neither any private data in the advertisement nor a
need to protect the device from hostile sites.

Fixes #117 and fixes #212.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants