Experimental Python toolkit for inspecting and reverse engineering the AIREC smart voice recorder over BLE
Project description
airec
airec is an experimental Python toolkit for inspecting and reverse engineering the AIREC smart voice recorder over Bluetooth Low Energy.
It ships as both:
- a Python library for scripted inspection and offline analysis
- a command-line tool for scanning, probing, tracing, and decoding captured device data
The current scope is practical device investigation, not a polished general-purpose BLE SDK.
Installation
Install from a source checkout or built distribution with pip:
python -m pip install .
Once published to a package index, the install command will be:
python -m pip install airec
The package requires Python 3.12 or 3.13.
Contributor Setup
This repository uses uv for local development:
uv venv --python 3.12
uv sync --extra dev
Run tests with:
uv run pytest
Library Example
import asyncio
from airec import AirecClient, scan_devices
async def main() -> None:
devices = await scan_devices(timeout=5.0)
if not devices:
return
client = AirecClient(devices[0].address)
profile = await client.inspect()
print(profile.to_dict())
await client.disconnect()
asyncio.run(main())
The documented public API includes:
airec.AirecClientairec.scan_devices- exported protocol models such as
DeviceProfile,RecordingInfo, andStorageStatus - offline helpers such as
analyze_session_log,decode_session_log,decode_recording_download, andsummarize_pklg_trace airec.__version__
See docs/library-usage.md for a compact API guide.
CLI Example
After installation, the airec command is available:
airec scan --timeout 5
Some useful commands:
airec inspect <device-address>
airec survey <device-address> --duration 10
airec list-recordings <device-address>
airec download-recording <device-address> <recording-id>
airec trace-pklg documentation/BluetoothTraceFile.pklg
airec analyze artifacts/sessions/session.jsonl
Many commands support --json for structured output.
Platform Notes
- Live BLE operations use
bleak, so behavior depends on the local platform BLE stack. - macOS, Linux, and Windows are supported at the dependency level, but most device validation in this repository has been done on macOS.
- Several CLI commands intentionally exercise undocumented device behavior. Treat them as investigative tools, not stable end-user workflows.
macOS Bluetooth Permission
On macOS, CoreBluetooth can abort the interpreter if the host Python.app bundle does not declare NSBluetoothAlwaysUsageDescription in its Info.plist. This often affects Homebrew Python framework builds.
Before the first live BLE command, patch the active interpreter bundle:
python3.12 scripts/patch_macos_python_app_bundle.py
Then rerun the BLE command and macOS should prompt for Bluetooth access instead of crashing.
Project Status
This package is experimental and currently optimized for:
- discovering device services and characteristics
- capturing structured session logs from live experiments
- inspecting PacketLogger
.pklgtraces - reconstructing and decoding archived recording payloads
The README focuses on the supported package surface. Deeper reverse-engineering notes live separately:
License
MIT. See LICENSE.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file airec-0.1.0.tar.gz.
File metadata
- Download URL: airec-0.1.0.tar.gz
- Upload date:
- Size: 3.9 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.5.21
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
93167e8525b0292f2f247152bd9a4cc4a05f72b8b46647c1ed5205037e665ef3
|
|
| MD5 |
ed79edc3bed2a568514f6165867000cb
|
|
| BLAKE2b-256 |
38439190e64f7bea9245f63d3475d5fcf24baa28dc149baf560b128e038e94bc
|
File details
Details for the file airec-0.1.0-py3-none-any.whl.
File metadata
- Download URL: airec-0.1.0-py3-none-any.whl
- Upload date:
- Size: 33.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.5.21
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3b81af81b36be8c5c100dfa0cc78514a777f228d07ea529b5e2e257222cf9719
|
|
| MD5 |
1362394608d9b5d3a0cf0350ea507191
|
|
| BLAKE2b-256 |
f716e2bd951e80f26d391103f6d55a4537bd1ae1743edb61f33c686ab838e854
|