예제 #1
0
 def ConnectionCompleteCapture():
     return Capture(
         HciMatchers.EventWithCode(
             hci_packets.EventCode.CONNECTION_COMPLETE),
         lambda packet: hci_packets.ConnectionCompleteView(
             HciMatchers.ExtractEventWithCode(
                 packet.event, hci_packets.EventCode.CONNECTION_COMPLETE)))
예제 #2
0
 def get_handle(packet_bytes):
     if b'\x03\x0b\x00' in packet_bytes:
         nonlocal conn_handle
         cc_view = hci_packets.ConnectionCompleteView(
             hci_packets.EventPacketView(
                 bt_packets.PacketViewLittleEndian(
                     list(packet_bytes))))
         conn_handle = cc_view.GetConnectionHandle()
         return True
     return False
예제 #3
0
 def ConnectionCompleteCapture():
     return Capture(
         lambda packet: packet.payload[0:3] == b'\x03\x0b\x00',
         lambda packet: hci_packets.ConnectionCompleteView(
             hci_packets.EventPacketView(
                 bt_packets.PacketViewLittleEndian(list(packet.payload)))))
예제 #4
0
 def ConnectionCompleteCapture():
     return Capture(lambda packet: b'\x03\x0b\x00' in packet.event,
       lambda packet: hci_packets.ConnectionCompleteView(
                             hci_packets.EventPacketView(
                                 bt_packets.PacketViewLittleEndian(
                                     list(packet.event)))))