连接server并发送数据成功
This commit is contained in:
@ -1,3 +1,5 @@
|
||||
|
||||
|
||||
// *****************************************************************************
|
||||
/* EXAMPLE_START(le_counter): LE Peripheral - Heartbeat Counter over GATT
|
||||
*
|
||||
|
||||
@ -55,7 +55,7 @@ const int config_rcsp_stack_enable = 0;
|
||||
const int config_le_hci_connection_num = 1;//支持同时连接个数
|
||||
const int config_le_sm_support_enable = 0; //是否支持加密配对
|
||||
const int config_le_gatt_client_num = 1; //支持client角色个数
|
||||
const int config_le_gatt_server_num = 1; //支持server角色个数
|
||||
const int config_le_gatt_server_num = 0; //支持server角色个数
|
||||
|
||||
#elif (TCFG_BLE_DEMO_SELECT == DEF_BLE_DEMO_WIRELESS_MIC_SERVER)
|
||||
const int config_le_hci_connection_num = 1;//支持同时连接个数
|
||||
|
||||
1592
apps/earphone/xtell_remote_control/ble_handler/client_handler copy.c
Normal file
1592
apps/earphone/xtell_remote_control/ble_handler/client_handler copy.c
Normal file
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -258,11 +258,11 @@ void contol_key_task(void){
|
||||
static u16 Xout_adc = 0;
|
||||
static u16 Yout_adc = 0;
|
||||
static u8 key1_state = 1;
|
||||
u8 ble_data_buff[13] = {0xBE, 0xBB, 0x0A, 0x01, //0-3
|
||||
u8 ble_data_buff[12] = {0xBE, 0xBB, 0x0A, 0x01, //0-3
|
||||
0x00, 0x00, 0x00, 0x00, //4-7 遥感值:上下、左右
|
||||
0x00, 0x00, //8、9 两个按键
|
||||
0x00, 0x00, //10、11 vbat adc值
|
||||
0x0C}; //12 校验和
|
||||
0x00, //10 电量百分比
|
||||
0x0C}; //11 校验和
|
||||
|
||||
control_key_init(); //遥感按键初始化
|
||||
|
||||
@ -279,8 +279,7 @@ void contol_key_task(void){
|
||||
ble_data_buff[8] = key1_state;
|
||||
ble_data_buff[9] = 0x01;
|
||||
|
||||
ble_data_buff[10] = (u8)(vbat_value & 0xFF);
|
||||
ble_data_buff[11] = (u8)((vbat_value >> 8) & 0xFF);
|
||||
ble_data_buff[10] = get_vbat_percent();
|
||||
|
||||
g_send_data_to_ble_server(ble_data_buff, sizeof(ble_data_buff));
|
||||
os_time_dly(5);
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -5175,9 +5175,15 @@ objs/apps/earphone/xtell_remote_control/ble_handler/ble_test.c.o
|
||||
-r=objs/apps/earphone/xtell_remote_control/ble_handler/ble_test.c.o,xt_bl_new_name,pl
|
||||
-r=objs/apps/earphone/xtell_remote_control/ble_handler/ble_test.c.o,xt_ble_new_name,pl
|
||||
objs/apps/earphone/xtell_remote_control/ble_handler/client_handler.c.o
|
||||
-r=objs/apps/earphone/xtell_remote_control/ble_handler/client_handler.c.o,clear_bonding_info,pl
|
||||
-r=objs/apps/earphone/xtell_remote_control/ble_handler/client_handler.c.o,printf,l
|
||||
-r=objs/apps/earphone/xtell_remote_control/ble_handler/client_handler.c.o,l2cap_connection_update_request_just,pl
|
||||
-r=objs/apps/earphone/xtell_remote_control/ble_handler/client_handler.c.o,little_endian_read_16,l
|
||||
-r=objs/apps/earphone/xtell_remote_control/ble_handler/client_handler.c.o,user_client_report_search_result,pl
|
||||
-r=objs/apps/earphone/xtell_remote_control/ble_handler/client_handler.c.o,put_buf,l
|
||||
-r=objs/apps/earphone/xtell_remote_control/ble_handler/client_handler.c.o,user_client_report_data_callback,pl
|
||||
-r=objs/apps/earphone/xtell_remote_control/ble_handler/client_handler.c.o,ble_get_client_operation_table,pl
|
||||
-r=objs/apps/earphone/xtell_remote_control/ble_handler/client_handler.c.o,ble_profile_init,pl
|
||||
-r=objs/apps/earphone/xtell_remote_control/ble_handler/client_handler.c.o,printf,l
|
||||
-r=objs/apps/earphone/xtell_remote_control/ble_handler/client_handler.c.o,le_device_db_init,l
|
||||
-r=objs/apps/earphone/xtell_remote_control/ble_handler/client_handler.c.o,ble_stack_gatt_role,l
|
||||
-r=objs/apps/earphone/xtell_remote_control/ble_handler/client_handler.c.o,gatt_client_init,l
|
||||
@ -5192,24 +5198,22 @@ objs/apps/earphone/xtell_remote_control/ble_handler/client_handler.c.o
|
||||
-r=objs/apps/earphone/xtell_remote_control/ble_handler/client_handler.c.o,bt_ble_adv_enable,pl
|
||||
-r=objs/apps/earphone/xtell_remote_control/ble_handler/client_handler.c.o,client_send_conn_param_update,pl
|
||||
-r=objs/apps/earphone/xtell_remote_control/ble_handler/client_handler.c.o,ble_user_cmd_prepare,l
|
||||
-r=objs/apps/earphone/xtell_remote_control/ble_handler/client_handler.c.o,clear_bonding_info,pl
|
||||
-r=objs/apps/earphone/xtell_remote_control/ble_handler/client_handler.c.o,rcsp_adv_fill_mac_addr,pl
|
||||
-r=objs/apps/earphone/xtell_remote_control/ble_handler/client_handler.c.o,swapX,l
|
||||
-r=objs/apps/earphone/xtell_remote_control/ble_handler/client_handler.c.o,bt_get_mac_addr,l
|
||||
-r=objs/apps/earphone/xtell_remote_control/ble_handler/client_handler.c.o,g_send_data_to_ble_server,pl
|
||||
-r=objs/apps/earphone/xtell_remote_control/ble_handler/client_handler.c.o,g_ble_connect_new_device,pl
|
||||
-r=objs/apps/earphone/xtell_remote_control/ble_handler/client_handler.c.o,g_ble_get_state,pl
|
||||
-r=objs/apps/earphone/xtell_remote_control/ble_handler/client_handler.c.o,put_buf,l
|
||||
-r=objs/apps/earphone/xtell_remote_control/ble_handler/client_handler.c.o,test_func_main,l
|
||||
-r=objs/apps/earphone/xtell_remote_control/ble_handler/client_handler.c.o,syscfg_read,l
|
||||
-r=objs/apps/earphone/xtell_remote_control/ble_handler/client_handler.c.o,syscfg_write,l
|
||||
-r=objs/apps/earphone/xtell_remote_control/ble_handler/client_handler.c.o,little_endian_read_16,l
|
||||
-r=objs/apps/earphone/xtell_remote_control/ble_handler/client_handler.c.o,memcmp,l
|
||||
-r=objs/apps/earphone/xtell_remote_control/ble_handler/client_handler.c.o,usr_timer_add,l
|
||||
-r=objs/apps/earphone/xtell_remote_control/ble_handler/client_handler.c.o,test_func_main,l
|
||||
-r=objs/apps/earphone/xtell_remote_control/ble_handler/client_handler.c.o,sys_timeout_del,l
|
||||
-r=objs/apps/earphone/xtell_remote_control/ble_handler/client_handler.c.o,user_client_init,l
|
||||
-r=objs/apps/earphone/xtell_remote_control/ble_handler/client_handler.c.o,user_client_set_search_complete,l
|
||||
-r=objs/apps/earphone/xtell_remote_control/ble_handler/client_handler.c.o,sys_timer_add,l
|
||||
-r=objs/apps/earphone/xtell_remote_control/ble_handler/client_handler.c.o,ble_vendor_get_peer_rssi,l
|
||||
-r=objs/apps/earphone/xtell_remote_control/ble_handler/client_handler.c.o,puts,l
|
||||
-r=objs/apps/earphone/xtell_remote_control/ble_handler/client_handler.c.o,phy_result,pl
|
||||
-r=objs/apps/earphone/xtell_remote_control/ble_handler/client_handler.c.o,client_user_target,pl
|
||||
objs/apps/earphone/xtell_remote_control/ble_handler/example/example.c.o
|
||||
objs/apps/earphone/xtell_remote_control/nvs/nvs.c.o
|
||||
@ -5365,7 +5369,7 @@ objs/apps/earphone/xtell_remote_control/task_func.c.o
|
||||
-r=objs/apps/earphone/xtell_remote_control/task_func.c.o,strncmp,l
|
||||
-r=objs/apps/earphone/xtell_remote_control/task_func.c.o,nvs_write_main_board_mac,l
|
||||
-r=objs/apps/earphone/xtell_remote_control/task_func.c.o,nvs_clear_info,l
|
||||
-r=objs/apps/earphone/xtell_remote_control/task_func.c.o,g_ble_get_state,l
|
||||
-r=objs/apps/earphone/xtell_remote_control/task_func.c.o,g_ble_get_state,
|
||||
-r=objs/apps/earphone/xtell_remote_control/task_func.c.o,rc_ble_callback_handler,pl
|
||||
-r=objs/apps/earphone/xtell_remote_control/task_func.c.o,nvs_read_main_board_mac,l
|
||||
-r=objs/apps/earphone/xtell_remote_control/task_func.c.o,control_key_init,pl
|
||||
@ -5379,6 +5383,7 @@ objs/apps/earphone/xtell_remote_control/task_func.c.o
|
||||
-r=objs/apps/earphone/xtell_remote_control/task_func.c.o,gpio_read,l
|
||||
-r=objs/apps/earphone/xtell_remote_control/task_func.c.o,contol_key_task,pl
|
||||
-r=objs/apps/earphone/xtell_remote_control/task_func.c.o,get_vbat_level,l
|
||||
-r=objs/apps/earphone/xtell_remote_control/task_func.c.o,get_vbat_percent,l
|
||||
-r=objs/apps/earphone/xtell_remote_control/task_func.c.o,g_send_data_to_ble_server,l
|
||||
-r=objs/apps/earphone/xtell_remote_control/task_func.c.o,os_time_dly,l
|
||||
-r=objs/apps/earphone/xtell_remote_control/task_func.c.o,rc_app_main_init,pl
|
||||
@ -8600,7 +8605,7 @@ cpu/br28/liba/btstack.a.llvm.343146.l2cap.c
|
||||
-r=cpu/br28/liba/btstack.a.llvm.343146.l2cap.c,l2cap_signaling_handler_channel,pl
|
||||
-r=cpu/br28/liba/btstack.a.llvm.343146.l2cap.c,l2cap_signaling_handler_dispatch,pl
|
||||
-r=cpu/br28/liba/btstack.a.llvm.343146.l2cap.c,clear_sniff_cnt,l
|
||||
-r=cpu/br28/liba/btstack.a.llvm.343146.l2cap.c,l2cap_connection_update_request_just,pl
|
||||
-r=cpu/br28/liba/btstack.a.llvm.343146.l2cap.c,l2cap_connection_update_request_just,l
|
||||
-r=cpu/br28/liba/btstack.a.llvm.343146.l2cap.c,l2cap_acl_handler,pl
|
||||
-r=cpu/br28/liba/btstack.a.llvm.343146.l2cap.c,l2cap_packet_handler,pl
|
||||
-r=cpu/br28/liba/btstack.a.llvm.343146.l2cap.c,gap_request_connection_parameter_update,pl
|
||||
@ -9791,12 +9796,12 @@ cpu/br28/liba/btstack.a.llvm.2207106.att_send.c
|
||||
-r=cpu/br28/liba/btstack.a.llvm.2207106.att_send.c,config_asser,l
|
||||
-r=cpu/br28/liba/btstack.a.llvm.2207106.att_send.c,CONFIG_BTCTLER_TWS_ENABLE,l
|
||||
cpu/br28/liba/btstack.a.llvm.2252410.client_user.c
|
||||
-r=cpu/br28/liba/btstack.a.llvm.2252410.client_user.c,user_client_report_search_result,pl
|
||||
-r=cpu/br28/liba/btstack.a.llvm.2252410.client_user.c,user_client_report_search_result,l
|
||||
-r=cpu/br28/liba/btstack.a.llvm.2252410.client_user.c,user_client_report_descriptor_result,pl
|
||||
-r=cpu/br28/liba/btstack.a.llvm.2252410.client_user.c,printf,l
|
||||
-r=cpu/br28/liba/btstack.a.llvm.2252410.client_user.c,put_buf,l
|
||||
-r=cpu/br28/liba/btstack.a.llvm.2252410.client_user.c,user_client_search_descriptor_is_enable,pl
|
||||
-r=cpu/br28/liba/btstack.a.llvm.2252410.client_user.c,user_client_report_data_callback,pl
|
||||
-r=cpu/br28/liba/btstack.a.llvm.2252410.client_user.c,user_client_report_data_callback,l
|
||||
-r=cpu/br28/liba/btstack.a.llvm.2252410.client_user.c,user_client_set_search_complete,pl
|
||||
-r=cpu/br28/liba/btstack.a.llvm.2252410.client_user.c,user_client_gatt_event,pl
|
||||
-r=cpu/br28/liba/btstack.a.llvm.2252410.client_user.c,gatt_client_discover_characteristics_for_service,l
|
||||
|
||||
Reference in New Issue
Block a user