fuchsia.hardware.bluetooth

用於與藍牙供應商和傳輸驅動程式互動的 API。

新增:23

通訊協定

模擬器

定義於 fuchsia.hardware.bluetooth/emulator.fidl

用於模擬支援標準藍牙 HCI 的藍牙控制器。代表 bt-emulator 裝置通訊協定。bt-emulator 裝置用於設定及發布假 bt-hci 裝置。

AddBredrPeer

插入新的 BR/EDR 對等互連裝置,由這個控制器模擬。註冊後,您可以使用 peer 控制代碼驅動及觀察假對等點的狀態。

系統會傳送回覆,確認已建立假對等互連。如果無法初始化對等點 (例如 parameters 缺少必要欄位,或包含已模擬的位址),系統會關閉 peer 控制代碼,並傳送錯誤回覆。

只要 peer 管道開啟,對等互連就會顯示在查詢結果中,並根據其設定回應要求。當管道關閉時,模擬器會停止模擬這個對等互連,使其無法再被偵測到,也不會回應任何要求。

要求

名稱類型
payload PeerParameters

回應

名稱類型
payload Emulator_AddBredrPeer_Result

AddLowEnergyPeer

插入新的 LE 對等互連裝置,由這個控制器模擬。註冊後,您可以使用 peer 控制代碼驅動及觀察假對等點的狀態。

系統會傳送回覆,確認已建立假對等互連。如果無法初始化對等點 (例如 parameters 缺少必要欄位,或包含已模擬的位址),系統會關閉 peer 控制代碼,並傳送錯誤回覆。

只要 peer 管道保持開啟,對等節點就會顯示在廣告報表中,並根據其設定回應請求。當管道關閉時,模擬器會停止模擬這個對等互連,使其無法再被偵測到,也不會回應任何要求。

要求

名稱類型
payload PeerParameters

回應

名稱類型
payload Emulator_AddLowEnergyPeer_Result

發布

使用提供的 settings 發布 bt-hci 裝置。每個模擬器執行個體只能管理一個 bt-hci 裝置。如果裝置已發布,則傳回 Emulator.HCI_ALREADY_PUBLISHED。

要求

名稱類型
payload EmulatorSettings

回應

名稱類型
payload Emulator_Publish_Result

WatchControllerParameters

控制器參數狀態的掛起 get 模式,在狀態與上次回應不同之前不會解析。

要求

<EMPTY>

回應

名稱類型
payload Emulator_WatchControllerParameters_Result

WatchLeScanStates

傳回連結層 LE 掃描程序從最早到最新狀態的向量。如果自用戶端上次叫用這個方法以來,至少發生一次狀態變更,這個方法就會傳回。

在指定時間內,這個方法可以多次呼叫。只要掃描狀態有變更,所有呼叫都會立即傳回回應。

要求

<EMPTY>

回應

名稱類型
payload Emulator_WatchLeScanStates_Result

WatchLegacyAdvertisingStates

傳回連結層 LE 舊版廣告程序的狀態向量,從最早到最新。如果自用戶端上次叫用這個方法以來,至少發生一次狀態變更,這個方法就會傳回。

在指定時間內,這個方法可以多次呼叫。只要掃描狀態有變更,所有呼叫都會立即傳回回應。

要求

<EMPTY>

回應

名稱類型
payload Emulator_WatchLegacyAdvertisingStates_Result

Hci

定義於 fuchsia.hardware.bluetooth/hci.fidl

已移除:NEXT

ConfigureSco

使用指定參數設定 SCO 連線的 HCI。在 SCO 管道上傳送/接收資料前,必須先呼叫這個方法。如果目前的供應商或傳輸驅動程式庫不支援 SCO,則傳回 ZX_ERR_NOT_SUPPORTED。

要求

名稱類型
coding_format ScoCodingFormat
encoding ScoEncoding
sample_rate ScoSampleRate

回應

名稱類型
payload Hci_ConfigureSco_Result

OpenAclDataChannel

開啟雙向 HCI ACL 資料管道。如果管道已開啟,則傳回 ZX_ERR_ALREADY_BOUND。

要求

名稱類型
channel handle<channel>

回應

名稱類型
payload Hci_OpenAclDataChannel_Result

OpenCommandChannel

開啟雙向 HCI 指令管道,用於傳送 HCI 指令和接收事件封包。如果管道已開啟,則傳回 ZX_ERR_ALREADY_BOUND。

要求

名稱類型
channel handle<channel>

回應

名稱類型
payload Hci_OpenCommandChannel_Result

OpenIsoDataChannel

在提供的控制代碼上開啟管道,用於傳送及接收等時資料封包。如果開啟 hci 管道時發生錯誤,或 hci 管道已與另一個 zircon 管道的控制代碼建立關聯,系統就會關閉 zircon 管道。如果目前的供應商或傳輸驅動程式庫不支援 ISO,則會傳回 ZX_ERR_NOT_SUPPORTED。如果管道已開啟,則傳回 ZX_ERR_ALREADY_BOUND。

要求

名稱類型
channel handle<channel>

回應

名稱類型
payload Hci_OpenIsoDataChannel_Result

OpenScoDataChannel

在提供的控點上開啟 SCO 管道。如果開啟 hci 管道時發生錯誤,或 hci 管道已與另一個 zircon 管道的控制代碼建立關聯,系統就會關閉 zircon 管道。如果目前的供應商或傳輸驅動程式庫不支援 SCO,則傳回 ZX_ERR_NOT_SUPPORTED。如果管道已開啟,則傳回 ZX_ERR_ALREADY_BOUND。

要求

名稱類型
channel handle<channel>

回應

名稱類型
payload Hci_OpenScoDataChannel_Result

OpenSnoopChannel

開啟僅限輸出的管道,監控 HCI 流量。每則訊息的格式為:[1-octet flags] [n-octet payload] 旗標八位元組是位元欄位,定義的值如下:

  • 0x00:酬載代表從主機傳送至控制器的指令封包。
  • 0x01:酬載代表控制器傳送的事件封包。如果管道已開啟,則傳回 ZX_ERR_ALREADY_BOUND。

要求

名稱類型
channel handle<channel>

回應

名稱類型
payload Hci_OpenSnoopChannel_Result

ResetSco

釋出有效 SCO 連線保留的資源。SCO 連線關閉時,必須呼叫這個方法。如果目前的供應商或傳輸驅動程式庫不支援 SCO,則傳回 ZX_ERR_NOT_SUPPORTED。

要求

<EMPTY>

回應

名稱類型
payload Hci_ResetSco_Result

HciTransport

定義於 fuchsia.hardware.bluetooth/hci.fidl

AckReceive

要求

<EMPTY>

ConfigureSco

建立 SCO 連線。一次只能設定 1 個 SCO 連線。

要求

名稱類型
payload HciTransportConfigureScoRequest

OnReceive

在收到確認之前,可以傳送多個封包事件。每個封包都必須以 AckReceive 確認。伺服器應限制待處理確認訊息的數量,以免管道溢位。建議最多 10 個未確認封包。如果用戶端收到指令或 SCO 封包,應關閉通訊協定。

回應

名稱類型
payload ReceivedPacket

傳送

可以同時有多筆待處理的傳送作業。建議限制待處理呼叫的數量,以免溢位。建議最多保留 10 個待處理通話。 如果伺服器收到事件或 SCO 封包,應關閉通訊協定。

要求

名稱類型
payload SentPacket

回應

名稱類型
payload HciTransport_Send_Result

對等節點

定義於 fuchsia.hardware.bluetooth/emulator.fidl

用於驅動假對等互連裝置狀態的通訊協定。

AssignConnectionStatus

指派控制器產生的 HCI status,以回應連線要求。適用於所有後續的 HCI_Create_Connection 和 HCI_LE_Create_Connection 指令。程序會以空白回應確認。

要求

名稱類型
status HciError

回應

名稱類型
payload Peer_AssignConnectionStatus_Result

EmulateDisconnectionComplete

模擬連線中斷。如果對等互連未連線,則不會執行任何操作。

要求

<EMPTY>

EmulateLeConnectionComplete

模擬 LE 連線事件。如果對等互連已連線,則不會執行任何操作。role 參數會決定連結層連線角色。

要求

名稱類型
role fuchsia.bluetooth/ConnectionRole

SetDeviceClass

設定裝置探索期間,這個對等互連裝置在查詢回應中回報的裝置類別。如果對等互連不是 BR/EDR,伺服器會關閉並顯示 ZX_ERR_NOT_SUPPORTED 墓誌銘。

要求

名稱類型
value uint32

回應

名稱類型
payload Peer_SetDeviceClass_Result

SetLeAdvertisement

要求

名稱類型
payload PeerSetLeAdvertisementRequest

回應

名稱類型
payload Peer_SetLeAdvertisement_Result

SetServiceDefinitions

設定可透過服務探索通訊協定探索的對等互連服務。如果對等點不是 BR/EDR,伺服器會關閉並顯示 ZX_ERR_NOT_SUPPORTED 墓誌銘。

要求

名稱類型
service_definitions vector<fuchsia.bluetooth.bredr/ServiceDefinition>:32

回應

名稱類型
payload Peer_SetServiceDefinitions_Result

WatchConnectionStates

傳回向量,包含從最早到最近的控制器連線狀態。如果自用戶端上次叫用這個方法後,狀態有所變更,這個方法就會傳回。

在指定時間內,這個方法可以多次呼叫。只要掃描狀態有變更,所有呼叫都會立即傳回回應。

要求

<EMPTY>

回應

名稱類型
payload Peer_WatchConnectionStates_Result

ScoConnection

定義於 fuchsia.hardware.bluetooth/hci.fidl

AckReceive

要求

<EMPTY>

OnReceive

在收到確認之前,可以傳送多個封包事件。每個封包都必須以 AckReceive 確認。伺服器應限制待處理確認訊息的數量,以免管道溢位。建議最多 10 個未確認封包。

回應

名稱類型
packet vector<uint8>:258

傳送

可以同時有多筆待處理的傳送作業。建議限制待處理呼叫的數量,以免溢位。建議最多保留 10 個待處理通話。

要求

名稱類型
packet vector<uint8>:258

回應

名稱類型
payload ScoConnection_Send_Result

停止

伺服器收到 Stop 時,會關閉通訊協定。這項功能適用於同步處理 (例如設定其他 ScoConnection 之前)。

要求

<EMPTY>

窺探

定義於 fuchsia.hardware.bluetooth/hci.fidl

AcknowledgePackets

已收到確認封包,最多 sequence 個。

要求

名稱類型
sequence uint64

OnDroppedPackets

如果自上次 OnObservePacket 後有封包遺失,伺服器會在收到 AcknowledgePackets 後傳送一次。

回應

名稱類型
payload SnoopOnDroppedPacketsRequest

OnObservePacket

封包已傳輸/接收。在伺服器停止運作前,可以觀察到一些封包。如果用戶端確認封包的時間過長,伺服器可以捨棄封包。

回應

名稱類型
payload SnoopOnObservePacketRequest

供應商

定義於 fuchsia.hardware.bluetooth/vendor.fidl

BtVendor 通訊協定可由供應商驅動程式實作,以支援功能查詢和供應商指令編碼。

EncodeCommand

編碼供應商 HCI 指令,並傳回編碼指令。如要查看可能的指令和參數,請參閱 VendorCommand。

  • 錯誤 ZX_ERR_NOT_SUPPORTED:不支援這個指令。
  • 錯誤 ZX_ERR_INVALID_ARGS:指令參數無效。

要求

名稱類型
payload VendorCommand

回應

名稱類型
payload Vendor_EncodeCommand_Result

GetCrashParameters

傳回 bt-snoop 用於記錄及歸檔藍牙控制器當機報告的參數。核心 dump 事件會從 snoop 記錄中遮蓋。 如果這個供應商不支援當機 dump 檔,則會傳回 NOT_SUPPORTED。

新增:31

要求

<EMPTY>

回應

名稱類型
payload Vendor_GetCrashParameters_Result

GetFeatures

傳回這個控制器支援的供應商功能。

要求

<EMPTY>

回應

名稱類型
payload Vendor_GetFeatures_Result

OpenHci

不再支援 - 請改用 OpenHciTransport() 開啟控制器的 HCI 通訊協定。在控制器初始化完成前,這項呼叫可能會遭到封鎖。如果已有其他用戶端連線,則傳回 ALREADY_BOUND。

已移除:NEXT

要求

<EMPTY>

回應

名稱類型
payload Vendor_OpenHci_Result

OpenHciTransport

開啟控制器的 HciTransport 通訊協定。在控制器初始化完成前,這項呼叫可能會遭到封鎖。如果已有其他用戶端連線,則傳回 ALREADY_BOUND。

要求

<EMPTY>

回應

名稱類型
payload Vendor_OpenHciTransport_Result

OpenSnoop

開啟傳輸驅動程式庫的 Snoop 通訊協定。如果已有其他用戶端連線,則傳回 ALREADY_BOUND。

要求

<EMPTY>

回應

名稱類型
payload Vendor_OpenSnoop_Result

VirtualController

定義於 fuchsia.hardware.bluetooth/virtual.fidl

用於產生虛擬藍牙裝置。

CreateEmulator

建立子裝置,並傳回建立的子裝置名稱。

要求

<EMPTY>

回應

名稱類型
payload VirtualController_CreateEmulator_Result

CreateLoopbackDevice

建立虛擬藍牙序列裝置,在提供的控制代碼上使用 BT HCI UART 通訊協定。發生錯誤時,Zircon 管道會關閉。

要求

名稱類型
payload VirtualControllerCreateLoopbackDeviceRequest

STRUCTS

Emulator_AddBredrPeer_Response

定義於 fuchsia.hardware.bluetooth/emulator.fidl

<EMPTY>

Emulator_AddLowEnergyPeer_Response

定義於 fuchsia.hardware.bluetooth/emulator.fidl

<EMPTY>

Emulator_Publish_Response

定義於 fuchsia.hardware.bluetooth/emulator.fidl

<EMPTY>

Emulator_WatchLeScanStates_Response

定義於 fuchsia.hardware.bluetooth/emulator.fidl

欄位類型說明預設
states vector<LeScanState> 無預設值

Emulator_WatchLegacyAdvertisingStates_Response

定義於 fuchsia.hardware.bluetooth/emulator.fidl

欄位類型說明預設
states vector<LegacyAdvertisingState> 無預設值

HciTransport_Send_Response

定義於 fuchsia.hardware.bluetooth/hci.fidl

<EMPTY>

Hci_ConfigureSco_Response

定義於 fuchsia.hardware.bluetooth/hci.fidl

<EMPTY>

Hci_OpenAclDataChannel_Response

定義於 fuchsia.hardware.bluetooth/hci.fidl

<EMPTY>

Hci_OpenCommandChannel_Response

定義於 fuchsia.hardware.bluetooth/hci.fidl

<EMPTY>

Hci_OpenIsoDataChannel_Response

定義於 fuchsia.hardware.bluetooth/hci.fidl

<EMPTY>

Hci_OpenScoDataChannel_Response

定義於 fuchsia.hardware.bluetooth/hci.fidl

<EMPTY>

Hci_OpenSnoopChannel_Response

定義於 fuchsia.hardware.bluetooth/hci.fidl

<EMPTY>

Hci_ResetSco_Response

定義於 fuchsia.hardware.bluetooth/hci.fidl

<EMPTY>

Peer_AssignConnectionStatus_Response

定義於 fuchsia.hardware.bluetooth/emulator.fidl

<EMPTY>

Peer_SetDeviceClass_Response

定義於 fuchsia.hardware.bluetooth/emulator.fidl

<EMPTY>

Peer_SetLeAdvertisement_Response

定義於 fuchsia.hardware.bluetooth/emulator.fidl

<EMPTY>

Peer_SetServiceDefinitions_Response

定義於 fuchsia.hardware.bluetooth/emulator.fidl

<EMPTY>

Peer_WatchConnectionStates_Response

定義於 fuchsia.hardware.bluetooth/emulator.fidl

欄位類型說明預設
states vector<ConnectionState> 無預設值

ScoConnection_Send_Response

定義於 fuchsia.hardware.bluetooth/hci.fidl

<EMPTY>

ScoPacket

定義於 fuchsia.hardware.bluetooth/hci.fidl

欄位類型說明預設
packet vector<uint8>:258 無預設值

Vendor_EncodeCommand_Response

定義於 fuchsia.hardware.bluetooth/vendor.fidl

欄位類型說明預設
encoded vector<uint8>:16 無預設值

Vendor_OpenHciTransport_Response 資源

定義於 fuchsia.hardware.bluetooth/vendor.fidl

欄位類型說明預設
channel client_end:HciTransport 無預設值

Vendor_OpenHci_Response 資源

定義於 fuchsia.hardware.bluetooth/vendor.fidl

欄位類型說明預設
channel client_end:Hci 無預設值

Vendor_OpenSnoop_Response 資源

定義於 fuchsia.hardware.bluetooth/vendor.fidl

欄位類型說明預設
channel client_end:Snoop 無預設值

VirtualController_CreateEmulator_Response

定義於 fuchsia.hardware.bluetooth/virtual.fidl

欄位類型說明預設
name string:32? 無預設值

列舉

ConnectionState flexible

類型:uint32

定義於 fuchsia.hardware.bluetooth/emulator.fidl

名稱值說明
1
2

EmulatorError 彈性

類型:uint32

定義於 fuchsia.hardware.bluetooth/emulator.fidl

模擬器層級設定可能產生的錯誤代碼。

名稱值說明
1
2

EmulatorPeerError 彈性

類型:uint32

定義於 fuchsia.hardware.bluetooth/emulator.fidl

針對操控假對等點的函式產生的錯誤代碼。

名稱值說明
1
2
3

HciConfig 彈性

類型:uint32

定義於 fuchsia.hardware.bluetooth/emulator.fidl

預設 HCI 設定。

名稱值說明
1

在 LMP 功能中同時支援 BR/EDR 和 LE。

2

將支援的功能和 HCI 指令限制為僅限 LE 所需的功能和指令。

HciError 彈性

類型:uint8

定義於 fuchsia.hardware.bluetooth/emulator.fidl

定義藍牙控制器可回報的 HCI 通訊協定錯誤代碼清單。這些值取自 Bluetooth Core Specification v5.4, Vol 2, Part D, Section 1.3

名稱值說明
0
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71

LegacyAdvertisingType strict

類型:uint8

定義於 fuchsia.hardware.bluetooth/emulator.fidl

Bluetooth Core Specification v5.4, Vol 4, Part E, 7.8.5 的 LE 舊版廣告類型。

名稱值說明
0

可連線及掃描。

1

可連線、高工作週期、定向。

2

可掃描、無方向性。

3

不可連線、無導向

4

掃描回覆

PacketDirection strict

類型:uint32

定義於 fuchsia.hardware.bluetooth/hci.fidl

名稱值說明
1
2

ScoCodingFormat 彈性

類型:uint8

定義於 fuchsia.hardware.bluetooth/hci.fidl

名稱值說明
1
2

彈性

類型:uint8

定義於 fuchsia.hardware.bluetooth/hci.fidl

名稱值說明
1
2

ScoSampleRate 彈性

類型:uint8

定義於 fuchsia.hardware.bluetooth/hci.fidl

名稱值說明
1
2

VendorAclDirection 彈性

類型:uint8

定義於 fuchsia.hardware.bluetooth/vendor.fidl

名稱值說明
1
2

VendorAclPriority 彈性

類型:uint8

定義於 fuchsia.hardware.bluetooth/vendor.fidl

名稱值說明
1
2

TABLES

AclBufferSettings

定義於 fuchsia.hardware.bluetooth/emulator.fidl

HCI ACL 資料流量控制參數。

序數欄位類型說明
data_packet_length uint16

ACL 框架 MTU (以位元組為單位)。

total_num_data_packets uint8

控制器可緩衝的 ACL 框架數量上限。

AdvertisingData

定義於 fuchsia.hardware.bluetooth/emulator.fidl

序數欄位類型說明
data vector<uint8>:31

AndroidVendorSupport

定義於 fuchsia.hardware.bluetooth/vendor.fidl

表示支援 Android 供應商擴充功能。 如果空白,則表示支援 Android HCI 擴充功能,但未指定版本。應使用 LE Get Vendor Capabilities 指令偵測版本。

序數欄位類型說明
major_version uint8
minor_version uint8

AudioOffloadSettings

定義於 fuchsia.hardware.bluetooth/vendor.fidl

音訊卸載資料路徑的各種設定,因控制器製造商和韌體版本而異。

新增:28

序數欄位類型說明
sco_offload_index uint8

要求 SCO OFFLOAD DataPath 時要使用的索引。

ControllerParameters

定義於 fuchsia.hardware.bluetooth/emulator.fidl

包含藍牙控制器和基頻參數,可由主機寫入,但不屬於特定程序類別 (如下方定義)。

序數欄位類型說明
local_name string:248

用於連結層名稱探索程序的本機名稱。這個參數僅適用於 BR/EDR 傳輸。在 LE 中,本機名稱會以廣告參數的形式提供,並透過 GATT 提供。

device_class fuchsia.bluetooth/DeviceClass

BR/EDR 查詢程序期間使用的本機「裝置類別」。

EmulatorSettings

定義於 fuchsia.hardware.bluetooth/emulator.fidl

模擬器使用的控制器設定。

序數欄位類型說明
address fuchsia.bluetooth/Address

BD_ADDR (BR/EDR) 或 LE 公開裝置位址。預設值為「00:00:00:00:00:00」。

hci_config HciConfig

支援的 HCI 指令設定。預設為「DUAL_MODE」。

extended_advertising bool

如果支援 5.0 擴充廣告功能,則為 True。預設為「false」。

acl_buffer_settings AclBufferSettings

ACL-U 資料緩衝區設定。如果 hci_config 設為 DUAL_MODE,預設值為 data_packet_length: 1024、total_num_data_packets: 5。否則預設為空值。

le_acl_buffer_settings AclBufferSettings

LE-U ACL 資料緩衝區設定。預設值: data_packet_length: 251 total_num_data_packets: 5

資源:HciTransportConfigureScoRequest

定義於 fuchsia.hardware.bluetooth/hci.fidl

序數欄位類型說明
coding_format ScoCodingFormat

必填。

encoding ScoEncoding

必填。

sample_rate ScoSampleRate

必填。

connection server_end:ScoConnection

必填。

LeScanState

定義於 fuchsia.hardware.bluetooth/emulator.fidl

代表 LE 掃描狀態。如果已設定掃描參數,就會顯示這些欄位。

序數欄位類型說明
enabled bool

如果已啟用掃描,則為「是」。

active bool

如果已啟用主動掃描,則為「是」。否則掃描會是被動的。

interval uint16

掃描間隔和視窗參數。這些值是以藍牙控制器「時間片段」定義,其中 1 個片段 = 0.625 毫秒。有效值範圍為 0x4 (2.5 毫秒) 至 0x4000 (10.24 毫秒)。

window uint16
filter_duplicates bool

如果已啟用重複篩選功能,則為 True。

address_type fuchsia.bluetooth/AddressType

使用的本機裝置位址類型。

LegacyAdvertisingState

定義於 fuchsia.hardware.bluetooth/emulator.fidl

舊版廣告的控制器參數。

序數欄位類型說明
enabled bool

如果已使用 HCI_LE_Set_Advertising_Enable 指令啟用廣告,則為 True。這個欄位一律會顯示。

type LegacyAdvertisingType

最近設定的 advertising 類型。這個欄位一律會顯示。預設為 fuchsia.hardware.bluetooth/LegacyAdvertisingType.ADV_IND。

address_type fuchsia.bluetooth/AddressType

用於廣告的 LE 位址類型。這個欄位一律會顯示。預設為 fuchsia.bluetooth/AddressType.PUBLIC。

interval_min uint16

主機指定的廣告間隔範圍參數。只有在設定後才會顯示。

interval_max uint16
advertising_data AdvertisingData

任何已設定的 advertising 和掃描回應資料。只有在任一欄位不為零時才會顯示。

scan_response AdvertisingData

PeerParameters 資源

定義於 fuchsia.hardware.bluetooth/emulator.fidl

用於模擬對等互連行為的參數,透過 BR/EDR/低功耗傳輸。

序數欄位類型說明
address fuchsia.bluetooth/Address

對等互連的公開 BR/EDR BD_ADDR 位址。這是必填欄位。

connectable bool

如果存在且為 true,對等互連會傳送可連線的廣告,並接受連線要求。如果無法連線,對等互連會忽略連線要求。

channel server_end:Peer

繫結至對等互連通訊協定的管道伺服器端。

PeerSetLeAdvertisementRequest

定義於 fuchsia.hardware.bluetooth/emulator.fidl

序數欄位類型說明
le_address fuchsia.bluetooth/Address

對等點的 LE 位址。

advertisement AdvertisingData

廣告資料內容。如未提供,這個對等互連傳送的廣告資料會是空白。

scan_response AdvertisingData

掃描回應資料內容。如果存在,假控制器會產生可掃描的廣告封包和掃描回應事件。

SnoopOnDroppedPacketsRequest

定義於 fuchsia.hardware.bluetooth/hci.fidl

序數欄位類型說明
sent uint32
received uint32

SnoopOnObservePacketRequest

定義於 fuchsia.hardware.bluetooth/hci.fidl

序數欄位類型說明
sequence uint64

單調遞增的封包數量。與 OnAcknowledgePackets 搭配使用,用於流量控制。

direction PacketDirection
packet SnoopPacket

VendorCrashParameters

定義於 fuchsia.hardware.bluetooth/vendor.fidl

提交控制器當機報告的參數。

新增:31

序數欄位類型說明
crash_events vector<VendorCrashEventPrefix>

要比對的供應商事件酬載前置字串。例如子事件代碼。如果前置字元為空白,所有供應商偵錯事件都會視為當機事件。此為必要項目。至少須指定一個前置字串。

program_name string:1024

當機報告中使用的程式名稱。必填。

crash_signature string:128

當機報告中使用的簽章。必須符合 [a-z][a-z-]*,也就是只能使用小寫英文字母和連字號。必填。

VendorFeatures

定義於 fuchsia.hardware.bluetooth/vendor.fidl

供應商支援的功能表。

序數欄位類型說明
acl_priority_command bool

支援 SetAclPriority 指令 如果缺少,則不支援該指令。

android_vendor_extensions AndroidVendorSupport

支援 Android 供應商擴充功能 如果缺少,則不支援 Android 供應商擴充功能。

audio_offload_settings AudioOffloadSettings

指定音訊卸載路徑的其他設定。如果缺少,請使用合理的預設值或設定。

新增:28

VendorSetAclPriorityParams

定義於 fuchsia.hardware.bluetooth/vendor.fidl

序數欄位類型說明
connection_handle uint16

要求優先處理的 ACL 連線控制代碼。

priority VendorAclPriority
direction VendorAclDirection

資料優先順序的方向。部分供應商可能不支援。優先順序為一般時,系統會忽略這個欄位。

VirtualControllerCreateLoopbackDeviceRequest 資源

定義於 fuchsia.hardware.bluetooth/virtual.fidl

序數欄位類型說明
uart_channel handle<channel>

UNIONS

Emulator_AddBredrPeer_Result strict

定義於 fuchsia.hardware.bluetooth/emulator.fidl

序數Variant類型說明
response Emulator_AddBredrPeer_Response
err EmulatorPeerError
framework_err internal

Emulator_AddLowEnergyPeer_Result strict

定義於 fuchsia.hardware.bluetooth/emulator.fidl

序數Variant類型說明
response Emulator_AddLowEnergyPeer_Response
err EmulatorPeerError
framework_err internal

Emulator_Publish_Result strict

定義於 fuchsia.hardware.bluetooth/emulator.fidl

序數Variant類型說明
response Emulator_Publish_Response
err EmulatorError
framework_err internal

Emulator_WatchControllerParameters_Result strict

定義於 fuchsia.hardware.bluetooth/emulator.fidl

序數Variant類型說明
response ControllerParameters
framework_err internal

Emulator_WatchLeScanStates_Result strict

定義於 fuchsia.hardware.bluetooth/emulator.fidl

序數Variant類型說明
response Emulator_WatchLeScanStates_Response
framework_err internal

Emulator_WatchLegacyAdvertisingStates_Result strict

定義於 fuchsia.hardware.bluetooth/emulator.fidl

序數Variant類型說明
response Emulator_WatchLegacyAdvertisingStates_Response
framework_err internal

HciTransport_Send_Result strict

定義於 fuchsia.hardware.bluetooth/hci.fidl

序數Variant類型說明
response HciTransport_Send_Response
framework_err internal

Hci_ConfigureSco_Result strict

定義於 fuchsia.hardware.bluetooth/hci.fidl

序數Variant類型說明
response Hci_ConfigureSco_Response
err zx/Status
framework_err internal

Hci_OpenAclDataChannel_Result strict

定義於 fuchsia.hardware.bluetooth/hci.fidl

序數Variant類型說明
response Hci_OpenAclDataChannel_Response
err zx/Status
framework_err internal

Hci_OpenCommandChannel_Result strict

定義於 fuchsia.hardware.bluetooth/hci.fidl

序數Variant類型說明
response Hci_OpenCommandChannel_Response
err zx/Status
framework_err internal

Hci_OpenIsoDataChannel_Result strict

定義於 fuchsia.hardware.bluetooth/hci.fidl

序數Variant類型說明
response Hci_OpenIsoDataChannel_Response
err zx/Status
framework_err internal

Hci_OpenScoDataChannel_Result strict

定義於 fuchsia.hardware.bluetooth/hci.fidl

序數Variant類型說明
response Hci_OpenScoDataChannel_Response
err zx/Status
framework_err internal

Hci_OpenSnoopChannel_Result strict

定義於 fuchsia.hardware.bluetooth/hci.fidl

序數Variant類型說明
response Hci_OpenSnoopChannel_Response
err zx/Status
framework_err internal

Hci_ResetSco_Result strict

定義於 fuchsia.hardware.bluetooth/hci.fidl

序數Variant類型說明
response Hci_ResetSco_Response
err zx/Status
framework_err internal

Peer_AssignConnectionStatus_Result strict

定義於 fuchsia.hardware.bluetooth/emulator.fidl

序數Variant類型說明
response Peer_AssignConnectionStatus_Response
framework_err internal

Peer_SetDeviceClass_Result strict

定義於 fuchsia.hardware.bluetooth/emulator.fidl

序數Variant類型說明
response Peer_SetDeviceClass_Response
framework_err internal

Peer_SetLeAdvertisement_Result strict

定義於 fuchsia.hardware.bluetooth/emulator.fidl

序數Variant類型說明
response Peer_SetLeAdvertisement_Response
err EmulatorPeerError
framework_err internal

Peer_SetServiceDefinitions_Result strict

定義於 fuchsia.hardware.bluetooth/emulator.fidl

序數Variant類型說明
response Peer_SetServiceDefinitions_Response
framework_err internal

Peer_WatchConnectionStates_Result strict

定義於 fuchsia.hardware.bluetooth/emulator.fidl

序數Variant類型說明
response Peer_WatchConnectionStates_Response
framework_err internal

ReceivedPacket 彈性

定義於 fuchsia.hardware.bluetooth/hci.fidl

主機從控制器收到的封包。

序數Variant類型說明
event vector<uint8>:257
acl vector<uint8>:65539
iso vector<uint8>:16387

ScoConnection_Send_Result strict

定義於 fuchsia.hardware.bluetooth/hci.fidl

序數Variant類型說明
response ScoConnection_Send_Response
framework_err internal

SentPacket 彈性

定義於 fuchsia.hardware.bluetooth/hci.fidl

主機傳送至控制器的封包。

序數Variant類型說明
command vector<uint8>:258
acl vector<uint8>:65539
iso vector<uint8>:16387

SnoopPacket 彈性

定義於 fuchsia.hardware.bluetooth/hci.fidl

序數Variant類型說明
event vector<uint8>:257
command vector<uint8>:258
acl vector<uint8>:65539
sco vector<uint8>:258
iso vector<uint8>:16387

VendorCommand 彈性

定義於 fuchsia.hardware.bluetooth/vendor.fidl

序數Variant類型說明
set_acl_priority VendorSetAclPriorityParams

Vendor_EncodeCommand_Result strict

定義於 fuchsia.hardware.bluetooth/vendor.fidl

序數Variant類型說明
response Vendor_EncodeCommand_Response
err zx/Status
framework_err internal

Vendor_GetCrashParameters_Result strict

定義於 fuchsia.hardware.bluetooth/vendor.fidl

序數Variant類型說明
response VendorCrashParameters
err zx/Status
framework_err internal

Vendor_GetFeatures_Result strict

定義於 fuchsia.hardware.bluetooth/vendor.fidl

序數Variant類型說明
response VendorFeatures
framework_err internal

Vendor_OpenHciTransport_Result strict resource

定義於 fuchsia.hardware.bluetooth/vendor.fidl

序數Variant類型說明
response Vendor_OpenHciTransport_Response
err zx/Status
framework_err internal

Vendor_OpenHci_Result strict resource

定義於 fuchsia.hardware.bluetooth/vendor.fidl

序數Variant類型說明
response Vendor_OpenHci_Response
err zx/Status
framework_err internal

Vendor_OpenSnoop_Result strict resource

定義於 fuchsia.hardware.bluetooth/vendor.fidl

序數Variant類型說明
response Vendor_OpenSnoop_Response
err zx/Status
framework_err internal

VirtualController_CreateEmulator_Result strict

定義於 fuchsia.hardware.bluetooth/virtual.fidl

序數Variant類型說明
response VirtualController_CreateEmulator_Response
err zx/Status
framework_err internal

常數

名稱值類型說明
ACL_PACKET_MAX 65539 uint64
BT_VENDOR_MAX_COMMAND_BUFFER_LEN 16 uint16

編碼指令可能需要的緩衝區長度上限。新增可能需要較大緩衝區的新指令時,請更新這個值。

COMMAND_MAX 258 uint64
EVENT_MAX 257 uint64
ISO_PACKET_MAX 16387 uint64
MAX_LEGACY_ADVERTISING_DATA_LENGTH 31 uint8

舊版 (4.x) 和擴充 (5.x) 廣告 PDU 類型的廣告資料 MTU (請參閱 Core Specification v5.4, Vol 4, Part E, Sections 7.3.11 & 7.8.54)。

MAX_LOCAL_NAME_LENGTH 248 uint8

使用 HCI_Write_Local_Name 指令指派的本機名稱大小上限 (以位元組為單位) (請參閱 Core Specification v5.4, Vol 4, Part E, 7.3.11)。

MAX_NAME_LENGTH 32 uint32
MAX_PEER_SERVICES 32 uint8

一次可公告的服務記錄數量上限。

SCO_PACKET_MAX 258 uint64

別名

名稱值說明
VendorCrashEventPrefix vector[8]
新增:31

服務

EmulatorService

定義於 fuchsia.hardware.bluetooth/emulator.fidl

名稱類型傳輸
device fuchsia.hardware.bluetooth/Emulator 版本

HciService

定義於 fuchsia.hardware.bluetooth/hci.fidl

名稱類型傳輸
hci fuchsia.hardware.bluetooth/Hci 版本
hci_transport fuchsia.hardware.bluetooth/HciTransport 版本
snoop fuchsia.hardware.bluetooth/Snoop 版本

服務

定義於 fuchsia.hardware.bluetooth/vendor.fidl

名稱類型傳輸
vendor fuchsia.hardware.bluetooth/Vendor 版本

VirtualControllerService

定義於 fuchsia.hardware.bluetooth/virtual.fidl

名稱類型傳輸
device fuchsia.hardware.bluetooth/VirtualController 版本