Repository navigation
feat(lib): add support for the soundcore P42i (D1205) - #436
Open
R-Schulmann wants to merge 2 commits into
Open
R-Schulmann wants to merge 2 commits into
R-Schulmann wants to merge 2 commits into
Conversation
Author
|
Follow-up from additional testing on my P42i:
|
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
AI disclosure
Protocol analysis and implementation were done with Claude (Anthropic). I captured the
Bluetooth traffic from the official app, ran all hardware tests on my own P42i and
reviewed the changes.
Summary
Adds support for the soundcore P42i (D1205). Closes #336.
The serial number starts with
1205and the vendor RFCOMM UUID ends ind1205. The05 01info packet identifies the device asD1202internally, and apart from theequalizer block the state update packet follows the D1202 layout byte for byte, so the
module is modeled on
d1202. Differences:3rather than a noise canceling mode.03 8a: preset id, 6 zero bytes, filtercount, then per filter type, gain (dB), frequency (Hz) and Q as little endian f32.
Presets send the exact filter lists captured from the app, custom profiles send 8
peaking filters at 100–12800 Hz with Q 0.7. Unlike the D1203 in Add support for Soundcore Liberty 5 Pro (D1203) #414, the length
field includes the checksum, so the normal packet serializer works.
(8 × f32, kept while a preset is active), 6 unknown bytes, filter count and 8 filter
slots of 13 bytes padded with
0xff.10 81with0, not via the equalizerpacket like on the D1202.
Features
20 05), HearIDNote: on this device LDAC and dual connections are mutually exclusive. Enabling LDAC
restarts the earbuds and disables dual connections (observed in the official app).
Preset volume adjustments are only used for display and are calculated from the
preset's filters (RBJ biquads, assuming type 0/1/2 = low shelf/peaking/high shelf).
The device always receives the exact captured filter lists.
The preset names are translated from the German version of the Soundcore app
(Anker-Klangsignatur, Klarer Gesang, Kraftvoller Bass, Ruhig und beruhigend), so the
English app may use slightly different names. The preset ids are 0x0000–0x0003.
Testing
packet from Add support for Soundcore P42i #336. Preset, custom EQ, sound mode, spatial audio and button packets are
checked byte for byte against captures from the official app.
cargo test -p openscq30-libpasses, includingtest_set_all_settings.cargo fmtand
cargo clippyare clean for the new files.setting was set, read back over a new connection (fresh state update packet) and
restored: all ambient sound modes, NC level, wind noise, all presets, custom EQ,
buttons, all toggles and auto power off including
disabled. Battery levels matchthe official app.
Hardware test log (soundcore P42i, firmware 06.72, openscq30 CLI on SteamOS)
Each setting was set, then read back with a new connection (fresh state update packet),
then restored and read back again.
The device list for dual connections was also read correctly (4 devices with names),
omitted here for privacy.
If you'd like a Hearguard setting, I'm happy to add it in a follow-up.