bt_interface_t 結構參考
#include < bluetooth.h >
數據字段 | |
尺寸_t | 尺寸 |
整數(* | 初始化)( bt_callbacks_t *callbacks) |
整數(* | 啟用)(bool guest_mode) |
整數(* | 禁用)(無效) |
空白(* | 清理)(無效) |
整數(* | get_adapter_properties )(無效) |
整數(* | get_adapter_property )( bt_property_type_t類型) |
整數(* | set_adapter_property )(const bt_property_t *property) |
整數(* | get_remote_device_properties )(bt_bdaddr_t *remote_addr) |
整數(* | get_remote_device_property )(bt_bdaddr_t *remote_addr, bt_property_type_t類型) |
整數(* | set_remote_device_property )(bt_bdaddr_t *remote_addr, const bt_property_t *property) |
整數(* | get_remote_service_record )(bt_bdaddr_t *remote_addr, bt_uuid_t *uuid) |
整數(* | get_remote_services )(bt_bdaddr_t *remote_addr) |
整數(* | 開始發現)(無效) |
整數(* | 取消發現)(無效) |
整數(* | create_bond )(const bt_bdaddr_t *bd_addr, int transport) |
整數(* | create_bond_out_of_band )(const bt_bdaddr_t *bd_addr, int transport, const bt_out_of_band_data_t *oob_data) |
整數(* | remove_bond )(const bt_bdaddr_t *bd_addr) |
整數(* | cancel_bond )(const bt_bdaddr_t *bd_addr) |
整數(* | get_connection_state )(const bt_bdaddr_t *bd_addr) |
整數(* | pin_reply )(const bt_bdaddr_t *bd_addr, uint8_t accept, uint8_t pin_len, bt_pin_code_t *pin_code) |
整數(* | ssp_reply )(const bt_bdaddr_t *bd_addr, bt_ssp_variant_t變體, uint8_t 接受, uint32_t 密碼) |
常量無效*(* | get_profile_interface )(const char *profile_id) |
整數(* | dut_mode_configure )(uint8_t enable ) |
整數(* | dut_mode_send )(uint16_t 操作碼, uint8_t *buf, uint8_t len) |
整數(* | le_test_mode )(uint16_t 操作碼, uint8_t *buf, uint8_t len) |
整數(* | config_hci_snoop_log )(uint8_t enable ) |
整數(* | set_os_callouts )( bt_os_callouts_t *callouts) |
整數(* | read_energy_info )() |
空白(* | dump )(int fd, const char **參數) |
整數(* | config_clear )(無效) |
空白(* | interop_database_clear )(無效) |
空白(* | interop_database_add )(uint16_t 特徵, const bt_bdaddr_t *addr, size_t len) |
詳細說明
注意:默認情況下,在初始化/啟用時不會初始化任何配置文件。每當應用程序調用配置文件的“init”API 時,將發生以下情況之一:
1.) 如果藍牙未啟用,則藍牙核心應將配置文件標記為啟用。隨後,當應用程序調用藍牙“啟用”時,作為啟用序列的一部分,被標記的配置文件應通過調用適當的堆棧 API 來啟用。 'adapter_properties_cb' 應返回已啟用配置文件的 UUID 列表。
2.) 如果啟用了藍牙,則藍牙核心應調用堆棧配置文件 API 以初始化配置文件並觸髮帶有當前 UUID 列表的“adapter_properties_cb”,包括新添加的配置文件的 UUID。
每當調用配置文件“cleanup”API 時,就會發生相反的情況。代表標準藍牙 DM 接口。
在文件bluetooth.h的第456行定義。
現場文件
int(* cancel_bond)(const bt_bdaddr_t *bd_addr) |
取消債券
在文件bluetooth.h的第521行定義。
整數(*取消發現)(無效) |
取消發現
在文件bluetooth.h的第508行定義。
無效(*清理)(無效) |
關閉界面。
在文件bluetooth.h的第472行定義。
整數(* config_clear)(無效) |
清除 /data/misc/bt_config.conf 並清除所有存儲的連接
在文件bluetooth.h的第580行定義。
int(* config_hci_snoop_log)(uint8_t enable ) |
在文件bluetooth.h的第557行定義。
int(* create_bond)(const bt_bdaddr_t *bd_addr, int transport) |
創建藍牙綁定
在文件bluetooth.h的第511行定義。
int(* create_bond_out_of_band)(const bt_bdaddr_t *bd_addr, int transport, const bt_out_of_band_data_t *oob_data) |
使用帶外數據創建藍牙綁定
在文件bluetooth.h的第514行定義。
整數(*禁用)(無效) |
禁用藍牙。
在文件bluetooth.h的第469行定義。
void(* dump)(int fd, const char **arguments) |
對 dumpsys 函數的原生支持 函數是同步的和 |fd|歸調用者所有。 |論據|是可能影響輸出的參數,編碼為 UTF-8 字符串。
在文件bluetooth.h的第575行定義。
int(* dut_mode_configure)(uint8_t啟用) |
藍牙測試模式 API - 必須為這些 API 啟用藍牙
在文件bluetooth.h的第548行定義。
int(* dut_mode_send)(uint16_t 操作碼,uint8_t *buf,uint8_t len) |
在文件bluetooth.h的第551行定義。
int(* enable)(bool guest_mode) |
啟用藍牙。
在文件bluetooth.h的第466行定義。
整數(* get_adapter_properties)(無效) |
在初始化時獲取所有藍牙適配器屬性
在文件bluetooth.h的第475行定義。
int(* get_adapter_property)( bt_property_type_t類型) |
獲取“類型”的藍牙適配器屬性
在文件bluetooth.h的第478行定義。
int(* get_connection_state)(const bt_bdaddr_t *bd_addr) |
獲取給定遠程設備的連接狀態。返回值為 0 表示設備未連接,非零返回狀態表示連接處於活動狀態。
在文件bluetooth.h的第528行定義。
const void*(* get_profile_interface)(const char *profile_id) |
獲取藍牙配置文件接口
在文件bluetooth.h的第544行定義。
int(* get_remote_device_properties)(bt_bdaddr_t *remote_addr) |
獲取所有遠程設備屬性
在文件bluetooth.h的第487行定義。
int(* get_remote_device_property)(bt_bdaddr_t *remote_addr, bt_property_type_t類型) |
獲取“類型”的遠程設備屬性
在文件bluetooth.h的第490行定義。
int(* get_remote_service_record)(bt_bdaddr_t *remote_addr, bt_uuid_t *uuid) |
獲取給定 UUID 的遠程設備服務記錄
在文件bluetooth.h的第498行定義。
int(* get_remote_services)(bt_bdaddr_t *remote_addr) |
啟動SDP獲取遠程服務
在文件bluetooth.h的第502行定義。
int(* init)( bt_callbacks_t *callbacks) |
打開接口並提供回調例程來實現該接口。
在文件bluetooth.h的第463行定義。
void(* interop_database_add)(uint16_t 特徵,const bt_bdaddr_t *addr,size_t len) |
為第一個 |len| 的遠程設備添加新的設備互操作性解決方法其設備地址的字節匹配|addr|。注意:|特徵|必須匹配在 interop_feature_t (interop.h) 中定義的項目。
在文件bluetooth.h的第592行定義。
無效(* interop_database_clear)(無效) |
清除(重置)設備互操作性數據庫的動態部分。
在文件bluetooth.h的第585行定義。
int(* le_test_mode)(uint16_t 操作碼, uint8_t *buf, uint8_t len) |
BLE 測試模式 API
在文件bluetooth.h的第554行定義。
int(* pin_reply)(const bt_bdaddr_t *bd_addr, uint8_t accept, uint8_t pin_len, bt_pin_code_t *pin_code) |
BT Legacy PinKey Reply 如果 accept==FALSE,則 pin_len 和 pin_code 應為 0x0
在文件bluetooth.h的第532行定義。
int(* read_energy_info)() |
讀取能源信息詳細信息 - 返回值表示 BT_STATUS_SUCCESS 或 BT_STATUS_NOT_READY 成功表示 VSC 命令已發送到控制器
在文件bluetooth.h的第567行定義。
int(* remove_bond)(const bt_bdaddr_t *bd_addr) |
刪除鍵
在文件bluetooth.h的第518行定義。
int(* set_adapter_property)(const bt_property_t *property) |
設置“類型”的藍牙適配器屬性
在文件bluetooth.h的第484行定義。
int(* set_os_callouts)( bt_os_callouts_t *callouts) |
設置 bluedroid 警報和喚醒鎖所需的操作系統調用功能。這應該在成功的|init| 之後立即調用。
在文件bluetooth.h的第562行定義。
int(* set_remote_device_property)(bt_bdaddr_t *remote_addr, const bt_property_t *property) |
設置“類型”的遠程設備屬性
在文件bluetooth.h的第494行定義。
size_t 大小 |
設置為 sizeof(bt_interface_t)
在文件bluetooth.h的第458行定義。
int(* ssp_reply)(const bt_bdaddr_t *bd_addr, bt_ssp_variant_t變體, uint8_t 接受, uint32_t 密碼) |
BT SSP 回复 - 對於 BT_SSP_VARIANT_PASSKEY_COMPARISON 和 BT_SSP_VARIANT_CONSENT 而言,Just Works、數字比較和密鑰密鑰應為零 對於 BT_SSP_VARIANT_PASSKEY_ENTRY,如果接受 ==FALSE,則密鑰應為零
在文件bluetooth.h的第540行定義。
整數(* start_discovery)(無效) |
開始發現
在文件bluetooth.h的第505行定義。
此結構的文檔是從以下文件生成的: