#bluetooth #parser #logs #packet

btsnoop

This library provides parsing capabilities for btsnoop logs

3 unstable releases

0.2.1 Oct 3, 2023
0.2.0 Feb 10, 2023
0.1.0 Jan 28, 2023

#1633 in Parser implementations

Download history 7/week @ 2024-02-19 8/week @ 2024-02-26 9/week @ 2024-03-11 52/week @ 2024-04-01

61 downloads per month
Used in btsnoop-extcap

MIT license

14KB
171 lines

Btsnoop parser library for Rust

Build status Crates.io Docs.rs

This library provides parsing capaibilities for btsnoop logs.

[dependencies]
btsnoop = "0.2.1"

Example

use btsnoop::parse_btsnoop_file;

let btsnoop_bytes: &[u8] = include_bytes!("btsnoop_hci.log");
let file: btsnoop::File = parse_btsnoop_file(btsnoop_bytes).unwrap();
for packet in file.packets {
    println!("Packet={:x?}", packet.packet_data);
}

File sources

  • btsnoop can parse files generated by Android and btmon.
  • See the subproject btsnoop-extcap for a Wireshark extcap plugin that can stream the HCI logs live from a rooted Android device.

References

Dependencies

~2.5MB
~53K SLoC