cd /news/hardware/switch-creative-bt-w5-between-aptx-a… · home topics hardware article
[ARTICLE · art-9936] src=gist.github.com ↗ pub= topic=hardware verified=true sentiment=· neutral

Switch Creative BT-W5 between AptX Adaptive Low Latency and High Quality modes

This article provides a Python script that allows users to switch the Creative BT-W5 Bluetooth audio dongle between AptX Adaptive Low Latency and High Quality modes. The script, which was reverse-engineered from Creative's Windows desktop app, sends specific configuration data arrays to the USB dongle to toggle between the two modes. It is designed for use with AptX Adaptive-compatible headphones, such as the Tranya X3, and requires either sudo privileges or adjusted USB device permissions to run.

read1 min views25 publishedJan 6, 2024

btw5-switch.py

  This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.

Learn more about bidirectional Unicode characters

Show hidden characters

#!/usr/bin/env python3

#

#

import sys

import usb.core  # requires PyUSB (e.g. via `apt install python3-usb` on Debian)

dev = usb.core.find(idVendor=0x041e, idProduct=0x3130)

if dev is None:

    raise ValueError('Device not found')

cfg = dev[0]

intf = cfg[(0, 0)]

ep = intf[0]

i = intf.bInterfaceNumber

if dev.is_kernel_driver_active(i):

    dev.detach_kernel_driver(i)

data_hq = [0x03, 0x5a, 0x6b, 0x03, 0x0a, 0x03, 0x40]  # HQ

data_ll = [0x03, 0x5a, 0x6b, 0x03, 0x0a, 0x03, 0x20]  # LL

if len(sys.argv) > 1 and sys.argv[1] == "hq":

    data = data_hq

    print("Enabling AptX Adaptive High Quality mode")

else:

    data = data_ll

    print("Enabling AptX Adaptive Low Latency mode")

data += [0x00] * (65 - len(data))

result = dev.ctrl_transfer(0x21, 0x09, wValue=0x203, wIndex=0x00, data_or_wLength=data)
── more in #hardware 4 stories · sorted by recency
── more on @creative bt-w5 3 stories trending now
sponsored brought to you by zahid.host 4,200+ EU-deployed projects
reading about agents? ship yours in a single git push.

Run your AI side-project on zahid.host

EU-based hosting, git-push deploys, automatic HTTPS, no cold starts. Free tier with a custom domain — perfect for shipping the agent you just read about.

$git push zahid main
Live at https://your-agent.zahid.host
Get free account → Pricing
from €0/mo · no card required
LIVE [news/switch-creative-bt-w…] indexed:0 read:1min 2024-01-06 ·