Skip to main content

Library for configuring the Astro A50 wireless headset and base station (generation 4)

Project description

eh-fifty

eh-fifty is a Python library for configuring the Astro A50 wireless headset and base station (generation 4).

Use at your own risk. eh-fifty was developed using reverse engineering. If you get into trouble, re-plug your base station and reset your headset by holding down the "game" and "Dolby" buttons together for 15 seconds.

eh-fifty has only been tested on Linux, although it may work on other platforms supported by PyUSB.

Features

  • get/set microphone level
  • get/set microphone EQ preset
  • get/set side tone volume
  • get/set noise gate mode
  • get/set alert volume
  • get/set active EQ preset
  • get/set EQ preset parameters
  • get/set game/voice balance
  • save configuration values
  • get charging status and battery level
  • get headset status
  • get EQ preset name
  • update firmware

Example

Retrieve the current battery charge:

from eh_fifty import Device

with Device() as device:
    battery_status = device.get_battery_status()
    print(f"Battery: {battery_status.charge_percent}%")

Resource Management

The Device class supports context management for automatic cleanup:

with Device() as device:
    # use device...
# kernel driver automatically reattached

For long-running applications, you can also manage the lifecycle manually:

device = Device()
try:
    while True:
        status = device.get_headset_status()
        # ...
finally:
    device.close()

Non-root access

Create a udev rule to allow non-root users to access the USB device:

echo 'SUBSYSTEM=="usb", ATTR{idVendor}=="9886", ATTR{idProduct}=="002c", MODE:="0666"' | \
    sudo tee /etc/udev/rules.d/50-astro-a50.rules

Re-plug your base station to apply the new rule.

Protocol Documentation

Requests

The first byte of a request is 0x02.

The second byte of a request is a request type (see below).

An optional request payload may follow, prefixed by the length of the payload in bytes, not including this byte.

Responses

The first byte of a response is 0x02.

The second byte of a response may be either:

  • 0x00 for "no response"
  • 0x01 for "error"
  • 0x02 for "success"

Unless the second byte represents "no response", the third byte of a response is the remaining length of the response measured in bytes, not including this byte.

Saved Values

Sending request type 0x61 will save the active configuration. Saved values can be queried separately from active values. This can be used by applications to implement an operation to revert to a saved configuration. Changes to the active configuration effect immediately; saving changes is not required.

Request Types

Type Description
0x03 unknown
...
0x54 returns headset power and dock status
0x55 unknown
...
0x61 save active values
0x62 set value of specified slider
0x63 set EQ preset gain
0x64 set noise gate mode
...
0x67 set active EQ preset
0x68 get value of specified slider
0x69 get EQ preset gain
0x6A get noise gate mode
...
0x6C get active EQ preset
0x6D set EQ preset name
0x6E get EQ preset name
0x6F set EQ preset frequency and bandwidth
0x70 get EQ preset frequency and bandwidth
0x71 set microphone EQ preset
0x72 get balance
0x73 set default balance
0x74 set auto shutoff timeout (ineffective)
0x75 set brightness (ineffective)
0x76 set alert volume
0x77 get default balance
0x78 get auto shutoff timeout
0x79 get brightness
0x7A get alert volume
0x7B get microphone EQ preset
0x7C get battery status
...
0x83 unknown (returns "slave timeout" error)
...
0xDA unknown
...
0xD6 unknown

Release Process

Bump the version in eh_fifty.py and run the following:

git commit -am "Bump version"
git tag "${VERSION}"
git push --tags
hatch build -t sdist
hatch publish

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

eh_fifty-0.3.0.tar.gz (6.9 kB view details)

Uploaded Source

Built Distribution

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

eh_fifty-0.3.0-py3-none-any.whl (7.2 kB view details)

Uploaded Python 3

File details

Details for the file eh_fifty-0.3.0.tar.gz.

File metadata

  • Download URL: eh_fifty-0.3.0.tar.gz
  • Upload date:
  • Size: 6.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.17 {"installer":{"name":"uv","version":"0.9.17","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for eh_fifty-0.3.0.tar.gz
Algorithm Hash digest
SHA256 2d6bb167bf07e8f6c469c91bad6ae246b056090604493fe1b29ee3e607dd228c
MD5 1b6fce8b8901587d94b56d875159aa54
BLAKE2b-256 d452389d221076772af2f8842ac6a07ce1f017225914f5006e0117bf294a39d1

See more details on using hashes here.

File details

Details for the file eh_fifty-0.3.0-py3-none-any.whl.

File metadata

  • Download URL: eh_fifty-0.3.0-py3-none-any.whl
  • Upload date:
  • Size: 7.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.17 {"installer":{"name":"uv","version":"0.9.17","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for eh_fifty-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 d34a671716fe5f093e0407e6505987ac9ef5f615aaccd1003d3a7e9493854ff2
MD5 19160a81a8f25808c3127079216c691d
BLAKE2b-256 248c3b32c2ab09493ededa232fb3e008eb475ca0db3629e29fbeb5d6560f46fe

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