## LEA Providers without Internal Channel

This specification outlines the Fast Pair support for Fast Pair Providers
that use the Bluetooth Low Energy (BLE) protocol and consist of multiple
components, but lack an internal communication channel between these components.

### Requirements

Providers shall implement the following two categories.

#### Bluetooth

- Implement [Coordinated Set Identification Service](https://developers.google.com/nearby/fast-pair/specifications/CSIS)
  - Resolvable Set Identifier (RSI)
  - Set Identity Resolving Key (SIRK)

#### Fast Pair

- Implement LE advertising for Fast Pair service data
  - [Coordinated Set Info Advertising Payload](https://developers.google.com/nearby/fast-pair/specifications/service/provider#CoordinatedSetInfoPayload) for discoverable mode
  - [Fast Pair Account Data](https://developers.google.com/nearby/fast-pair/specifications/service/provider#AdvertisingWhenNotDiscoverable) for non-discoverable mode
- Implement Fast Pair GATT
  - [Model ID Characteristic](https://developers.google.com/nearby/fast-pair/specifications/characteristics#ModelId)
  - [Key-based Pairing Characteristic](https://developers.google.com/nearby/fast-pair/specifications/characteristics#KeyBasedPairing)
  - [FP Device Action Characteristic](https://developers.google.com/nearby/fast-pair/specifications/characteristics#FPDeviceAction)
    - Action ID: 0x02 (Coordinated Set Information)
  - [Passkey Characteristic](https://developers.google.com/nearby/fast-pair/specifications/characteristics#Passkey)
  - [Account Key Characteristic](https://developers.google.com/nearby/fast-pair/specifications/characteristics#AccountKey)

### Configurations

This section is to address how to set the configurations for pairing procedure.

#### Multiple components

For the LE Provider with multiple components, it shall implement CSIS in the
Bluetooth layer, and create the `Set Identity Resolving Key` for grouping
purpose. On the Fast Pair layer, the SIRK will also be set into
[Coordinated Set Information](https://developers.google.com/nearby/fast-pair/specifications/characteristics#table4.3.2), and used to generate
[Coordinated Set Info Advertising payload](https://developers.google.com/nearby/fast-pair/specifications/service/provider#CoordinatedSetInfoPayload) for discoverable mode.

The Seeker scans the advertisements and connects to each component of the
Provider separately, so each component reports only its own address.

The Provider shall send [Key-based Pairing Extended Response](https://developers.google.com/nearby/fast-pair/specifications/characteristics#table1.3.2)

1. Message Type: `0x02`
2. Flags: `0b11000000`
3. Number of the Provider's address: `0x01`
4. 6-byte address

The Provider shall send FP Device Action Response with [Coordinated Set
Information](https://developers.google.com/nearby/fast-pair/specifications/characteristics#table4.3.2)

1. Action ID: `0x02` (Coordinated Set Information)
2. Coordinated Set Member Type: `0x00` for the left component, `0x01` for the right component. Each component shall use a different value.
3. Coordinated Set Size: `0x02`
4. Set Identity Resolving Key Type: `0x01`
5. Set Identity Resolving Key Value: 16-byte data

All components shall return the same Set Identity Resolving Key and
Coordinated Set Size.

#### Single component

For the LE Provider with single component, it might not have CSIS in the
Bluetooth layer. But on the Fast Pair layer, the Provider shall still generate
the `Set Identity Resolving Key` (random 16-byte values), set it into
[Coordinated Set Information](https://developers.google.com/nearby/fast-pair/specifications/characteristics#table4.3.2), use it to generate
[Coordinated Set Info Advertising Payload](https://developers.google.com/nearby/fast-pair/specifications/service/provider#CoordinatedSetInfoPayload) for discoverable mode.

> [!NOTE]
> **Note:** The *Set Identity Resolving Key* shall not change, including across factory reset. Different Providers with the same model ID shall each have a unique *Set Identity Resolving Key*. The Provider can use any method to generate it, as long as it is unique.

The Provider shall send [Key-based Pairing Extended Response](https://developers.google.com/nearby/fast-pair/specifications/characteristics#table1.3.2)

1. Message Type: `0x02`
2. Flags: `0b11000000`
3. Number of the Provider's address: `0x01`
4. 6-byte address

The Provider shall send FP Device Action Response with [Coordinated Set
Information](https://developers.google.com/nearby/fast-pair/specifications/characteristics#table4.3.2)

1. Action ID: `0x02` (Coordinated Set Information)
2. Coordinated Set Member Type: `0x00` (left component) or `0x01` (right component)
3. Coordinated Set Size: `0x01`
4. Set Identity Resolving Key Type: `0x01`
5. Set Identity Resolving Key Value: 16-byte data

### Pairing Procedure

Three major Fast Pair supported pairing flows.

#### Initial Pairing

- All components of the Provider enter discoverable mode with
  - [Coordinated Set Info Advertising Payload](https://developers.google.com/nearby/fast-pair/specifications/service/provider#CoordinatedSetInfoPayload)
  - RSI Advertising Data, see [Coordinated Set Identification Service](https://www.bluetooth.com/specifications/specs/coordinated-set-identification-service1-1/)
- The Seeker performs the [Fast Pair Procedure](https://developers.google.com/nearby/fast-pair/specifications/service/gatt#procedure) with **Fast Pair Read** , see [Fast Pair Operation Over FP Device Action](https://developers.google.com/nearby/fast-pair/specifications/characteristics#FPDeviceAction.FastPairOperations)

![Initial Pairing message flow between the Seeker and both components of the Provider](https://developers.google.com/static/nearby/fast-pair/images/ha_initial_pairing.png)

#### Subsequent Pairing

- All components of the Provider are in non-discoverable mode with
  - [Fast Pair Account Data](https://developers.google.com/nearby/fast-pair/specifications/service/provider#AdvertisingWhenNotDiscoverable)
  - RSI Advertising Data, see [Coordinated Set Identification Service](https://www.bluetooth.com/specifications/specs/coordinated-set-identification-service1-1/)
- The Seeker performs the [Fast Pair Procedure](https://developers.google.com/nearby/fast-pair/specifications/service/gatt#procedure) with **Fast Pair Read** , see [Fast Pair Operation Over FP Device Action](https://developers.google.com/nearby/fast-pair/specifications/characteristics#FPDeviceAction.FastPairOperations)

![Subsequent Pairing message flow between the Seeker and both components of the Provider](https://developers.google.com/static/nearby/fast-pair/images/ha_subsequent_pairing.png)

#### Retroactive Pairing

- All components of the Provider enter discoverable mode with
  - [Coordinated Set Info Advertising Payload](https://developers.google.com/nearby/fast-pair/specifications/service/provider#CoordinatedSetInfoPayload)
  - RSI Advertising Data, see [Coordinated Set Identification Service](https://www.bluetooth.com/specifications/specs/coordinated-set-identification-service1-1/)
- The Seeker performs the [Fast Pair Procedure](https://developers.google.com/nearby/fast-pair/specifications/service/gatt#procedure) with **Fast Pair Read** , see [Fast Pair Operation Over FP Device Action](https://developers.google.com/nearby/fast-pair/specifications/characteristics#FPDeviceAction.FastPairOperations)

![Retroactive Pairing message flow between the Seeker and both components of the Provider](https://developers.google.com/static/nearby/fast-pair/images/ha_retroactive_pairing.png)