4

I'm trying to debug a bluetooth low energy device. So I activated "Bluetooth HCI Snoop Log" in the developer settings on my smartphone.

The device, a Huawei mate 10 lite, doesn't create the log file. That's why I had to download the log with the bugreport.

--- BEGIN:BTSNOOP_LOG_SUMMARY (262100 bytes in) ---

--- END:BTSNOOP_LOG_SUMMARY ---

To get the log from the bugreport I have to run btsnooz.py, but btsnooz has an error in

def type_to_hci(type):
  """
  Returns the HCI type of a packet given its btsnooz type.
  """ 
  if type == TYPE_OUT_CMD:
    return '\x01'
  if type == TYPE_IN_ACL or type == TYPE_OUT_ACL:
    return '\x02'
  if type == TYPE_IN_SCO or type == TYPE_OUT_SCO:
    return '\x03'
  if type == TYPE_IN_EVT:
    return '\x04'

which results in a damaged/corrupted logfile:

(btsnoop: File has 167772160-byte-packet, bigger than maximum of 262144)

Adding a default return to type_to_hci doesn't help, has anyone an idea how to fix this?

Community
  • 1
  • 1
RelaX
  • 41
  • 3

0 Answers0