メッセージ ストリーム
コレクションでコンテンツを整理
必要に応じて、コンテンツの保存と分類を行います。
ファスト ペアリングでは、ファスト ペアリング拡張機能をサポートするために、プロバイダとの永続的な接続用の追加チャネルが必要です。プロバイダがサポートされているシーカーに接続すると、シーカーはメッセージ ストリームへの接続を試みます。
サポートされる実装
Fast Pair は、次の 2 種類のメッセージ ストリームの実装をサポートしています。
RFCOMM
固定 UUID をエンドポイントとして使用します。df21fe2c-2515-4fdb-8886-f12c4d67927c
L2CAP
GATT の PSM 特性を使用して、L2CAP 接続の PSM 値を取得します。
接続すると、次の形式でメッセージを交換できます。
Octet |
データ型 |
説明 |
必須か |
0 |
uint8 |
メッセージ グループ |
必須 |
1 |
uint8 |
メッセージ コード |
必須 |
2 ~ 3 |
uint16 |
追加データ長 |
必須 |
4 ~ n |
|
追加データ |
省略可 |
追加データの長さと追加データ フィールドはビッグエンディアンである必要があります。
特に記載のない限り、このページのコンテンツはクリエイティブ・コモンズの表示 4.0 ライセンスにより使用許諾されます。コードサンプルは Apache 2.0 ライセンスにより使用許諾されます。詳しくは、Google Developers サイトのポリシーをご覧ください。Java は Oracle および関連会社の登録商標です。
最終更新日 2025-08-13 UTC。
[null,null,["最終更新日 2025-08-13 UTC。"],[[["\u003cp\u003eFast Pair utilizes a persistent connection with Providers via an additional channel to enable Fast Pair extensions.\u003c/p\u003e\n"],["\u003cp\u003eTwo message stream implementations are supported: RFCOMM using a fixed UUID and L2CAP using GATT PSM Characteristic for connection.\u003c/p\u003e\n"],["\u003cp\u003eExchanged messages adhere to a specific format containing message group, message code, additional data length, and optional additional data.\u003c/p\u003e\n"],["\u003cp\u003eData length and additional data fields within messages are represented in big endian format.\u003c/p\u003e\n"]]],[],null,["# Message Stream\n\nFast Pair requires an additional channel for a persistent connection with the\nProviders to support Fast Pair extensions. When the Provider connects to a\nsupported Seeker, the Seeker will attempt to connect the message stream.\n\nSupported Implementation\n------------------------\n\nFast Pair supports two kinds of message stream implementations:\n\n### RFCOMM\n\nUse fixed UUID as the endpoint\n`df21fe2c-2515-4fdb-8886-f12c4d67927c`\n\n### L2CAP\n\nUse GATT [PSM Characteristic](/nearby/fast-pair/specifications/bledevice#message_stream_PSM \"message stream_PSM\") to obtain the PSM value for L2CAP connection.\n\nMessage Format\n--------------\n\nOnce connected, messages can be exchanged in the following format:\n\n| Octet | Data Type | Description | Mandatory? |\n|-------|-----------|------------------------|------------|\n| 0 | uint8 | Message group | Mandatory |\n| 1 | uint8 | Message code | Mandatory |\n| 2 - 3 | uint16 | Additional data length | Mandatory |\n| 4 - n | | Additional data | Optional |\n\nThe additional data length and additional data fields should be big endian."]]