Exemplo n.º 1
0
 def ConnectionRequestCapture():
     return Capture(
         HciMatchers.EventWithCode(
             hci_packets.EventCode.CONNECTION_REQUEST),
         lambda packet: hci_packets.ConnectionRequestView(
             HciMatchers.ExtractEventWithCode(
                 packet.event, hci_packets.EventCode.CONNECTION_REQUEST)))
Exemplo n.º 2
0
 def get_connect_request(packet):
     if b'\x04\x0a' in packet.event:
         nonlocal connection_request
         connection_request = hci_packets.ConnectionRequestView(
             hci_packets.EventPacketView(
                 bt_packets.PacketViewLittleEndian(
                     list(packet.event))))
         return True
     return False
Exemplo n.º 3
0
 def ConnectionRequestCapture():
     return Capture(
         lambda packet: packet.payload[0:2] == b'\x04\x0a',
         lambda packet: hci_packets.ConnectionRequestView(
             hci_packets.EventPacketView(
                 bt_packets.PacketViewLittleEndian(list(packet.payload)))))
Exemplo n.º 4
0
 def ConnectionRequestCapture():
     return Capture(lambda packet: b'\x04\x0a' in packet.event,
       lambda packet: hci_packets.ConnectionRequestView(
                             hci_packets.EventPacketView(
                                 bt_packets.PacketViewLittleEndian(
                                     list(packet.event)))))