tree: ca19b4998685094079e30614247155722c174b32 [path history] [tgz]
  1. meta/
  2. src/
  3. BUILD.gn
  4. README.md
src/connectivity/bluetooth/profiles/bt-fastpair-provider/README.md

Bluetooth Profile: Fast Pair Provider

This component implements the Google Fast Pair Service (GFPS) Provider role as defined in the official specification.

Build

Ensure bt-fastpair-provider package is in your Fuchsia build. To include it in the universe set of packages, use the fx set configuration or fx args. To include it in the base or cached set of packages, update the product-specific .gni file.

bt-fastpair-provider provides the fuchsia.bluetooth.fastpair.Provider capability which allows clients to enable/disable the service. Include the core shard in the product configuration. For example, for the workstation configuration, add the core shard to the core_realm_shards list in workstation.gni.

Configuration

The component relies on structured configuration to define a configurable set of program parameters. See the component manifest for more details on the configurable parameters.

A product integrator must define a configuration with the appropriate values and include it with the package. See the product assembly for more information.

For example, define a configuration and a package:

fuchsia_structured_config_values("example_config_values") {
  component_name = "bt-fastpair-provider"
  cm_label = "//src/connectivity/bluetooth/profiles/bt-fastpair-provider:manifest"
  values = {
    model_id = 0
    firmware_revision = "1.0.0"
    private_key = "ThisIsAnExamplePrivateKey"
  }
}

fuchsia_package("bt-fastpair-provider") {
  deps = [
    ":example_config_values",
    "//src/connectivity/bluetooth/profiles/bt-fastpair-provider:component",
  ]
}

Include the bt-fastpair-provider package in the build of your Fuchsia product.

Inspect

The bt-fastpair-provider component includes support for component inspection. To view component metrics and inspect data, use ffx inspect show core/bluetooth-core/bt-fastpair-provider.

Hierarchy

root:
  provider:
    account_key_count = 0
    active_host = (true, false)
    advertisement = (ModelId, AccountKeys, None)
    fast_pair_enabled = (true, false)
    personalized_name = ""
    personalized_name_set = (true, false)
    pairing_manager:
      owner = (Upstream, FastPair)
      procedure_1:
        le_id = ""
        bredr_id = ""
        state = (Started, Pairing, PasskeyChecked, PairingComplete, AccountKeyWritten)
        type = (Initial, Subsequent, Retroactive, PersonalizedName)
      procedure_2:
      finished_procedures:
        0:
          procedure_3:
            ...
            pairing_time_seconds = 0
        1:
          procedure_4:
            ...

Testing

Add the following to your Fuchsia configuration to include the component unit tests in your build:

//src/connectivity/bluetooth/profiles/bt-fastpair-provider:bt-fastpair-provider-tests

To run the tests:

fx test bt-fastpair-provider-tests