Skip to main content

Headless HTTP + WebSocket control service for Uniden BC125AT and SR30C handheld scanners

Project description

bearpaw-daemon

Headless control and telemetry service for Uniden BC125AT and SR30C handheld scanners. Exposes an HTTP + WebSocket API designed as a first-class contract for any client that wants to drive a scanner — dashboards, kiosks, voice assistants, custom integrations.

The daemon's HTTP API (documented via OpenAPI at /openapi.json and /docs) is the public contract. Any consumer that speaks HTTP and WebSocket can use it.

Install

pip install bearpaw-daemon
# or
uv pip install bearpaw-daemon

Requires Python 3.10+. On Linux you'll need libusb-1.0 available at runtime; apt install libusb-1.0-0 covers it on Debian-family systems.

Running

bearpaw --print-example-config > config.yaml   # tune as needed
bearpaw --config ./config.yaml

The example config ships inside the package; --print-example-config writes it to stdout so you can pipe it to wherever you want.

The daemon starts on 127.0.0.1:8000 by default. Browse /docs for the live OpenAPI UI, or /openapi.json for the raw schema.

Generating typed clients

The OpenAPI document is the canonical contract. Generate clients with your tool of choice:

# Python
openapi-python-client generate --url http://localhost:8000/openapi.json

# TypeScript
npx openapi-typescript http://localhost:8000/openapi.json -o bearpaw.d.ts

Linux systemd installation

For a production Linux deployment (Debian, Ubuntu, Raspberry Pi OS, or any Debian-family host), use the installer:

git clone https://github.com/jeremyfuksa/bearpaw-daemon.git
cd bearpaw-daemon
sudo ./scripts/install-linux.sh

The installer is idempotent — safe to re-run after updates. It:

  1. Installs system packages (libusb-1.0-0-dev, python3-venv)
  2. Creates a scanner system user with dialout group membership (for /dev/ttyACM0 access)
  3. Installs the daemon into /opt/bearpaw/venv
  4. Creates /usr/local/bin/bearpaw as a wrapper pointing at the venv
  5. Seeds /etc/bearpaw/config.yaml from config.example.yaml (only if it doesn't already exist — your config is never clobbered)
  6. Installs the systemd unit and enables it (does not start it)

After install, edit /etc/bearpaw/config.yaml (at minimum, pick the right serial port for your scanner), then:

sudo systemctl start bearpaw
sudo journalctl -u bearpaw -f   # watch logs

To upgrade: git pull, then re-run the installer.

A Raspberry Pi (3 or newer) running Raspberry Pi OS is the typical deployment target, but nothing in the daemon or installer is Pi-specific — any Debian-family Linux box with a USB port and Python 3.10+ works the same way. For non-Debian distros, install libusb-1.0 and python3-venv (or equivalents) manually, then pip install bearpaw-daemon into a venv and adapt packaging/systemd/bearpaw.service to your paths.

Hardware and host notes

  • Scanner cable: USB-A to mini-B (BC125AT) or USB-C (SR30C).
  • PC mode: Some Uniden scanners need to be put into "PC/IF" mode manually before they accept serial commands. Consult your scanner's manual.
  • Permissions on Linux: The daemon needs read/write access to the scanner's serial device (typically /dev/ttyACM0). Either add your user to the dialout group or run via the systemd unit, which uses the scanner system user.
  • USB transport: USB transport is the default and preferred path on the BC125AT. Use transport: serial in config.yaml only if you have a specific reason.
  • ALSA discovery for audio consumers: arecord -l lists capture devices; the typical USB audio adapter shows up as hw:1,0.

Audio

The daemon does not stream audio. Scanner audio is hardware passthrough from the scanner's headphone jack to whatever you want — speakers directly, an ALSA loopback into another process, an Icecast encoder, etc. Consumers that want software-gated audio can subscribe to the squelch_open event on the WebSocket and gate their own pipeline.

API

OpenAPI docs are served at /docs when the daemon is running. Endpoints are grouped by tag (status, commands, memory, settings, analytics, preferences) for discoverability.

Config

See the full schema in src/bearpaw/config.example.yaml, or run bearpaw --print-example-config once installed.

Development

git clone https://github.com/jeremyfuksa/bearpaw-daemon.git
cd bearpaw-daemon
python -m venv .venv && source .venv/bin/activate
pip install -e .
pip install pytest pytest-asyncio pytest-cov ruff
pytest

See TESTING.md for the test layout and hardware-in-the-loop guidance.

License

MIT.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

bearpaw_daemon-1.4.0.tar.gz (57.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

bearpaw_daemon-1.4.0-py3-none-any.whl (60.3 kB view details)

Uploaded Python 3

File details

Details for the file bearpaw_daemon-1.4.0.tar.gz.

File metadata

  • Download URL: bearpaw_daemon-1.4.0.tar.gz
  • Upload date:
  • Size: 57.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for bearpaw_daemon-1.4.0.tar.gz
Algorithm Hash digest
SHA256 6fc34889e044ed521b0c249ef282c4363acceef897d2a8dd955dae3264de7d5d
MD5 5ab433dcb6c4d1c6772d7564241fa6b0
BLAKE2b-256 112aba6adf7586f1c60fe64b18873ae2959bfdc6af57a085d2902fea5c2ab186

See more details on using hashes here.

Provenance

The following attestation bundles were made for bearpaw_daemon-1.4.0.tar.gz:

Publisher: release.yml on jeremyfuksa/bearpaw-daemon

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file bearpaw_daemon-1.4.0-py3-none-any.whl.

File metadata

  • Download URL: bearpaw_daemon-1.4.0-py3-none-any.whl
  • Upload date:
  • Size: 60.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for bearpaw_daemon-1.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 7dac5e603bd5646f7335f6c939a498f680497d4313d9e7481a512f9ca0afb573
MD5 c3200f576497f46bb2c3338350585ac1
BLAKE2b-256 4b4726a74e1c7a6a72398074511e548501b7cb6fb2f4d21e896eaf9f59cabd70

See more details on using hashes here.

Provenance

The following attestation bundles were made for bearpaw_daemon-1.4.0-py3-none-any.whl:

Publisher: release.yml on jeremyfuksa/bearpaw-daemon

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page