訊息串流
快速配對功能需要額外的管道,才能與供應商建立持續連線,以支援快速配對擴充功能。當提供者連線至支援的 Seeker 時,Seeker 會嘗試連線訊息串流。
支援的導入方式
Fast Pair 支援兩種訊息串流實作方式:
射頻接觸
使用固定 UUID 做為端點
df21fe2c-2515-4fdb-8886-f12c4d67927c
L2CAP
使用 GATT PSM 特性取得 L2CAP 連線的 PSM 值。
連線後,您可以使用以下格式交換訊息:
Octet |
資料類型 |
說明 |
是否必要? |
0 |
uint8 |
訊息群組 |
必填 |
1 |
uint8 |
訊息代碼 |
必填 |
2 到 3 |
uint16 |
額外資料長度 |
必填 |
4 - n |
|
額外資料 |
選用 |
其他資料長度和其他資料欄位應為大端序。
除非另有註明,否則本頁面中的內容是採用創用 CC 姓名標示 4.0 授權,程式碼範例則為阿帕契 2.0 授權。詳情請參閱《Google Developers 網站政策》。Java 是 Oracle 和/或其關聯企業的註冊商標。
上次更新時間:2024-11-08 (世界標準時間)。
[null,null,["上次更新時間:2024-11-08 (世界標準時間)。"],[[["Fast Pair utilizes a persistent connection with Providers via an additional channel to enable Fast Pair extensions."],["Two message stream implementations are supported: RFCOMM using a fixed UUID and L2CAP using GATT PSM Characteristic for connection."],["Exchanged messages adhere to a specific format containing message group, message code, additional data length, and optional additional data."],["Data length and additional data fields within messages are represented in big endian format."]]],[]]