Skip to content

Maintain DaiLing T3 core RCSP integration - #131

Draft
silverpoetry wants to merge 3 commits into
mainfrom
codex/pr129-dailing-maintenance
Draft

silverpoetry wants to merge 3 commits into
mainfrom
codex/pr129-dailing-maintenance

Conversation

@silverpoetry

@silverpoetry silverpoetry commented Nov 13, 2026 •

Copy link
Copy Markdown
Owner

范围

基于 Jgckm 的 #129 保留原提交 377e5819,整理戴灵 T3 的核心系统接入。当前主线 3.3.0 已同步;本维护版尚未合入,原 PR 保持开放。

保留认证、左右耳电量、降噪/关闭/通透和游戏模式。每项能力分别由合法设备状态开放。游戏开关复用现有原生三态扩展,保留标题、更多设置和容器尺寸;详细配置继续交给戴灵耳机 App。

维护调整

  • 移除双设备管理和待确认的深度控制;标准降噪只写模式,不额外指定默认深度。
  • 移除通用会话的型号判断、偏好注入与写入前持久化,以及临时放开的卡片绑定覆盖点;相应公共源码与 main 一致。
  • 认证按顺序组包,完整校验 02 pass;保留 ACK 后同次读取的 RCSP 数据,缓冲固定有界。
  • RCSP 接收验证长度和 EF 结束字节;状态解析限定已记录的命令、成功状态与完整 LTV,不扫描任意载荷片段。
  • 组件电量首次全未知保留系统回退,确认后全未知清理旧读数;三态和游戏状态独立确认,写后分别查询真实状态。
  • 只保留原作者记录的 insecure RFCOMM channel 1;SPP 不参与品牌判型,登记组使用戴灵品牌。
  • 补全游戏请求/状态的往返传递、控制 App 仲裁、目录、兼容性条目和协议文档;保留作者署名,并随源码/APK附带杰理 Apache-2.0 许可。

验证

本地编译与定向测试通过,覆盖认证、粘包/分片、错误结束标记、畸形属性、能力独立开放、旧电量清理、写后回读、会话重置、控制权禁用和序列化。三组认证向量与固定官方 SDK 提交交叉核对一致;Markdown、站内链接和 33 项控制 App 目录一致性检查通过。

38 项定向测试通过;完整 CI与官方签名构建均通过。最终维护提交 f7c9d38a989946e1d05f978e3a371b8574197f98,尚无实机复核,保持 Draft。

下载最终签名包(登录 GitHub 下载 ZIP,解压 APK)。APK SHA-256:271e0281ec331df8430db85785db4a36c34d39dacdc5e176cd21b501313734d0;已验证正式签名、文件校验和及随包 Apache-2.0 许可。

实机复核边界

  1. 首次连接、重连、完整认证与原始接收帧;原 PR 的部分接收样例未列出 EF,请确认完整流与帧定义一致。
  2. 左右耳电量与单耳未知清理;盒电量、充电标志继续保持未知。
  3. 三态实际效果与回读,重点确认标准降噪不附加深度命令时仍正常。
  4. 游戏状态查询、切换后的实际延迟和音频,以及卡片开关选中态。
  5. 卡片重开、更多设置、厂商 App 退避与退出后的恢复。

协议说明见 docs/dailing-t3-protocol.md。保留标准音量、流转和系统电量回退,不扩大其他型号的匹配、传输或 Hook 范围。

HyperEars Contributor and others added 3 commits November 11, 2026 07:40
Add a model adapter for the DaiLing T3 TWS earbuds, which expose a JieLi
RCSP control channel over the classic Bluetooth SPP service opened
insecurely on RFCOMM channel 1.

- Run the JieLi btcon device authentication before RCSP commands, then replay
  the five-read vendor initialisation burst; the capture-derived framing,
  battery report parsing and three-state noise attribute block are covered by
  codec tests.
- Port the authentication algorithm from the official Apache-2.0 WeChat
  mini-program OTA SDK and validate it against the SDK vectors.
- Expose the model-specific ANC depth (deep / middle / light) as a typed
  feature state and control request. The card extension appends a second row
  cloned from the native noise items and, while ANC is active, uses the
  trailing More Settings slot so the card keeps its native height.
- Add the low-latency game-mode switch (ADV-info settings command with the
  `02 05 <mode>` LTV record) and the dual-device switch (custom command
  `1A <0|1>`), both read back from device reports. Query the work mode on
  connect like the vendor app does, which avoids muting the headset on the
  first game-mode write after a restart.
- Persist the chosen ANC depth in the Bluetooth process data directory and
  apply it on the next connection instead of storing a second settings entry.
- Register the vendor control app for More Settings navigation and runtime
  yield, and document the protocol, evidence levels and pending revalidation.

Identification, component battery, three-state noise, game mode and
dual-device control were validated on hardware; ANC depth audibility still
needs device revalidation before merge.
…aries

Preserve the contributor's original commit and authenticated RCSP protocol facts.
Keep battery, three noise modes and an independently confirmed game-mode toggle.
Remove depth persistence, dual-device controls and model-specific runtime hooks.
Validate complete authentication, frame trailers and structured device reports;
read mode and work-mode state back through the existing transaction interface.
Include upstream authentication license and maintenance revalidation boundaries.

Co-authored-by: Jgckm <51497452+Jgckm@users.noreply.github.com>
@Jgckm

Jgckm commented Nov 14, 2026 •

Copy link
Copy Markdown

补充实机结论:维护包 f7c9d38a 在这台 T3 上认证到第二步就被拒——设备对 00 + 16 字节随机数直接回 01 + 16,而维护版的 CHALLENGE 阶段要求首字节为 00,于是触发 HandshakeRejected,三次重试后休眠。

用厂商 App 抓了一份 HCI,真实认证是两轮六个包:00 + 随机数 → 设备 01 + 16 → 02 pass → 设备 00 + 挑战 → 01 + 证明 → 02 pass。01 是第二轮的前导,不是拒绝。

已在分支 fix/dailing-t3-auth 上按抓包修改,并补充了文档与测试;实机验证握手通过,私有电量、三态和游戏模式均已发布,详见 #132。签名维护包出来后,仍需复核卡片层。

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