Skip to content

android: Add UV-Pro Bluetooth audio session - #111

Merged
punk-kaos merged 2 commits into
JS8Call-improved:masterfrom
doodlecomms:uvpro-2-audio-session
Oct 17, 2026
Merged

punk-kaos merged 2 commits into
JS8Call-improved:masterfrom
doodlecomms:uvpro-2-audio-session

Conversation

@doodlecomms

Copy link
Copy Markdown
Contributor

Part 2 of 3 for #62. Stacked on #110, so please review only the last commit.

Claude Code (Claude Opus 5.5) wrote this under my direction. I didn't write it and haven't reviewed it line by line, but I went through every change with Claude, I can explain what each part does, and I did all the hardware testing myself.

What
UvProSession is the link to the radio, modelled on QmxCatSession.
It sends a device-info request on the radio's control channel, then opens the audio channel. The radio won't stream audio until the first step is done; I found that on hardware.
Transmit: the radio has no PTT command. It keys when audio arrives and unkeys on an end-of-audio frame. Audio is dropped unless PTT is armed, and a 45 s watchdog releases PTT.
Receive: silence fills the gaps while the squelch is closed, so the engine's timing holds.
The protocol details come from HTCommander and benlink (both Apache-2.0); the code was written fresh. It needs only BLUETOOTH_CONNECT.

Test
Unit tests cover the framing, with no new warnings. Used on air in PR 3.

doodlecomms and others added 2 commits October 14, 2026 19:54
The BTECH UV-Pro carries its audio over Bluetooth as 32 kHz mono SBC,
and Android has no public SBC codec. Add a mono 8-subband encoder and
decoder, ported from HTCommander's Apache-2.0 SBC code (which follows
libsbc), with unit tests. Not used yet.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Connect to the radio's "BS AOC" RFCOMM audio service, decode received
SBC audio, and send transmit audio. The radio only streams audio while
an app is also connected on its control channel, so a device-info
request is sent there first. It has no PTT command: it keys on incoming
audio and unkeys on an end-of-audio frame. Transmit audio is dropped
unless PTT is armed, and a 45 s watchdog releases it. Protocol details
from HTCommander and benlink. Not wired in yet.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@doodlecomms doodlecomms changed the title Add UV-Pro Bluetooth audio session android: Add UV-Pro Bluetooth audio session Oct 15, 2026
@punk-kaos
punk-kaos merged commit 791d78f into JS8Call-improved:master Oct 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants