Repository navigation
Conversation
The D1301's firmware accepts the same dual connections commands as the other multipoint models (0b01 device list, 0b84 enable, 0b81/0b82/0b83 disconnect/connect/forget) and dual connections works once enabled, but it neither reports the enabled flag (the state update packet is byte-identical with it on or off) nor keeps it after the earbuds fully power off. The common dual connections module is added to the D1301, and the D1301 adds: - the device list is always requested on connect, since the D1301 answers it even while dual connections is disabled - enabled is assumed when two devices are connected, otherwise off - the last value set through openscq30 is saved and, if it was on, sent again on connect The value is saved per device model in a new device_model_setting table (migration 1), for settings a device accepts but cannot report back or does not keep. SoundcoreDeviceBuilder::state_sender is added so a module can update state while the device is being built, and TestSoundcoreDevice::new_with_database so tests can reconnect with the same database. Tested on a Sleep A30 Special (firmware 01.07): enabling dual connections lets a second host connect alongside the first, and after disabling it behind openscq30's back, reconnecting sends 0b84 01 again and the earbuds acknowledge it. Co-Authored-By: Claude Opus 5.5 <[email protected]>
With two devices connected the D1301's dual connections is already shown as enabled, so setting it to on was not a change from the state and was never saved, and it was not reapplied after the earbuds were powered off. Compare against the saved value instead of the state. Co-Authored-By: Claude Opus 5.5 <[email protected]>
sanjaymalladi
added a commit
to sanjaymalladi/OpenSCQ30
that referenced
this pull request
Oct 13, 2026
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.
This change was found, tested and written by Claude on my machine, at my request. I'm not a developer; I'm submitting it because it may help other Sleep A30 owners. Happy for it to be reworked or closed if you'd rather do it differently.
What
Dual Connections for the Soundcore Sleep A30 (D1301): the common dual connections module (toggle, device list, connect/disconnect/forget), plus two D1301-specific pieces, because the A30 neither reports whether dual connections is enabled nor remembers it after powering off:
0b 01) is always requested. The A30 answers it even while dual connections is off, and the state update packet has no enabled flag to check first.0b 84 01is sent again on connect. It's compared against the saved value, not the state, because with two devices connected the state already shows enabled; a side effect is that changing any setting while two devices are connected saves "on".The value is saved per device model in a new
device_model_settingtable (migration1.sql), meant for settings a device accepts but can't report back or doesn't keep. Two small additions to shared code:SoundcoreDeviceBuilder::state_sender(), so a module can update state while the device is being built, andTestSoundcoreDevice::new_with_database, so tests can reconnect with the same database.Why
The A30's firmware (01.07) accepts the same
0x0bcommands as the multipoint models, and dual connections works once enabled (two hosts connected, audio from both), but neither the Soundcore app nor OpenSCQ30 exposes it for this model. Testing on a Sleep A30 Special:0b 01device listDualConnectionsDevicePacket, 2 packets0b 84 01/0001 00/00 000b 010b 81 <mac>disconnect00 00 00 00 01 01(… ff 1ffor an unknown MAC)0b 82 <mac>connect0b 02 00 <mac>0b 83 <mac>forgetUnknown commands get no reply at all, so these are implemented, not just ignored.
No read-back. With one host connected I toggled
0b 84six times and, after each toggle, read every command that replies (cmd00x00–0x1f ×cmd10x00–0x0f, plus0b 10–0b 7f; 26 reply). The01 01state packet was byte-identical across 11 consecutive toggles, and nothing else tracked the flag either. For comparison, the D1202 reportsdual_connections_enabledright afterLowBatteryPrompt; the D1301 has its unknown 67-byte block in that position, but nothing in it changes.Not persisted. The flag survives closing and opening the case, but was off again twice after the buds had been unused for several hours. With it off and one host connected, the A30 doesn't answer pages at all (
br-connection-page-timeout), so it has to be turned back on from the host that's connected.Testing
0b 84 01, re-applied on reconnect, re-applied when enabled while already on, and not re-applied after being turned off. I checked that the reconnect tests fail without the re-apply step and without the second commit's fix.cargo test -p openscq30-lib -p openscq30-cli: all pass.cargo fmt --checkis clean, and clippy shows the same 129 warnings before and after (none in changed code).dualConnections=true, turned it off behind OpenSCQ30's back, and reconnected. OpenSCQ30 sent0b 84 01again and the buds acknowledged it (01 00). Installing the build over 2.12.0 with my existing config migrated the database to version 2. That's where I found the second commit's bug: with my phone and laptop both connected, enabling wasn't saved. After the fix it is.Not tested
0b 83) on a real remembered host.Open questions
4C:A9:54:F6:B8:40appears as40:B8:F6:54:A9:4C). That's the existing shared parser and not changed here; I'm only mentioning it in case it's unintended.🤖 Generated with Claude Code