Returns the string representation of a raw HCI packet.
(pkt)
| 150 | |
| 151 | |
| 152 | def raw_packet_to_str(pkt): |
| 153 | """ |
| 154 | Returns the string representation of a raw HCI packet. |
| 155 | """ |
| 156 | if sys.version_info > (3, 0): |
| 157 | return ''.join('%02x' % struct.unpack("B", bytes([x]))[0] for x in pkt) |
| 158 | else: |
| 159 | return ''.join('%02x' % struct.unpack("B", x)[0] for x in pkt) |
| 160 | |
| 161 | |
| 162 | def enable_le_scan(sock, interval=0x0800, window=0x0800, |
no outgoing calls
no test coverage detected