WebBluetoothCG / web-bluetooth

Bluetooth support for the Web.
http://www.w3.org/community/web-bluetooth/
Other
1.38k stars 187 forks source link

Advertisement / Beacon Broadcast Support #231

Open kevinahuber opened 8 years ago

kevinahuber commented 8 years ago

It would be fantastic for web-bluetooth to allow a web page to broadcast a bluetooth beacon, specifically a physical web beacon (Eddystone URL). This would work well with #191 - allowing web pages to talk to each other locally through browsers and URL's

This could be achieved through filling an advertisement, or specifically broadcasting an Eddystone URL packet.

Tobbyte commented 8 years ago

Being able to configure a device to advertise in peripheral mode via a web page would open up a whole world of opportunities ( @kevinahuber: that's what you describe, isn't it?): Possible use case:

Assumed there will be more and more devices be able to act in peripheral mode in the near future http://stackoverflow.com/questions/26482611/chipsets-devices-supporting-android-5-ble-peripheral-mode spam could get a real issue though.

But the sound of webbluetooth + instant apps + the physical web is quite promising :)

related topic: https://github.com/google/physical-web/issues/662

@jyasskin: Do you guys may already have a roadmap for implementation?

beaufortfrancois commented 8 years ago

As mentioned in https://webbluetoothcg.github.io/web-bluetooth/#introduction,

The first version of this specification allows web pages, running on a UA in the Central role, to connect to GATT Servers over either a BR/EDR or LE connection.

I'm quite positive we may want to expose a Web Bluetooth API to support broadcasting mode in the future. In the mean time, you should have a look at https://github.com/google/eddystone/tree/master/libraries/javascript/eddystone-advertising, an Eddystone Advertising Library that exposes simple functions that developers can use to advertise a Valid Eddystone packet from their Chrome OS device.

jracle commented 8 years ago

Should we also classify in beacons label ?

jracle commented 8 years ago

thanks @jyasskin!

geekuillaume commented 7 years ago

Is there any news regarding this feature request? Or somewhere else to follow the discussion around it?

kevinahuber commented 6 years ago

@geekuillaume I like your excitement! What are your thoughts about it?

geekuillaume commented 6 years ago

I think it would be a nice addition to the Web Bluetooth API. There is already a Nearby API included on smartphone since Android 2.3 and on iOS.

Basically it would mirror the Java/Swift API (publish, unpublish, subscribe, unsubscribe) to broadcast or scan for around beacons in the form of a JS Buffer.

This API would requires a special permission from the user when first used by the page.

kevinahuber commented 6 years ago

@jyasskin @beaufortfrancois I noticed this has been added to the implementation status and there is a spec. Has any progress been made on implementation? What would be the best way to kick that off?

beaufortfrancois commented 6 years ago

The team is currently focusing on Web platform tests and Windows support. There is no progress on this yet.

geekuillaume commented 6 years ago

@beaufortfrancois Is there something I can do to help define and integrate this feature?

scheib commented 6 years ago

@geekuillaume Though seemingly a small feature, this is a large task. I like it, but it's not something we're planning to do for a long time. To do this would require:

h43z commented 5 years ago

Any updates?

TomasHubelbauer commented 4 years ago

Is this the best issue to subscribe to for notifications about progress on this feature? I'd love to make use of this when and if it becomes a part of the Web Bluetooth feature set.

scheib commented 4 years ago

This is one good place to monitor.

We're a long way off still from this. Scanning has some partial implementation in place, and until that is completed I don't think we'll see any movement here.

Chromium's https://www.chromium.org/teams/web-capabilities-fugu project is partner focused and is tracking requests and interest in the chromium issue tracker. Beyond expressing support here, you can also do so on related issues there. Asking for the minimum required, with a non-speculative use case, will help the most.

https://crbug.com/897312 - Scanning https://crbug.com/1043409 - Advertising only https://crbug.com/1018925 - Peripheral (Advertising, Services, Characteristics)

jimmywarting commented 3 years ago

I would really like this, there is not anything close enought to https://developers.google.com/nearby that lets u hook up two devices with webrtc and start sharing files locally without the help of a server

samjgorman commented 2 years ago

Just voicing my support for this feature as well. I'm quite interested in enabling peer discovery with web bluetooth and then allowing for a flexible choice of transport layers to exchange this info over a p2p connection...

getify commented 1 year ago

I'm building several apps (installed PWAs) that run only on your local device, with no server.

These apps aspire let you share your data with the same app on another device, using a variety of peer-to-peer techniques, so that a server never has to be involved.

The current best zero-server sharing is via animated QR codes and a device camera. That's a bit awkward/annoying, but it works. Other options I'm exploring include webaudio+mic, webnfc, etc. WebRTC DataChannel would also be nice (when internet is available), but only if signaling could be done peer-to-peer (using something like webbluetooth or webnfc).

For example, I have a clipboard/copy-paste app to copy text on one device, then have that text available to paste on another device. Right now, that app encrypts your data, saves it to a gist via your github acct, then lets the other device pull it. I'm adding the animated QR stuff right now.

But I would super love to have webbluetooth P2P to offer much easier/more-ergonomic data sync between devices (without any internet).