Packet Logger

HCI PacketLog Converter for Sublime Text 3

BTstack can output application logs inlined with HCI traffic. We internally just call it HCI dump, and use this feature on a daily basis, whether we are just developing BTstack or need to analyze a reported issue.

BTstack’s HCI Dump functionality is quite flexible and can also be used on an embedded target with just a regular UART debug output or the faster SEGGER RTT.

The usual HCI dump form that we encounter with an issue report, a user email, or our own embedded development with SEGGER Ozone is text output. The text output can be stored and converted into a PacketLogger file (.pklg) for further analysis in Wireshark or Apple’s PacketLogger tool.

USB Protocol Analyzer for Bluetooth Communication Logging

When a Bluetooth use case doesn’t work as expected, it’s often very helpful to analyze the Bluetooth communication.

If one side is using BTstack, a good way for this is to just enable HCI Packet Log, convert the console output with the create_packet_log.py tool and then inspect it with Apple’s PacketLogger (macOS only) or Wireshark (any platform). By this, the debug output is captured in-line with the Bluetooth packets, which makes them much easier to analyze.