Skip to content

Add DaiLing T3 (JieLi RCSP) adapter with card extension - #129

Draft
Jgckm wants to merge 1 commit into
silverpoetry:mainfrom
Jgckm:feat/dailing-t3
Draft

Jgckm wants to merge 1 commit into
silverpoetry:mainfrom
Jgckm:feat/dailing-t3

Conversation

@Jgckm

@Jgckm Jgckm commented Nov 10, 2026

Copy link
Copy Markdown

Summary

新增戴灵 T3 具体型号适配:杰理 RCSP 设备认证 + 初始化、左右耳组件电量、三态噪声控制,
以及三项型号专属控制(降噪深度三档、游戏模式、双设备开关)。

原因:T3 的厂商 App 独占 SPP 私有通道,HyperEars 需要同源协议才能接管电池/降噪等接入能力。
卡片扩展复用 MiLink 原生控件:清除装饰性「噪声控制」标题放入两个原生开关,降噪激活时
占用尾部「更多设置」槽位显示深度三档行,卡片保持原生高度、不滚动。

Scope and impact

  • integration:新增 DailingT3Adapter、DailingAncDepth(特征/请求),注册杰理品牌组;
    新增「戴灵耳机」控制 App。

  • protocol/jieli:RCSP 帧编解码、btcon 认证、ADV 信息与自定义命令。

  • system-module:卡片扩展、深度档位持久化(蓝牙进程数据目录)、控制 App 作用域同步。

  • 共享代码改动保持最小:请求序列化注册 +1 行、适配器注册 +2 行、卡片注册 +1 行、
    宿主扩展点由 bind 改为 open(1 词)、会话注入/持久化 +34 行。

  • 详细设备配置仍在厂商 App 内,HyperEars 只提供 MiLink 接入所需控制。

  • This change follows the project scope; detailed configuration remains in vendor control apps

Evidence

  • 实机 HCI 抓包(厂商 App v1.0.36 驱动戴灵 T3,杰理 AC697 固件),帧字节逐条核对:
    帧格式、初始化序列、设备信息、电量、三态噪声、深度、游戏模式、双设备。
  • 认证算法移植自杰理官方 Apache-2.0 小程序 OTA SDK(jl_auth_2.0.0.js),
    已用 SDK 向量逐字节校验;出处登记于 THIRD_PARTY_NOTICES.md。
  • 协议与证据边界:docs/dailing-t3-protocol.md。

Validation

  • testDebugUnitTest
  • :system-module:lintRelease
  • :system-module:assembleRelease
  • Hardware validation, when behavior changes on a physical headset
  • For a maintained device PR: the final maintenance version has received device revalidation;
    本 PR 为新型号,不适用
  • Logs, screenshots and Bluetooth addresses are redacted
  • Documentation and compatibility status are updated
  • If controller apps changed: catalog、Adapter 声明、scope.list、测试与 docs/control-apps.md 已同步

实机确认:识别、RCSP 认证、初始化、左右耳电量、三态噪声读写与卡片回读、游戏模式
(切换后音频正常、延迟生效)、双设备开关读写与状态跟随。

Risks and rollback

  • 卡片扩展依赖 MiLink 原生视图结构(按 id 与文案回退定位),HyperOS 大版本变化时可能失效;
    失效时扩展跳过绑定,不影响原生三态与电量。
  • 双设备状态跟随设备周期上报:未实际接入第二台设备时,开关可能显示为关。
  • 深度档位持久化在蓝牙进程数据目录;清除应用数据后回到首次默认深度。
  • 降噪深度听感差异仍待实机复核(PR 保持 Draft,复核后转正)。
  • 回滚:撤销该提交即可,不改变共享行为。

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.
@silverpoetry

Copy link
Copy Markdown
Owner

@Jgckm 谢谢提供认证、初始化和实机协议资料。我保留了你的原提交,按项目的核心集成范围整理了一份独立维护版:#131。原 PR 继续保留,维护版等待你对最终包复核后再合入。

下载官方签名维护包 f7c9d38a(登录 GitHub,下载 ZIP 后解压 APK)。签名与正式版一致,文件名为 HyperEars-v3.3.0-f7c9d38a-signed.apk,请认准其中的提交号。本版不在刚发布的 3.3.0 正式包中。

这次保留设备认证、左右耳电量、三态控制和游戏模式,主要整理了以下部分:

  • 卡片与范围:游戏开关复用已有原生三态扩展,保留标题与“更多设置”。双设备管理和深度设置留在戴灵 App,移除文字扫描、替换更多设置槽位、通用会话中的型号偏好保存。普通降噪只发送模式命令,保留耳机自身的深度选择。
  • 认证与帧边界:原认证分支遇到以 02 开头的五字节包就会完成认证,现改为校验完整 02 70 61 73 73 和顺序。接收解码器原来未等待或检查末尾 EF,现要求完整帧并使用固定上限缓冲;成功 ACK 后同一次读取中的 RCSP 数据也继续处理。
  • 状态证据:原噪声解析在任意载荷中搜索属性片段,游戏解析也没有完整应答校验。现在限定命令、成功状态和完整 LTV,电量、三态、游戏分别确认;写后查询实际模式和工作模式,不以写入成功或其他回包代替状态回读。
  • 资源与贡献记录:控制 App、作用域、包可见性、兼容性清单和来源统一补齐,保留原始提交并补充你的 GitHub 贡献署名。认证算法继续使用你的移植,三组向量与固定版本官方 SDK 一致,Apache-2.0 许可已随源码和 APK 保留。

本地 38 项定向测试、完整 CI和官方签名构建均通过。接下来主要请确认这份维护包:

  1. 首次连接与重连是否正常,左右耳电量、单耳入盒后的未知状态是否正确;
  2. 三态实际听感与回读是否一致,尤其确认只写模式、不附加深度命令时降噪是否正常;
  3. 游戏开关是否在状态查询后出现,切换后的选中态、延迟及音频是否正常;
  4. 卡片重开、更多设置,以及厂商 App 退避与手动停止后的恢复。

原 PR 的部分接收示例未列出 EF,测试向量目前按帧定义补齐,因此也请保留完整接收日志核对实际边界;如果有不同布局,直接提供对应回包即可,我们在这个分支继续处理。

覆盖安装后重载蓝牙与 MiLink 作用域,开启 HyperEars“调试 → 详细日志”,在 LSPosed 关闭“禁用详细日志”、开启“输出日志到守护进程”,复现后选择“导出日志”。不用再制作独立测试程序。

具体实现和验证边界见维护分支的 协议说明,设计要求见项目范围和贡献指南。感谢继续帮忙验证。

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