コレクションでコンテンツを整理
必要に応じて、コンテンツの保存と分類を行います。
プロバイダは、メッセージ ストリームを介してデバイス情報についてシーカーに通知できます。
メッセージ グループ名 |
値 |
デバイス情報イベント |
0x03 |
デバイス情報のコード名 |
値 |
モデル ID |
0x01 |
BLE アドレスを更新しました |
0x02 |
バッテリーの更新 |
0x03 |
バッテリー残量 |
0x04 |
アクティブなコンポーネントのリクエスト |
0x05 |
アクティブなコンポーネントのレスポンス |
0x06 |
(非推奨)機能 |
0x07 |
プラットフォーム タイプ |
0x08 |
ファームウェアのバージョン |
0x09 |
現在の FHN エフェメラル ID |
0x0B |
モデル ID
モデル ID 情報(AccountKey の遡及書き込み用)は、RFCOMM 接続時にシーカーに送信する必要があります。たとえば、0x03010003AABBCC
は次のようになります。
- 0x03: デバイス情報イベント
- 0x01: モデル ID 値
- 0x0003: 追加データ、長さ 3
- 0xAABBCC: 追加データ、モデル ID
BLE アドレス
BLE アドレス情報(AccountKey の遡及書き込み用)が利用可能な場合は、RFCOMM の接続時とアドレスがローテーションされるたびに、シーカーにも送信する必要があります。たとえば、0x03020006AABBCCDDEEFF
は次のようになります。
- 0x03: デバイス情報イベント
- 0x02: BLE アドレス値
- 0x0006: 追加データ、長さ 6
- 0xAABBCCDDEEFF: 追加データ、BLE アドレス
バッテリーの更新
バッテリー通知をサポートしているプロバイダの場合は、RFCOMM 経由でバッテリー情報を送信することもできます。RFCOMM が接続されたときや、バッテリーの値が変更されたときに、更新を送信する必要があります。BLE 経由でバッテリー データをアドバタイズする場合、パケットの追加データ セクションには、バイト s + 2、s + 3、s + 4 と同じデータが含まれている必要があります。たとえば、0x0303000357417F
は次のようになります。
- 0x03: デバイス情報イベント
- 0x03: バッテリーの値
- 0x0003: 追加データ、長さ 3
- 0x57417F: 追加データ、バッテリー値
- 0x57: 左イヤフォンの値、充電中ではない、バッテリー残量 87%
- 0x41: 右イヤフォンの値、充電していません、バッテリー残量 65%
- 0x7F: ケースの値、充電していません、バッテリー不明
プロバイダは、残りのバッテリー残量(既知の場合)を更新することもできます。たとえば、0x03040001F0
は次のようになります。
- 0x03: デバイス情報イベント
- 0x04: バッテリー残量
- 0x0001: 追加データ、長さ 1(必要に応じて uint16 の場合は 2 にできます)。
- 0xF0: 追加データ、バッテリーの残り時間(分)、240 分
アクティブなコンポーネント
検索者は、現在アクティブなコンポーネント(つまり、操作できるコンポーネント)を知りたい場合があります(デバイスの操作を参照)。プロバイダがアクティブ コンポーネント リクエスト コード(0x05)を含むリクエストを受信した場合は、プロバイダの現在の状態を示すレスポンスを 1 秒以内に返す必要があります。レスポンスには、アクティブなコンポーネント レスポンス コード(0x06)が使用され、使用可能なコンポーネントを示す追加データが含まれます。
コンポーネントが 1 つのプロバイダの場合、追加データが使用できない場合は 0x00 に設定する必要があります。たとえば、メディアの再生が行われない低電力モードなどです。それ以外の場合は、追加データを 0x01 に設定する必要があります。
複数のコンポーネント(左右のイヤホンなど)を備えたヘッドセットの場合、追加データの各ビットは、そのコンポーネントがアクティブかどうかを表します。非アクティブなコンポーネントの例としては、ケースに収納されていて使用されていないイヤホンがあります。特に左右のイヤホン ケースの場合:
- 0x00(0b00000000): どちらのイヤホンもアクティブではない
- 0x01(0b00000001): 右のイヤホンが有効、左のイヤホンが無効
- 0x02(0b00000010): 左のイヤフォンが有効、右のイヤフォンが無効
- 0x03(0b00000011): 両方のイヤホンがアクティブ
プロバイダは、接続されているプラットフォームに応じて異なる動作を希望する場合があります。現在、ファストペアは Android でのみ実行されますが、今後サポートが拡大される可能性があります。
メッセージには、追加データ内のプラットフォーム タイプを識別する最初のバイトが含まれます。
2 番目のバイトはプラットフォームごとにカスタマイズされます。Android では、SDK バージョンを参照します。たとえば、Android Pie の値は 28(0x1C)です。
ファームウェアのバージョン
プロバイダのファームウェア バージョン(UTF-8 エンコードの文字列)。これは、ファームウェア リビジョン特性と同じ情報です。
現在の FHN エフェメラル ID
FHN フレームをアドバタイズするプロバイダは、現在の FHN エフェメラル ID(EID)と現在のクロック値を報告して、バッテリー切れなどのクロック ドリフトが発生した場合にシーカーと同期する必要があります。
次に例を示します。
- 0x03: デバイス情報イベント
- 0x0B: 現在の FHN エフェメラル ID メッセージ
- 0x0018: 追加データ(長さ 24 バイトまたは 36 バイト)
- 0x13F9EA80: 追加データ(クロック値、4 バイト)
- 0x1122334455667788990011223344556677889900: 追加データ(現在の EID、20 バイトまたは 32 バイト)
特に記載のない限り、このページのコンテンツはクリエイティブ・コモンズの表示 4.0 ライセンスにより使用許諾されます。コードサンプルは Apache 2.0 ライセンスにより使用許諾されます。詳しくは、Google Developers サイトのポリシーをご覧ください。Java は Oracle および関連会社の登録商標です。
最終更新日 2025-08-13 UTC。
[null,null,["最終更新日 2025-08-13 UTC。"],[[["\u003cp\u003eProviders can notify a Seeker about device information like Model ID, BLE address, battery status, and active components using a dedicated message stream.\u003c/p\u003e\n"],["\u003cp\u003eDevice information is communicated using specific event codes and additional data formats, allowing Seekers to understand the Provider's state.\u003c/p\u003e\n"],["\u003cp\u003eProviders can share details like platform type and firmware version for compatibility checks and tailored interactions.\u003c/p\u003e\n"],["\u003cp\u003eBattery information can be communicated using the Battery Updated event and include details such as battery level, charging status, and remaining time.\u003c/p\u003e\n"],["\u003cp\u003eActive components information helps Seekers to understand which device functionalities are available at the given time.\u003c/p\u003e\n"]]],[],null,["Device information\n------------------\n\nProviders can notify a Seeker about device information via the\n[message stream](#MessageStream).\n\n| Message Group Name | Value |\n|--------------------------|-------|\n| Device information event | 0x03 |\n\n| Device Information Code Name | Value |\n|----------------------------------|-------|\n| Model ID | 0x01 |\n| BLE address updated | 0x02 |\n| Battery updated | 0x03 |\n| Remaining battery time | 0x04 |\n| Active components request | 0x05 |\n| Active components response | 0x06 |\n| (Deprecated)Capabilities | 0x07 |\n| Platform type | 0x08 |\n| Firmware version | 0x09 |\n| Current FHN ephemeral identifier | 0x0B |\n\n### Model ID\n\nModel ID information (for\n[Retroactively Writing AccountKey](/nearby/fast-pair/specifications/extensions/retroactiveacctkey#RetroactivelyWritingAccountKey \"Retroactively Writing Account key\")) should be\nsent to the Seeker when RFCOMM connects. For example, `0x03010003AABBCC`\nwould be:\n\n- 0x03: Device information event\n- 0x01: Model ID value\n- 0x0003: Additional data, length 3\n- 0xAABBCC: Additional data, model ID\n\n### BLE address\n\nBLE address information (for\n[Retroactively Writing AccountKey](/nearby/fast-pair/specifications/extensions/retroactiveacctkey#RetroactivelyWritingAccountKey \"Retroactively Writing Account key\")) , if\navailable, should also be sent to the Seeker when RFCOMM connects and whenever\nthe address is rotated. For example, `0x03020006AABBCCDDEEFF` would be:\n\n- 0x03: Device information event\n- 0x02: BLE address value\n- 0x0006: Additional data, length 6\n- 0xAABBCCDDEEFF: Additional data, BLE address\n\n### Battery updated\n\nFor Providers that support [battery notifications](/nearby/fast-pair/specifications/extensions/batterynotification#BatteryNotification \"Battery Notification\"),\nbattery information can also be sent via RFCOMM. When RFCOMM connects or the\nbattery value changes, an update should be sent. The additional data section of\nthe packet should contain identical data to bytes *s + 2* , *s + 3* , *s + 4* when\nadvertising battery data over BLE. For example,`0x0303000357417F` would be:\n\n- 0x03: Device information event\n- 0x03: Battery value\n- 0x0003: Additional data, length 3\n- 0x57417F: Additional data, battery values\n - 0x57: Left bud value, not charging, 87% battery\n - 0x41: Right bud value, not charging, 65% battery\n - 0x7F: Case value, not charging, unknown battery\n\nProviders can also update remaining battery time (if known), For example,\n`0x03040001F0` would be:\n\n- 0x03: Device information event\n- 0x04: Remaining battery time\n- 0x0001: Additional data, length 1 (could be 2 for uint16 if needed.)\n- 0xF0: Additional data, remaining battery time in minutes, 240 minutes\n\n### Active components\n\nSeekers may sometimes desire to know which components are currently active,\nmeaning that an action can be taken on them (see [Device actions](/nearby/fast-pair/specifications/extensions/deviceaction#DeviceAction \"Message Stream: Device Actions\")).\nWhen the Provider receives a request containing the\n*active components request* code (0x05), a response should be returned within 1\nsecond indicating the Provider's current state. The response will use the\n*active components response* code (0x06) and contain additional data indicating\nwhich components are available.\n\nFor a Provider with a single component, the additional data should be set to\n0x00 if it is not available. An example of this might be a low power mode where\nmedia playback will not be performed. Otherwise, additional data should be set\nto 0x01.\n\nFor headsets with multiple components (for example, a left and right bud), each\nbit in the additional data represents whether that component is active. An\nexample of an inactive component might be a bud which is in the case and not in\nuse. Specifically for the left and right bud case:\n\n- 0x00 (0b00000000): Neither bud active\n- 0x01 (0b00000001): Right bud active, left inactive\n- 0x02 (0b00000010): Left bud active, right inactive\n- 0x03 (0b00000011): Both buds active\n\n### Platform Type\n\nProviders may want to perform differently based on the platform that they are\nconnected to. Fast Pair is currently only performed through Android, but support\nmay be expanded in the future.\n\nThe message will contain a first byte identifying platform type in the\nadditional data:\n\n| Platform Name | Value |\n|---------------|-------|\n| Android | 0x01 |\n\nThe second byte will be customized per platform. In Android, it will refer to the\n[SDK version](https://source.android.com/setup/start/build-numbers). For\nexample, Android Pie will have a value of 28 (0x1C).\n\n### Firmware version\n\nThe provider's firmware version as a string in utf-8 encoding.\nIt's the same information as in the [Firmware revision characteristic](/nearby/fast-pair/specifications/characteristics#FirmwareRevision \"Firmware revision characteristic\").\n\n### Current FHN Ephemeral Identifier\n\nProviders that advertise FHN frames should report the current FHN Ephemeral\nIdentifier (EID) with their current clock value to sync with the Seeker in case\nof a clock drift (for example, due to drained battery).\n\nFor example:\n\n- 0x03: Device information event\n- 0x0B: Current FHN ephemeral identifier message\n- 0x0018: Additional data, length 24 or 36 bytes\n- 0x13F9EA80: Additional data (clock value; 4 bytes)\n- 0x1122334455667788990011223344556677889900: Additional data (current EID; 20 or 32 bytes)"]]