XFusion API v1.3.0
|
xf_ble 是对 ble 的封装。 更多...
模块 | |
gap | |
Generic Attribute Profile | |
gatt | |
Generic Attribute Profile | |
结构体 | |
union | _xf_ble_sm_param_val_t |
BLE SM 参数值 更多... | |
struct | xf_ble_addr_t |
BLE 地址信息 更多... | |
struct | _xf_ble_uuid_info_t |
BLE UUID 信息 (多种长度类型通用) 更多... | |
struct | _xf_ble_uuid16_info_t |
BLE 16-bit UUID 信息 更多... | |
struct | _xf_ble_uuid32_info_t |
BLE 32-bit UUID 信息 更多... | |
struct | _xf_ble_uuid128_info_t |
BLE 128-bit UUID 信息 更多... | |
union | _xf_ble_var_uintptr_t |
BLE 中类型可变的数据 更多... | |
类型定义 | |
typedef uint8_t | xf_ble_sm_authen_req_t |
BLE SM 认证请求 (绑定能力选择与安全模式) | |
typedef uint8_t | xf_ble_sm_io_cap_t |
BLE SM IO 能力 | |
typedef uint8_t | xf_ble_sm_authen_option_t |
BLE SM 认证选项 (配对能力) | |
typedef uint8_t | xf_ble_sm_oob_enable_t |
BLE SM OOB (out of bond) 使能 | |
typedef union _xf_ble_sm_param_val_t | xf_ble_sm_param_val_t |
BLE SM 参数值 | |
typedef struct __packed _xf_ble_uuid_info_t | xf_ble_uuid_info_t |
BLE UUID 信息 (多种长度类型通用) | |
typedef struct __packed _xf_ble_uuid16_info_t | xf_ble_uuid16_info_t |
BLE 16-bit UUID 信息 | |
typedef struct __packed _xf_ble_uuid32_info_t | xf_ble_uuid32_info_t |
BLE 32-bit UUID 信息 | |
typedef struct __packed _xf_ble_uuid128_info_t | xf_ble_uuid128_info_t |
BLE 128-bit UUID 信息 | |
typedef uint16_t | xf_ble_attr_handle_t |
BLE 属性句柄 | |
typedef union _xf_ble_var_uintptr_t | xf_ble_var_uintptr_t |
BLE 中类型可变的数据 | |
xf_ble 是对 ble 的封装。
#define XF_BLE_SM_AUTHEN_REQ_NO_BOND 0x00 |
0 no bonding
在文件 xf_ble_sm_types.h 第 52 行定义.
#define XF_BLE_SM_AUTHEN_REQ_BOND 0x01 |
1 << 0 device in the bonding with peer
在文件 xf_ble_sm_types.h 第 53 行定义.
#define XF_BLE_SM_AUTHEN_REQ_MITM (1 << 2) |
1 << 2 man in the middle attack
在文件 xf_ble_sm_types.h 第 54 行定义.
#define XF_BLE_SM_AUTHEN_REQ_BOND_MITM (XF_BLE_SM_AUTHEN_REQ_BOND | XF_BLE_SM_AUTHEN_REQ_MITM) |
0101 banding with man in the middle attack
在文件 xf_ble_sm_types.h 第 55 行定义.
#define XF_BLE_SM_AUTHEN_REQ_SC_ONLY (1 << 3) |
1 << 3 secure connection
在文件 xf_ble_sm_types.h 第 56 行定义.
#define XF_BLE_SM_AUTHEN_REQ_SC_BOND (XF_BLE_SM_AUTHEN_REQ_BOND | XF_BLE_SM_AUTHEN_REQ_SC_ONLY) |
1001 secure connection with band
在文件 xf_ble_sm_types.h 第 57 行定义.
#define XF_BLE_SM_AUTHEN_REQ_SC_MITM (XF_BLE_SM_AUTHEN_REQ_MITM | XF_BLE_SM_AUTHEN_REQ_SC_ONLY) |
1100 secure conn with MITM
在文件 xf_ble_sm_types.h 第 58 行定义.
#define XF_BLE_SM_AUTHEN_REQ_SC_MITM_BOND (XF_BLE_SM_AUTHEN_REQ_MITM | XF_BLE_SM_AUTHEN_REQ_SC_ONLY | XF_BLE_SM_AUTHEN_REQ_BOND) |
1101 SC with MITM and Bonding
在文件 xf_ble_sm_types.h 第 59 行定义.
#define XF_BLE_SM_IO_CAP_OUT 0 |
DisplayOnly
在文件 xf_ble_sm_types.h 第 66 行定义.
#define XF_BLE_SM_IO_CAP_IO 1 |
DisplayYesNo
在文件 xf_ble_sm_types.h 第 67 行定义.
#define XF_BLE_SM_IO_CAP_IN 2 |
KeyboardOnly
在文件 xf_ble_sm_types.h 第 68 行定义.
#define XF_BLE_SM_IO_CAP_NONE 3 |
NoInputNoOutput
在文件 xf_ble_sm_types.h 第 69 行定义.
#define XF_BLE_SM_IO_CAP_KBDISP 4 |
Keyboard display
在文件 xf_ble_sm_types.h 第 70 行定义.
#define XF_BLE_SM_AUTHEN_OPTION_DISABLE 0 |
#define XF_BLE_SM_AUTHEN_OPTION_ENABLE 1 |
认证关闭
在文件 xf_ble_sm_types.h 第 78 行定义.
#define XF_BLE_SM_OOB_DISABLE 0 |
disbale the out of bond
在文件 xf_ble_sm_types.h 第 85 行定义.
#define XF_BLE_SM_OOB_ENABLE 1 |
enable the out of bond
在文件 xf_ble_sm_types.h 第 86 行定义.
#define XF_BLE_IS_ENABLE 1 |
在文件 xf_ble_types.h 第 40 行定义.
#define XF_BLE_ADDR_LEN 6 |
BLE 地址长度
在文件 xf_ble_types.h 第 47 行定义.
#define XF_BLE_ADDR_PRINT_FMT "%02X:%02X:%02X:%02X:%02X:%02X" |
BLE 地址打印格式
在文件 xf_ble_types.h 第 52 行定义.
#define XF_BLE_ADDR_EXPAND_TO_ARG | ( | addr | ) | (addr)[0],(addr)[1],(addr)[2],(addr)[3],(addr)[4],(addr)[5] |
BLE 地址展开为参数
在文件 xf_ble_types.h 第 59 行定义.
#define _XF_BLE_UUID16_INIT | ( | uuid16 | ) |
在文件 xf_ble_types.h 第 149 行定义.
#define _XF_BLE_UUID32_INIT | ( | uuid32 | ) |
在文件 xf_ble_types.h 第 155 行定义.
#define _XF_BLE_UUID128_INIT | ( | uuid128 ... | ) |
在文件 xf_ble_types.h 第 161 行定义.
#define XF_BLE_DECLARE_UUID16 | ( | uuid16 | ) | ((xf_ble_uuid_info_t *) (&(xf_ble_uuid16_info_t) _XF_BLE_UUID16_INIT(uuid16))) |
#define XF_BLE_DECLARE_UUID32 | ( | uuid32 | ) | ((xf_ble_uuid_info_t *) (&(xf_ble_uuid32_info_t) _XF_BLE_UUID32_INIT(uuid32))) |
#define XF_BLE_DECLARE_UUID128 | ( | uuid128... | ) | ((xf_ble_uuid_info_t *) (&(xf_ble_uuid128_info_t) _XF_BLE_UUID128_INIT(uuid128))) |
#define XF_BLE_INVALID_ATTR_HANDLE (0x0000) |
typedef uint8_t xf_ble_sm_authen_req_t |
BLE SM 认证请求 (绑定能力选择与安全模式)
在文件 xf_ble_sm_types.h 第 50 行定义.
typedef uint8_t xf_ble_sm_io_cap_t |
BLE SM IO 能力
在文件 xf_ble_sm_types.h 第 64 行定义.
typedef uint8_t xf_ble_sm_authen_option_t |
BLE SM 认证选项 (配对能力)
在文件 xf_ble_sm_types.h 第 75 行定义.
typedef uint8_t xf_ble_sm_oob_enable_t |
BLE SM OOB (out of bond) 使能
在文件 xf_ble_sm_types.h 第 83 行定义.
typedef union _xf_ble_sm_param_val_t xf_ble_sm_param_val_t |
BLE SM 参数值
typedef struct __packed _xf_ble_uuid_info_t xf_ble_uuid_info_t |
BLE UUID 信息 (多种长度类型通用)
typedef struct __packed _xf_ble_uuid16_info_t xf_ble_uuid16_info_t |
BLE 16-bit UUID 信息
typedef struct __packed _xf_ble_uuid32_info_t xf_ble_uuid32_info_t |
BLE 32-bit UUID 信息
typedef struct __packed _xf_ble_uuid128_info_t xf_ble_uuid128_info_t |
BLE 128-bit UUID 信息
typedef uint16_t xf_ble_attr_handle_t |
BLE 属性句柄
在文件 xf_ble_types.h 第 197 行定义.
typedef union _xf_ble_var_uintptr_t xf_ble_var_uintptr_t |
BLE 中类型可变的数据
在文件 xf_ble_sm_types.h 第 105 行定义.
enum xf_ble_addr_type_t |
蓝牙地址类型,完全遵循蓝牙标准进行定义
地址类型如下:
枚举值 | |
---|---|
XF_BT_ADDR_TYPE_PUBLIC_DEV | 公有地址 |
XF_BT_ADDR_TYPE_RANDOM_DEV | 随机地址 |
XF_BT_ADDR_TYPE_RPA_PUBLIC | 不可解析私有地址:地址定时更新 |
XF_BT_ADDR_TYPE_RPA_RANDOM | 可解析私有地址:地址加密生成 |
在文件 xf_ble_types.h 第 77 行定义.
enum xf_ble_uuid_type_t |
BLE UUID 类型 (长度类型)
枚举值 | |
---|---|
XF_BLE_UUID_TYPE_16 | 长度 16-bit |
XF_BLE_UUID_TYPE_32 | 长度 32-bit |
XF_BLE_UUID_TYPE_128 | 长度 128-bit |
在文件 xf_ble_types.h 第 95 行定义.
enum xf_ble_gap_event_t |
BLE GAP 事件
在文件 xf_ble_types.h 第 223 行定义.
enum xf_ble_gatts_event_t |
BLE GATTS 事件
在文件 xf_ble_types.h 第 240 行定义.
enum xf_ble_gattc_event_t |
BLE GATTC 事件
在文件 xf_ble_types.h 第 255 行定义.