staticinlinevoidhci_auth_complete_evt(struct hci_dev *hdev, struct sk_buff *skb){structhci_ev_auth_complete*ev= (void*)skb->data;structhci_conn*conn;BT_DBG("%s status %d", hdev->name, ev->status); hci_dev_lock(hdev); conn = hci_conn_hash_lookup_handle(hdev, __le16_to_cpu(e...
i =0elifevent == bluez.EVT_DISCONN_COMPLETE: i =0elifevent == LE_META_EVENT: subevent, = struct.unpack("B", pkt[3]) pkt = pkt[4:]ifsubevent == EVT_LE_CONN_COMPLETE: le_handle_connection_complete(pkt)elifsubevent == EVT_LE_ADVERTISING_REPORT:# print "advertising report"num_repo...
var eventMask1 = (1 << EVT_CMD_COMPLETE) | (1 << EVT_CMD_STATUS); var eventMask2 = (1 << (EVT_LE_META_EVENT - 32));
#defineHCI_KEY_REFRESH_COMPLETE_EVENT_CODE0x30 // LE Event Code (for LE Meta Events) #defineHCI_LE_EVENT_CODE0x3E // LE Meta Event Codes #defineHCI_BLE_CONNECTION_COMPLETE_EVENT0x01 #defineHCI_BLE_ADV_REPORT_EVENT0x02 #defineHCI_BLE_CONN_UPDATE_COMPLETE_EVENT0x03 ...
887 hciEvt_BLEConnComplete_t legEvt; 888 hciEvt_BLEEnhConnComplete_t enhEvt; 889 } hciEvt_BLEConnComplete_u; 890 892 typedef struct 893 { 894 uint8 eventType; 895 uint8 addrType; 896 uint8 addr[B_ADDR_LEN]; 897 u...
从spec中,我们知道,这个cmd的回应是一个commandcomplete的event。所以,直接去看command complete event的处理: static inline void hci_cmd_complete_evt(struct hci_dev *hdev, struct sk_buff *skb){ …… case HCI_OP_READ_LOCAL_FEATURES: hci_cc_read_local_features(hdev, skb); ...
sudo python le_scan_test.py {'id': 0, 'name': 'hci0', 'addr': 'b8:27:eb:45:12:b5'} HCI_EVENT_PKT EVT_CMD_COMPLETE HCI_EVENT_PKT EVT_CMD_COMPLETE LE Scan Parameters Set HCI_EVENT_PKT EVT_CMD_COMPLETE HCI_EVENT_PKT EVT_LE_META_EVENT LE Advertising Report Adv Type = ADV_...
i =0elifevent == bluez.EVT_DISCONN_COMPLETE: i =0elifevent == LE_META_EVENT: subevent, = struct.unpack("B", pkt[3]) pkt = pkt[4:]ifsubevent == EVT_LE_CONN_COMPLETE: le_handle_connection_complete(pkt)elifsubevent == EVT_LE_ADVERTISING_REPORT:# print "advertising report"num_r...