13#include "tuya_cloud_types.h"
14#include "tuya_cloud_com_defs.h"
21typedef BYTE_T TUYA_BLE_ABILITY_T;
22#define TUYA_BLE_ABILITY_NONE 0x0
23#define TUYA_BLE_ABILITY_NETCFG 0x1
24#define TUYA_BLE_ABILITY_DP_CTRL 0x2
25#define TUYA_BLE_ABILITY_ALL 0xFF
31 TUYA_BT_UNBONDING_UNCONN = 0,
32 TUYA_BT_UNBONDING_CONN,
33 TUYA_BT_BONDING_UNCONN,
42 TUYA_BLE_OP_UNBIND = 0,
56typedef VOID_T(*BT_DP_QUERY_CB)(VOID_T);
57typedef UINT_T(*BT_DP_GET_TM_CB)(CHAR_T* time_str);
60 UINT8_T priority_flag;
62 UINT8_T dp_rept_with_time;
64 BT_DP_QUERY_CB query_dp_cb;
65 BT_DP_GET_TM_CB get_timestamp_cb;
79OPERATE_RET ty_ble_init_env_for_mftest(VOID_T);
136OPERATE_RET
ty_bt_dp_report(IN CONST DP_REPT_TYPE_E dp_rept_type, IN CONST VOID_T* data);
208#if defined(BT_REMOTE_CTRL) && (BT_REMOTE_CTRL==1)
220VOID_T tuya_ble_init_beacon_key(VOID_T);
232OPERATE_RET tuya_ble_save_beacon_key(BOOL_T force);
244VOID_T tuya_ble_clear_beacon_key(VOID_T);
256VOID_T tuya_ble_clear_rmt_ctrl_info(UINT8_T stat);
260typedef VOID (*TUYA_BLE_APP_SCAN_HANDLE)(UCHAR_T *data, UCHAR_T len, UCHAR_T type, UCHAR_T* mac);
271OPERATE_RET tuya_ble_reg_app_scan_adv_cb(TUYA_BLE_APP_SCAN_HANDLE cb);
282BOOL_T tuya_ble_is_user_registed(VOID_T);
285typedef OPERATE_RET(*BLE_SCAN_ADV_BIND_CHECK_CB)(
TUYA_BLE_BIND_TYPE type, UCHAR_T *data, UCHAR_T len);
290 BLE_SCAN_ADV_BIND_CHECK_CB bind_check;
291 BLE_SCAN_ADV_BIND_RSLT_NOTIFY_CB bind_notify;
292} TUYA_BLE_SCAN_ADV_HANDLE_CBS;
303OPERATE_RET tuya_ble_reg_app_scan_adv_handle_cbs(TUYA_BLE_SCAN_ADV_HANDLE_CBS* cbs);
314VOID_T tuya_ble_set_bind_window(UINT_T time_out);
325VOID_T tuya_ble_open_bind_window(VOID_T);
parameters for bluetooth
Definition: tuya_bt.h:50
OPERATE_RET ty_bt_init_env(IN CONST TY_BT_SDK_PARAM_S *p)
Init the running environment for bluetooth.
VOID_T tuya_ble_set_auto_close(BOOL_T auto_close)
Close or open ble adv when mqtt disconnect or connected
BOOL_T is_bt_connected(VOID_T)
Check bluetooth is connected.
TUYA_BT_CONN_STAT
connection status for bluetooth
Definition: tuya_bt.h:30
VOID_T tuya_ble_restart_adv(VOID_T)
Resend the ble adv data to hal and start ble adv
OPERATE_RET tuya_ble_reg_get_bt_stat_cb(IN CONST GET_BT_CONN_STAT_CB bt_conn_stat_cb)
Register callback function for getting the connection status of bluetooth
VOID_T tuya_ble_lowpower_handle(VOID_T)
stop ble netcfg and plug_play when dev under lowpower status
VOID_T tuya_ble_disable_expt_unbind(VOID_T)
Disable function for execept unbinding
VOID_T tuya_ble_set_startup_attr(TUYA_BLE_ABILITY_T attr)
Set abilitiy attribute of bluetooth
BOOL_T tuya_ble_is_serv_opened(VOID_T)
Check bluetooth service is available
TUYA_BT_CONN_STAT tuya_bt_get_connect_status(VOID)
Get connection status of bluetooth
OPERATE_RET tuya_set_bt_device_name(CHAR_T *dev_name)
Set name for bluetooth device.
VOID_T tuya_ble_set_serv_switch(BOOL_T swith)
Set enable switch for bluetooth service
OPERATE_RET bt_netcfg_init(VOID_T)
Init network configuration by bluetooth
VOID_T tuya_ble_connect_enable(BOOL_T enable)
Control the BLE fearture
OPERATE_RET ty_bt_dp_report(IN CONST DP_REPT_TYPE_E dp_rept_type, IN CONST VOID_T *data)
Report dp by bluetooth
VOID_T tuya_ble_set_bt_para(TUYA_BLE_BT_PARA *para)
Set parameters for bluetooth.
OPERATE_RET tuya_ble_monitor_init(VOID_T)
Monitor for bluetooth
OPERATE_RET ty_bt_update_local_key(UINT8_T *p_buf, UINT8_T len)
Update local key
OPERATE_RET bt_netcfg_uninit(VOID_T)
Uninit network configuration by bluetooth
TUYA_BLE_BIND_TYPE
bind type for bluetooth remote controller
Definition: tuya_bt.h:41