Intent to Deprecate: Human-readable names for Bluetooth assigned numbers

112 views
Skip to first unread message

François Beaufort 🇫🇷

unread,
Aug 17, 2021, 2:34:48 AM8/17/21
to blink-dev

Contact emails

fbea...@chromium.org, rei...@chromium.org


Specification

https://webbluetoothcg.github.io/web-bluetooth/

https://github.com/WebBluetoothCG/web-bluetooth/pull/556


Summary

We intend to deprecate and remove usage of human-readable names for Bluetooth assigned numbers. Deprecation is targeted for M95.


Blink component

Blink>Bluetooth


Motivation

The Web Bluetooth specification has provided human-readable names for Bluetooth assigned numbers to increase readability for developers using standardized GATT services, characteristics, and descriptors. However, given the long-term maintenance burden it introduces and the lack of clear support from the Bluetooth SIG, we want to deprecate them and add clear warnings that while the existing entries will NOT be removed, no new entries will be added, and developers should use literal UUID constants instead as cross-vendor support for these aliases will be unreliable.


Risks

None. Existing human-readable names for Bluetooth assigned numbers will still work.  


Interoperability and Compatibility

Gecko: Never implemented

WebKit: Never implemented

Web developers: Neutral (Status quo causes confusion: https://github.com/WebBluetoothCG/web-bluetooth/issues/535#issue-765937849)


Debuggability

Any attempt to use human-readable names for Bluetooth assigned numbers will raise a console deprecation warning.


Is this feature fully tested by web-platform-tests?

Yes. https://wpt.fyi/results/bluetooth/idl/idl-BluetoothUUID.html


Tracking bug

https://crbug.com/1239499


Link to entry on the Chrome Platform Status

https://www.chromestatus.com/feature/5668230711476224

Yoav Weiss

unread,
Aug 17, 2021, 8:18:19 AM8/17/21
to François Beaufort 🇫🇷, blink-dev
So the intent is to add deprecation warnings from here on out when people are using the existing names?

--
You received this message because you are subscribed to the Google Groups "blink-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/CAPpwU5K25zizwVO_QSg2nquWwDeuHNRc-oR%2B%3D-8RYT-PDQAeLQ%40mail.gmail.com.

François Beaufort 🇫🇷

unread,
Aug 17, 2021, 8:24:28 AM8/17/21
to Yoav Weiss, blink-dev
Yes. The console deprecation warning will say something like "Human-readable names for Bluetooth assigned numbers are deprecated and will not be updated for new assignments. See https://groups.google.com/a/chromium.org/g/blink-dev/c/ibDHfEYWOCk. Use '0000180f-0000-1000-8000-00805f9b34fb'' instead of 'battery_service'.

See WIP CL at https://chromium-review.googlesource.com/c/chromium/src/+/3093985

Yoav Weiss

unread,
Aug 18, 2021, 4:56:33 PM8/18/21
to François Beaufort 🇫🇷, blink-dev
We typically avoid deprecation warnings with no end date. It's also not clear to me what the benefit of developers following the warning is. Isn't it enough that we won't add future human readable names?

Reilly Grant

unread,
Aug 19, 2021, 11:10:36 AM8/19/21
to Yoav Weiss, François Beaufort 🇫🇷, blink-dev
The motivation behind the deprecation is the discovery (from the linked issue) that the Bluetooth SIG is no longer maintaining the mapping table which we originally used for defining these aliases. At this point the Chromium implementation, rather than any specification, is the reference for which human-readable names are valid parameters. This is obviously not good. There are a couple of options here but the simplest seemed to be to remove the concept of human-readable aliases from the specification.

This leaves the question of what to do with the implementation in Chromium. Removing them would be a breaking change however leaving them in place also creates developer confusion as the set of supported aliases becomes an arbitrary snapshot of a defunct specification. It also creates a risk for future implementations because for compatibility they will need to support these aliases. My recommendation to François was therefore to add deprecation warnings in order to discourage future usage. We could, at some point in the future, remove support entirely if metrics indicate that usage has reached a sufficiently low threshold. In terms of maintenance burden however it does not seem particularly costly to keep the current table ~forever.

That said, if we don't believe the deprecation warning will discourage usage sufficiently that we can remove support from Chromium then future implementations will need to copy what Chromium does today in order to be compatible with existing content. That leads me to believe that the best path forward is to specify the mapping table directly in the Web Bluetooth specification. At that point we then have the option of continuing to update it as the Bluetooth SIG declares additional assigned numbers or leave it static.

What do you think?
Reilly Grant | Software Engineer | rei...@chromium.org | Google Chrome


Chris Harrelson

unread,
Aug 19, 2021, 5:41:25 PM8/19/21
to Reilly Grant, Yoav Weiss, François Beaufort 🇫🇷, blink-dev
On Thu, Aug 19, 2021 at 8:10 AM Reilly Grant <rei...@chromium.org> wrote:
 That leads me to believe that the best path forward is to specify the mapping table directly in the Web Bluetooth specification. At that point we then have the option of continuing to update it as the Bluetooth SIG declares additional assigned numbers or leave it static.

This approach sounds like a simple and practical way forward to me.
 

Yoav Weiss

unread,
Aug 20, 2021, 12:35:29 AM8/20/21
to Chris Harrelson, Reilly Grant, François Beaufort 🇫🇷, blink-dev
On Thu, Aug 19, 2021 at 11:41 PM Chris Harrelson <chri...@chromium.org> wrote:
On Thu, Aug 19, 2021 at 8:10 AM Reilly Grant <rei...@chromium.org> wrote:
 That leads me to believe that the best path forward is to specify the mapping table directly in the Web Bluetooth specification. At that point we then have the option of continuing to update it as the Bluetooth SIG declares additional assigned numbers or leave it static.

This approach sounds like a simple and practical way forward to me.

Same. That sounds like the best outcome for web developers. Thanks!

Thomas Steiner

unread,
Aug 20, 2021, 5:14:51 AM8/20/21
to Yoav Weiss, Chris Harrelson, Reilly Grant, François Beaufort 🇫🇷, blink-dev
> That leads me to believe that the best path forward is to specify the mapping table directly in the Web Bluetooth specification. At that point we then have the option of continuing to update it as the Bluetooth SIG declares additional assigned numbers or leave it static.

Love it. This seems like the best outcome for developers and seems manageable from a spec point of view. 




--
Thomas Steiner, PhD—Developer Advocate (https://blog.tomayac.com, https://twitter.com/tomayac)

Google Germany GmbH, ABC-Str. 19, 20354 Hamburg, Germany
Geschäftsführer: Paul Manicle, Halimah DeLaine Prado
Registergericht und -nummer: Hamburg, HRB 86891

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.1.23 (GNU/Linux)

iFy0uwAntT0bE3xtRa5AfeCheCkthAtTh3reSabiGbl0ck0fjumBl3DCharaCTersAttH3b0ttom.hTtPs://xKcd.cOm/1181/
-----END PGP SIGNATURE-----

François Beaufort 🇫🇷

unread,
Aug 20, 2021, 7:07:44 AM8/20/21
to Thomas Steiner, Yoav Weiss, Chris Harrelson, Reilly Grant, blink-dev
Thank you everyone!
We'll work on updating the spec and come back to you when it's done.

Reilly Grant

unread,
Aug 20, 2021, 3:26:57 PM8/20/21
to François Beaufort 🇫🇷, Thomas Steiner, Yoav Weiss, Chris Harrelson, blink-dev
Thanks for the feedback!

Reilly Grant | Software Engineer | rei...@chromium.org | Google Chrome

Balazs Engedy

unread,
Aug 31, 2021, 11:14:58 AM8/31/21
to blink-dev, Reilly Grant, Thomas Steiner, Yoav Weiss, Chris Harrelson, blink-dev, François Beaufort
Just to double-check: this is purely a web-facing change, and has no impact on any permission surfaces. Is that correct?

To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+unsubscribe@chromium.org.

--
You received this message because you are subscribed to the Google Groups "blink-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+unsubscribe@chromium.org.

--
You received this message because you are subscribed to the Google Groups "blink-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+unsubscribe@chromium.org.

--
You received this message because you are subscribed to the Google Groups "blink-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+unsubscribe@chromium.org.

François Beaufort 🇫🇷

unread,
Aug 31, 2021, 11:19:19 AM8/31/21
to Balazs Engedy, blink-dev, Reilly Grant, Thomas Steiner, Yoav Weiss, Chris Harrelson
Yes. It has no impact on any permission surfaces.

To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+...@chromium.org.

--
You received this message because you are subscribed to the Google Groups "blink-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+...@chromium.org.

--
You received this message because you are subscribed to the Google Groups "blink-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+...@chromium.org.

--
You received this message because you are subscribed to the Google Groups "blink-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+...@chromium.org.

François Beaufort 🇫🇷

unread,
Sep 2, 2021, 3:54:26 AM9/2/21
to Balazs Engedy, blink-dev, Reilly Grant, Thomas Steiner, Yoav Weiss, Chris Harrelson
As discussed previously, instead of the original planned deprecation, we've added human-readable names for the Bluetooth assigned numbers to the Bluetooth spec.
Reply all
Reply to author
Forward
0 new messages