2
3
Fork
You've already forked HBtCaptureParser
3
No description
  • Java 47.1%
  • Python 36.2%
  • Shell 14.8%
  • Makefile 1.9%
2025年07月11日 22:55:55 +02:00
java_parser Add two files I forgot before 2025年07月11日 22:55:55 +02:00
lib Initial commit 2022年12月12日 15:20:51 +01:00
.gitignore Update and improve parser 2024年10月01日 12:58:31 +03:00
bootstrap.sh Update for newer version of GB 2025年07月11日 21:15:43 +02:00
copy.sh Update for newer version of GB 2025年07月11日 21:15:43 +02:00
Makefile Cleanup and split packet handlers 2024年12月15日 21:55:51 +01:00
parse.py Do not filter packets by 5a heading 2024年08月07日 16:13:00 +08:00
parse_rfcomm.py Update and improve parser 2024年10月01日 12:58:31 +03:00
parse_rfcomm_pyshark.py Update and improve parser 2024年10月01日 12:58:31 +03:00
README.md Update for newer version of GB 2025年07月11日 21:15:43 +02:00
requirements.txt Update requirements and readme 2024年07月19日 14:11:04 +02:00
rfcomm.py Add RFCOMM support 2023年01月21日 23:06:05 +01:00

Java parser

This uses the packet parsing code we implemented in Gadgerbridge to parse bluetooth pcaps. Last tested on commit c4ca8d6b3b2eba227a1b76ec1c54ea9d044a8eb9 from the master branch of Gadgetbridge.

There are a couple of steps to using this:

  1. Install the requirements for python pip install -r requirements.txt (I recommend using a virtual environment)

  2. Get the files from GB

    ./copy.sh [path to GB]
    ./bootstrap
    

    Also run these commands after cloning the repo.

  3. Pipe the output from parse.py (with the right arguments) to the Java application:

    ./parse.py [bluetooth.pcapng] [mac:address] | make run
    

    or

    ./parse_rfcomm_pyshark.py -i [bt.pcapng] -m [mac] -c [channel] | make run
    ./parse_rfcomm.py -i [bt.pcapng] -m [mac] -c [channel] | make run
    

    if the band uses RFCOMM

Also nice: pipe that to a file for easier reading (for example append | tee [file] on Linux).

Note on file format

The file format of the bluetooth.pcapng has to be supported by Scapy. Most notably, the btsnoop format is not supported. If encountered, it can easily be converted using Wireshark.