/AliOS-Things-master/components/py_engine/tests/multi_bluetooth/ |
A D | ble_l2cap.py | 37 conn_handle, addr_type, addr = data 39 waiting_events[event] = conn_handle 43 conn_handle, addr_type, addr = data 45 waiting_events[event] = conn_handle 57 conn_handle, cid, psm, status = data 60 conn_handle, cid = data 62 conn_handle, cid, status = data 77 def send_data(ble, conn_handle, cid): argument 89 def recv_data(ble, conn_handle, cid): argument 129 send_data(ble, conn_handle, cid) [all …]
|
A D | ble_characteristic.py | 107 ble.gatts_notify(conn_handle, char_handle) 115 ble.gatts_notify(conn_handle, char_handle, "periph2") 125 ble.gatts_indicate(conn_handle, char_handle) 144 ble.gattc_discover_characteristics(conn_handle, 1, 65535) 150 ble.gattc_read(conn_handle, value_handle) 155 ble.gattc_write(conn_handle, value_handle, "central0", 1) 160 ble.gattc_read(conn_handle, value_handle) 165 ble.gattc_write(conn_handle, value_handle, "central1", 1) 170 ble.gattc_read(conn_handle, value_handle) 175 ble.gattc_write(conn_handle, value_handle, "central2", 1) [all …]
|
A D | ble_mtu.py | 118 conn_handle = wait_for_event(_IRQ_CENTRAL_CONNECT, TIMEOUT_MS) 122 ble.gattc_exchange_mtu(conn_handle) 127 ble.gatts_notify(conn_handle, char_handle, str(i) * 64) 165 conn_handle = wait_for_event(_IRQ_PERIPHERAL_CONNECT, TIMEOUT_MS) 169 ble.gattc_exchange_mtu(conn_handle) 176 ble.gattc_discover_characteristics(conn_handle, 1, 65535) 182 ble.gattc_write(conn_handle, value_handle, chr(ord("a") + i) * (mtu + 20), 1) 186 print("gap_disconnect:", ble.gap_disconnect(conn_handle))
|
A D | ble_gatt_data_transfer.py | 97 conn_handle = wait_for_event(_IRQ_CENTRAL_CONNECT, TIMEOUT_MS) 108 ble.gatts_notify(conn_handle, char_tx_handle, "message{}".format(i)) 112 ble.gatts_notify(conn_handle, char_ctrl_handle, "OK") 127 conn_handle = wait_for_event(_IRQ_PERIPHERAL_CONNECT, TIMEOUT_MS) 130 ble.gattc_discover_characteristics(conn_handle, 1, 65535) 139 ble.gattc_write(conn_handle, rx_value_handle, "central{}".format(i), i & 1) 145 ble.gattc_write(conn_handle, ctrl_value_handle, "OK", 1) 152 print("gap_disconnect:", ble.gap_disconnect(conn_handle))
|
A D | ble_gap_pair.py | 100 conn_handle = wait_for_event(_IRQ_PERIPHERAL_CONNECT, TIMEOUT_MS) 103 ble.gattc_discover_characteristics(conn_handle, 1, 65535) 109 ble.gap_pair(conn_handle) 116 ble.gattc_read(conn_handle, value_handle) 120 print("gap_disconnect:", ble.gap_disconnect(conn_handle))
|
A D | ble_gap_pair_bond.py | 105 conn_handle = wait_for_event(_IRQ_PERIPHERAL_CONNECT, TIMEOUT_MS) 108 ble.gattc_discover_characteristics(conn_handle, 1, 65535) 114 ble.gap_pair(conn_handle) 121 ble.gattc_read(conn_handle, value_handle) 125 print("gap_disconnect:", ble.gap_disconnect(conn_handle))
|
A D | ble_gap_connect.py | 57 conn_handle = wait_for_event(_IRQ_CENTRAL_CONNECT, TIMEOUT_MS) 58 print("gap_disconnect:", ble.gap_disconnect(conn_handle)) 71 conn_handle = wait_for_event(_IRQ_PERIPHERAL_CONNECT, TIMEOUT_MS) 72 print("gap_disconnect:", ble.gap_disconnect(conn_handle))
|
A D | stress_log_filesystem.py | 156 conn_handle = wait_for_event(_IRQ_PERIPHERAL_CONNECT, TIMEOUT_MS) 160 ble.gattc_discover_services(conn_handle) 166 ble.gattc_discover_characteristics(conn_handle, start_handle, end_handle) 172 ble.gattc_read(conn_handle, value_handle) 176 ble.gattc_write(conn_handle, value_handle, "{}".format(op), 1) 180 print("gap_disconnect:", ble.gap_disconnect(conn_handle))
|
/AliOS-Things-master/components/ble_host/bt_host/include/aos/ |
A D | gatt.h | 349 int ble_stack_gatt_mtu_get(int16_t conn_handle); 350 int ble_stack_gatt_mtu_exchange(int16_t conn_handle); 352 int ble_stack_gatt_service_discovery(int16_t conn_handle); 354 #define ble_stack_gatt_discovery_all(conn_handle) \ argument 355 ble_stack_gatt_discovery(conn_handle, GATT_FIND_PRIMARY_SERVICE, 0, 0x0001, 0xffff) 363 #define ble_stack_gatt_discovery_char_all(conn_handle, start_handle, end_handle) \ argument 364 ble_stack_gatt_discovery(conn_handle, GATT_FIND_CHAR, 0, start_handle, end_handle) 366 #define ble_stack_gatt_discovery_char(conn_handle, uuid, start_handle, end_handle) \ argument 383 #define ble_stack_gatt_write_response(conn_handle, attr_handle, data, len, offset) \ argument 389 #define ble_stack_gatt_write_signed(conn_handle, attr_handle, data, len, offset) \ argument [all …]
|
A D | ble.h | 149 int16_t conn_handle; member 155 int16_t conn_handle; member 161 int16_t conn_handle; member 168 int16_t conn_handle; member 182 int16_t conn_handle; member 191 int16_t conn_handle; member 197 int16_t conn_handle; member 203 int16_t conn_handle; member 211 int16_t conn_handle; member 219 int16_t conn_handle; member [all …]
|
/AliOS-Things-master/components/py_engine/engine/extmod/ |
A D | modbluetooth.h | 340 int mp_bluetooth_gatts_notify(uint16_t conn_handle, uint16_t value_handle); 344 int mp_bluetooth_gatts_indicate(uint16_t conn_handle, uint16_t value_handle); 351 int mp_bluetooth_gap_disconnect(uint16_t conn_handle); 359 int mp_bluetooth_gap_pair(uint16_t conn_handle); 387 int mp_bluetooth_gattc_read(uint16_t conn_handle, uint16_t value_handle); 393 int mp_bluetooth_gattc_exchange_mtu(uint16_t conn_handle); 398 int mp_bluetooth_l2cap_connect(uint16_t conn_handle, uint16_t psm, uint16_t mtu); 399 int mp_bluetooth_l2cap_disconnect(uint16_t conn_handle, uint16_t cid); 433 void mp_bluetooth_gatts_on_write(uint16_t conn_handle, uint16_t value_handle); 443 void mp_bluetooth_gatts_on_mtu_exchanged(uint16_t conn_handle, uint16_t value); [all …]
|
A D | modbluetooth.c | 1173 mp_int_t args[] = {conn_handle, addr_type}; in mp_bluetooth_gap_on_connected_disconnected() 1235 mp_int_t args[] = {conn_handle, value}; in mp_bluetooth_gatts_on_mtu_exchanged() 1265 mp_int_t args[] = {conn_handle, cid}; in mp_bluetooth_on_l2cap_recv() 1293 mp_int_t args[] = {conn_handle, handle}; in mp_bluetooth_gattc_on_descriptor_result() 1298 mp_int_t args[] = {conn_handle, status}; in mp_bluetooth_gattc_on_discover_complete() 1394 ringbuf_put16(&o->ringbuf, conn_handle); in mp_bluetooth_gap_on_connected_disconnected() 1407 ringbuf_put16(&o->ringbuf, conn_handle); in mp_bluetooth_gap_on_connection_update() 1420 ringbuf_put16(&o->ringbuf, conn_handle); in mp_bluetooth_gatts_on_write() 1430 ringbuf_put16(&o->ringbuf, conn_handle); in mp_bluetooth_gatts_on_indicate_complete() 1438 (void)conn_handle; in mp_bluetooth_gatts_on_read_request() [all …]
|
/AliOS-Things-master/components/py_engine/engine/extmod/btstack/ |
A D | modbluetooth_btstack.c | 150 uint16_t conn_handle; member 202 pending_op->conn_handle = conn_handle; in btstack_enqueue_pending_operation() 236 …if (pending_op->op_type == op_type && pending_op->conn_handle == conn_handle && (value_handle == 0… in btstack_finish_pending_operation() 277 mp_bluetooth_gatts_on_mtu_exchanged(conn_handle, mtu); in btstack_packet_handler_att_server() 373 uint16_t conn_handle; in btstack_packet_handler() local 390 mp_bluetooth_gatts_on_encryption_update(conn_handle, in btstack_packet_handler() 1206 int mp_bluetooth_gap_disconnect(uint16_t conn_handle) { in mp_bluetooth_gap_disconnect() argument 1211 gap_disconnect(conn_handle); in mp_bluetooth_gap_disconnect() 1217 int mp_bluetooth_gap_pair(uint16_t conn_handle) { in mp_bluetooth_gap_pair() argument 1219 sm_request_pairing(conn_handle); in mp_bluetooth_gap_pair() [all …]
|
/AliOS-Things-master/components/py_engine/engine/extmod/nimble/ |
A D | modbluetooth_nimble.c | 459 ble_gap_conn_find(event->connect.conn_handle, &desc); in central_gap_event_cb() 883 mp_bluetooth_gatts_on_write(conn_handle, value_handle); in characteristic_access_cb() 998 int mp_bluetooth_gap_disconnect(uint16_t conn_handle) { in mp_bluetooth_gap_disconnect() argument 1079 int mp_bluetooth_gap_pair(uint16_t conn_handle) { in mp_bluetooth_gap_pair() argument 1080 DEBUG_printf("mp_bluetooth_gap_pair: conn_handle=%d\n", conn_handle); in mp_bluetooth_gap_pair() 1081 return ble_hs_err_to_errno(ble_gap_security_initiate(conn_handle)); in mp_bluetooth_gap_pair() 1108 return ble_hs_err_to_errno(ble_sm_inject_io(conn_handle, &io)); in mp_bluetooth_gap_passkey() 1185 ble_gap_conn_find(event->connect.conn_handle, &desc); in peripheral_gap_event_cb() 1395 int mp_bluetooth_gattc_exchange_mtu(uint16_t conn_handle) { in mp_bluetooth_gattc_exchange_mtu() argument 1563 assert(event->tx_unstalled.conn_handle == chan->chan->conn_handle); in l2cap_channel_event() [all …]
|
/AliOS-Things-master/components/ble_host/bt_host/aos/ |
A D | ble.c | 885 if (conn_handle < 0) { in ble_stack_gatt_mtu_get() 910 if (conn_handle < 0) { in ble_stack_gatt_mtu_exchange() 999 if (conn_handle < 0) { in ble_stack_gatt_discovery() 1074 event_data.conn_handle = conn_handle; in ble_stack_gatt_notify_cb() 1093 if (conn_handle < 0) { in ble_stack_gatt_write() 1177 if (conn_handle < 0) { in ble_stack_gatt_read() 1224 if (conn_handle < 0) { in ble_stack_gatt_read_multiple() 1283 int16_t conn_handle; in ble_stack_connect() local 1343 if (conn_handle < 0) { in ble_stack_disconnect() 1366 info->conn_handle = conn_handle; in ble_stack_connect_info_get() [all …]
|
/AliOS-Things-master/components/ble_host/ble_profiles/ |
A D | uart_server.c | 61 node->conn_handle = e->conn_handle; in conn_change() 63 node->conn_handle = -1; in conn_change() 82 if (node->conn_handle == e->conn_handle) { in mtu_exchange() 84 node->mtu = ble_stack_gatt_mtu_get(node->conn_handle); in mtu_exchange() 93 ble_stack_connect_param_update(e->conn_handle, ¶m); in mtu_exchange() 112 ble_stack_connect_param_update(uart->conn_handle, (conn_param_t *)uart->conn_param); in event_char_ccc_change() 140 if (ble_stack_disconnect(uart->conn_handle)) { in uart_server_disconn() 188 …if (!data || !length || !uart || uart->conn_handle < 0 || uart->server_data.tx_ccc_value != CCC_VA… in uart_server_send() 256 service->conn_handle = -1; in uart_server_init() 299 if (uart->conn_handle < 0) { in uart_server_conn_param_update() [all …]
|
A D | uart_client.c | 63 ble_stack_gatt_mtu_exchange(e->conn_handle); in conn_change() 64 node->conn_handle = e->conn_handle; in conn_change() 66 ble_stack_connect_info_get(e->conn_handle, &info); in conn_change() 74 node->conn_handle = -1; in conn_change() 94 if (node->conn_handle == e->conn_handle) { in mtu_exchange() 96 node->mtu = ble_stack_gatt_mtu_get(node->conn_handle); in mtu_exchange() 379 if (uart->conn_handle == e->conn_handle) { in event_notify() 526 if (ble_stack_disconnect(uart->conn_handle)) { in uart_client_disconn() 551 service->conn_handle = -1; in uart_client_init() 574 if (uart->conn_handle < 0) { in uart_client_conn_param_update() [all …]
|
A D | hrs.c | 70 e->conn_handle, e->char_handle, e->len, e->offset); in event_char_read() 85 node->conn_handle = e->conn_handle; in conn_change() 87 node->conn_handle = 0xFFFF; in conn_change() 154 hrs->conn_handle = 0xFFFF; in hrs_init() 178 if (hrs->conn_handle != 0xFFFF && hrs->mea_ccc == CCC_VALUE_NOTIFY) { in hrs_measure_level_update() 180 return ble_stack_gatt_notificate(hrs->conn_handle, in hrs_measure_level_update()
|
A D | bas.c | 66 node->conn_handle = e->conn_handle; in conn_change() 68 node->conn_handle = 0xFFFF; in conn_change() 132 bas->conn_handle = 0xFFFF; in bas_init() 156 if (bas->conn_handle != 0xFFFF && bas->ccc == CCC_VALUE_NOTIFY) { in bas_level_update() 157 return ble_stack_gatt_notificate(bas->conn_handle, in bas_level_update()
|
A D | hids.c | 76 uint16_t conn_handle; member 149 …if (g_hids.conn_handle == 0xFFFF || e->char_handle < g_hids.svc_handle || e->char_handle >= g_hids… in event_char_read() 221 …if (g_hids.conn_handle == 0xFFFF || e->char_handle < g_hids.svc_handle || e->char_handle >= g_hids… in event_char_write() 263 …if (g_hids.conn_handle == 0xFFFF || e->char_handle < g_hids.svc_handle || e->char_handle >= g_hids… in event_char_ccc_change() 285 g_hids.conn_handle = e->conn_handle; in conn_change() 287 g_hids.conn_handle = 0xFFFF; in conn_change() 337 g_hids.conn_handle = 0xFFFF; in hids_init() 354 …ble_stack_gatt_notificate(hids->conn_handle, hids->svc_handle + HIDS_IDX_REPORT_INPUT_VAL, key_cod… in hids_notify_send() 367 …ble_stack_gatt_notificate(hids->conn_handle, hids->svc_handle + HIDS_IDX_REPORT_INPUT_VAL, key_cod… in hids_key_send()
|
/AliOS-Things-master/components/linkkit/dev_model/server/ |
A D | dm_server_adapter.c | 84 ctx->conn_handle = iotx_alcs_construct(&alcs_param); in dm_server_open() 85 if (ctx->conn_handle == NULL) { in dm_server_open() 89 _dm_server_dev_notify(ctx->conn_handle); in dm_server_open() 97 return iotx_alcs_cloud_init(ctx->conn_handle); in dm_server_connect() 104 return iotx_alcs_destroy(&ctx->conn_handle); in dm_server_close() 131 res = iotx_alcs_observe_notify(ctx->conn_handle, alcs_msg.uri, in dm_server_send() 136 res = iotx_alcs_send(ctx->conn_handle, &alcs_msg); in dm_server_send() 140 res = iotx_alcs_send_Response(ctx->conn_handle, &alcs_msg, in dm_server_send() 164 res = iotx_alcs_register_resource(ctx->conn_handle, &alcs_res); in dm_server_subscribe() 177 res = iotx_alcs_add_sub_device(ctx->conn_handle, (const char *)product_key, in dm_server_add_device() [all …]
|
/AliOS-Things-master/components/ble_netconfig/ |
A D | blecfg_stack.c | 32 int16_t conn_handle; member 123 netCfg_info->conn_handle = e->conn_handle; in BleCfg_event_conn_change() 125 netCfg_info->conn_handle = -1; in BleCfg_event_conn_change() 154 BLECFG_LOG_INFO("%s, conn_handle = %d\r\n", __func__, e->conn_handle); in BleCfg_event_smp_pairing_confirm() 156 ble_stack_smp_passkey_confirm(netCfg_info->conn_handle); in BleCfg_event_smp_pairing_confirm() 195 __func__, e->conn_handle, e->char_handle, e->len, e->offset); in BleCfg_event_char_read() 198 if (netCfg_info->conn_handle == e->conn_handle) { in BleCfg_event_char_read() 237 … __func__, netCfg_info->conn_handle, e->conn_handle, handle_offset, BLE_NETCFG_IDX_CHAR2_VAL); in BleCfg_event_char_write() 240 if (netCfg_info->conn_handle == e->conn_handle) { in BleCfg_event_char_write() 437 if (netCfg_info->conn_handle != -1) { in BleCfg_stack_disconnect() [all …]
|
/AliOS-Things-master/hardware/chip/rtl872xd/sdk/component/common/bluetooth/realtek/sdk/board/amebad/src/vendor_cmd/ |
A D | vendor_cmd.c | 84 uint16_t conn_handle; in le_set_conn_tx_power() local 85 if (le_get_conn_param(GAP_PARAM_CONN_HANDLE, &conn_handle, conn_id) == GAP_CAUSE_SUCCESS) in le_set_conn_tx_power() 89 param[1] = conn_handle & 0xFF; in le_set_conn_tx_power() 90 param[2] = (conn_handle >> 8) & 0xFF; in le_set_conn_tx_power() 110 uint16_t conn_handle; in le_disable_slave_latency() local 112 if (le_get_conn_param(GAP_PARAM_CONN_HANDLE, &conn_handle, conn_id) == GAP_CAUSE_SUCCESS) { in le_disable_slave_latency() 115 param[1] = conn_handle & 0xFF; in le_disable_slave_latency() 116 param[2] = (conn_handle >> 8) & 0xFF; in le_disable_slave_latency()
|
/AliOS-Things-master/components/ble_host/ |
A D | README.md | 210 | conn_handle | 连接句柄,在连接成功后分配 | 240 | conn_handle | 连接句柄,在连接成功后分配 | 256 | conn_handle | 连接句柄,在连接成功后分配 | 273 | conn_handle | 连接句柄,在连接成功后分配 | 293 | conn_handle | 连接句柄,在连接成功后分配 | 310 | conn_handle | 连接句柄,在连接成功后分配 | 325 | conn_handle | 连接句柄,在连接成功后分配 | 340 | conn_handle | 连接句柄,在连接成功后分配 | 358 | conn_handle | 连接句柄,在连接成功后分配 | 392 | conn_handle | 连接句柄,在连接事件中返回 | [all …]
|
/AliOS-Things-master/components/ble_host/include/ |
A D | hci_api.h | 40 int hci_api_le_set_data_len(int16_t conn_handle, uint16_t tx_octets, uint16_t tx_time); 88 int hci_api_le_read_remote_features(uint16_t conn_handle); 89 int hci_api_le_read_remote_version(uint16_t conn_handle); 91 int hci_api_le_disconnect(uint16_t conn_handle, uint8_t reason); 100 int hci_api_le_conn_updata(uint16_t conn_handle, 108 int hci_api_le_start_encrypt(uint16_t conn_handle, 113 int hci_api_le_enctypt_ltk_req_reply(uint16_t conn_handle, uint8_t ltk[16]); 115 int hci_api_le_enctypt_ltk_req_neg_reply(uint16_t conn_handle); 233 int hci_api_le_read_phy(uint16_t conn_handle, uint8_t *tx_phy , uint8_t *rx_phy);
|