Skip to main content

A unified library for controlling various radio devices (receivers and transceivers)

Project description

Radio Manager

A unified Python library for controlling various radio devices including receivers, scanners, and transceivers.

Supported Radios

Uniden

  • SDS200 - Digital scanning receiver (serial and network) ✓ Tested
  • BCD996P2 - Analog/digital scanner (serial) ✓ Tested
  • SDS100 - Digital scanning receiver (coming soon)
  • BCD536HP - Handheld scanner (coming soon)

Motorola

  • XPR4350 - UHF transceiver with GPIO control (planned)

Installation

Recommended: pipx (for CLI usage)

pipx is the recommended way to install command-line tools on Ubuntu 24.04+ and other modern Linux systems:

# Install pipx if you don't have it
sudo apt install pipx
pipx ensurepath

# Install radio-manager
pipx install /home/tomn2tsr/dev/personal/radio-manager

# Or for development (editable install)
pipx install -e /home/tomn2tsr/dev/personal/radio-manager

# Use the rmgr command anywhere
rmgr list-radios
rmgr set-volume 8

Local Development Installation (library usage)

For development or if you need to use it as a Python library:

cd radio-manager
python3 -m venv venv
source venv/bin/activate
pip install -e .

From PyPI (when available)

pipx install radio-manager  # For CLI usage
# or
pip install radio-manager   # For library usage in your own projects

Quick Start

  1. Create a radios.yaml file (see below)
  2. Call the rmgr command

Command Line Interface (rmgr)

The easiest way to control your radios is via the rmgr command:

# List configured radios
rmgr list-radios

# Control the default radio
rmgr set-volume 8
rmgr get-volume
rmgr status
rmgr reboot
rmgr stream-audio

# Or specify a specific radio
rmgr set-volume --radio bcd996p2 5
rmgr status --radio sds200_serial

Configuration File

Create a radios.yaml file in one of these locations (in priority order):

  1. ./radios.yaml (current directory)
  2. ~/.config/radio-manager/radios.yaml
  3. Or specify with --config /path/to/radios.yaml

Example radios.yaml:

# Optional: Set a default radio
default_radio: sds200_desk

radios:
  sds200_desk:
    type: sds200
    host: 192.168.1.23
    port: 50536

  bcd996p2:
    type: bcd996p2
    ser_port: /dev/ttyACM1
    baudrate: 115200

See radios.yaml.example for more examples.

Python Library

Uniden SDS200

Serial Connection

from radio_manager.uniden import SDS200

# Connect via USB/serial
scanner = SDS200({
    'ser_port': '/dev/ttyACM0',
    'baudrate': 115200
})

with scanner:
    # Get status
    status = scanner.get_status()
    print(f"Current channel: {status['channel']}")

    # Control volume
    scanner.volume = 15
    print(f"Volume set to: {scanner.volume}")

Network Connection

from radio_manager.uniden import SDS200

# Connect via network
scanner = SDS200({
    'host': '192.168.1.1',
    'port': 50536
})

with scanner:
    status = scanner.get_status()
    print(f"Scanner status: {status}")

Uniden BCD996P2

from radio_manager.uniden import BCD996P2

# Connect via USB/serial
scanner = BCD996P2({
    'ser_port': '/dev/ttyACM1',
    'baudrate': 115200
})

with scanner:
    # Get status
    status = scanner.get_status()
    print(f"Firmware: {status['firmware']}")
    print(f"Mode: {status['scanner_mode']}")

    # Control volume (0-15 for BCD996P2)
    scanner.volume = 8

Development Status

This library is in early alpha development. APIs may change.

License

MIT License - see LICENSE file for details

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

radio_manager-0.2.1.tar.gz (27.3 kB view details)

Uploaded Source

Built Distribution

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

radio_manager-0.2.1-py3-none-any.whl (29.5 kB view details)

Uploaded Python 3

File details

Details for the file radio_manager-0.2.1.tar.gz.

File metadata

  • Download URL: radio_manager-0.2.1.tar.gz
  • Upload date:
  • Size: 27.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for radio_manager-0.2.1.tar.gz
Algorithm Hash digest
SHA256 daf95bf91eca0cea721f71094e21eda8d7ce8b4c7c3c3686ae2d843c1b288dea
MD5 273646db41118f78cdc3d05996bad9a1
BLAKE2b-256 25870c8e8b9f3f8912ac7b5a3701b9ece2be78fccb31d5c70e89e259a9acce7a

See more details on using hashes here.

File details

Details for the file radio_manager-0.2.1-py3-none-any.whl.

File metadata

  • Download URL: radio_manager-0.2.1-py3-none-any.whl
  • Upload date:
  • Size: 29.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for radio_manager-0.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 5028b233d8e94e57a1b3f498c25bbc8f864ae380a9f3ace157b8f8d1aa11d262
MD5 aeb73a9338dd19750f554a89fe0471cc
BLAKE2b-256 78f2e45941edaf389b073d526aa727a416cc38cfb09bcb33a6d16f3b65be6516

See more details on using hashes here.

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