Skip to content

Tooling Setup

A Linux machine with BlueZ 5.x is required. PipeWire is optional (only needed if you want to route audio through the headphones while capturing control traffic). The test environment for this project runs:

ComponentVersion
Kernel6.16.5-arch1-1 (Arch Linux)
BlueZ5.85
PipeWire1.4.10
liblc31.1.3-2 (LE Audio codec)

These ship with the bluez and bluez-utils packages on most distributions.

bluetoothctl — Device management, pairing, and connection. The primary interface for interactive Bluetooth work.

Terminal window
bluetoothctl

btmon — HCI traffic monitor and capture. Writes btsnoop-format files that Wireshark can decode.

Terminal window
sudo btmon -w captures/session-$(date +%Y%m%d-%H%M%S).btsnoop

hcitool — Low-level HCI commands. Useful for device scanning and link-level diagnostics.

Terminal window
hcitool -i hci1 scan

sdptool — SDP service browsing. Maps RFCOMM channels to their associated service UUIDs. Requires the bluez-deprecated-tools package on Arch Linux.

Terminal window
sdptool browse C8:7B:23:55:68:E8

Wireshark with its built-in Bluetooth dissectors handles btsnoop files. Open a capture file directly:

Terminal window
wireshark captures/session-20260202-134500.btsnoop

Filter to RFCOMM traffic with the display filter btrfcomm or to a specific channel with btrfcomm.channel == 14.

The tools/ directory in the repository contains purpose-built scripts for probing and interacting with the NCH700 over RFCOMM. All scripts use the Python standard library plus bluetooth (PyBluez) for socket operations.

ScriptPurpose
spp_probe.pyScans all RFCOMM channels and reports which ones accept connections
spp_interactive.pyOpens an interactive RFCOMM session for sending hex commands and viewing responses
channel_capture.pyConnects to multiple channels simultaneously and logs all received data
ch14_session.pyDedicated probe for channel 14 (ff55 protocol)
ch27_session.pyDedicated probe for channel 27 (fe03 protocol)
grab_ch14.pyFast reconnect script for channel 14, designed to catch the brief post-power-cycle window

The mcbluetooth MCP server (maintained in a sibling directory) provides tool-assisted device scanning, GATT service exploration, and BLE characteristic read/write. To register it with Claude Code:

Terminal window
claude mcp add mcbluetooth-local -- uv run --directory /path/to/mcbluetooth mcbluetooth

This is optional. All protocol research documented here was conducted using the BlueZ CLI tools and the Python scripts listed above.