Re: [PATCH BlueZ 0/4] Add component batteries and Fast Pair Message Stream

Matthias Kurz <[email protected]>
Newsgroups org.kernel.vger.linux-bluetooth
Message-ID <CAO=2mx7FTdWXtjxFCZSsx-nPTczgs6ifNqHr_w2+VG6XvvO_tQ@mail.gmail.com>
Hi Luiz,

Thanks for pointing this out. The cover letter did not make the
transport and protocol sources sufficiently clear.

The general Fast Pair Message Stream specification defines two supported
implementations:

* RFCOMM, using the fixed endpoint UUID
  df21fe2c-2515-4fdb-8886-f12c4d67927c
* L2CAP, using the GATT PSM characteristic

https://developers.google.com/nearby/fast-pair/specifications/extensions/messagestream

The PSM characteristic page you linked documents the L2CAP variant. This
series currently implements only the RFCOMM variant. Pixel Buds Pro
advertise the fixed UUID in their SDP records, from which the code obtains
the RFCOMM channel. That transport was also verified against the real
device.

The battery message itself is defined by the Device Information
extension:

https://developers.google.com/nearby/fast-pair/specifications/extensions/deviceinformation

It defines message group 0x03, Battery updated code 0x03, and says that
the three additional-data bytes are identical to bytes s+2, s+3 and s+4
from Battery Notification. It also gives the complete example:

  0x0303000357417F

The individual battery-byte encoding comes from:

https://developers.google.com/nearby/fast-pair/specifications/extensions/batterynotification

The TWS-specific unsupported-case value is documented here:

https://developers.google.com/nearby/fast-pair/specifications/devicefeaturerequirement/devicefeaturerequirement_hearables

I will update the v2 cover letter and patch description to cite these
sources explicitly and state that the profile currently implements the
RFCOMM Message Stream transport. L2CAP Message Stream support would be
separate follow-up work.

Regards,
Matthias
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.