DiPlay 0.2.15 private beta 有线断联反馈报告
- 反馈日期:2026-10-08
- DiPlay 版本:0.2.15 private beta
- 认证类型:local experimental beta identity; no remote fallback
- iPhone:iPhone14,2(iPhone 13 系),airplay=760.20.1(≈iOS 18.x)
- 受影响设备(两台,跨品牌跨 Android 版本):
- HUAWEI BAH2-AL10(Android 9 / API 28 / hi6250 / 1920x1200)
- Xiaomi M2105K81AC elish(Android 13 / API 33 / qcom / 2560x1600)
1. 问题概述
USB 有线连接时,iAP2 认证每次都通过、AirPlay 会话能够完整建立(视频首帧+音频正常),但会话运行数秒至数十秒后(实测 6s / 15s / 24s / 65s,间隔不规律),iPhone 端直接 TCP 关闭 AirPlay 控制连接,无任何协议级终止指令,随后自动重连并再次认证通过,形成循环。
两台不同 SoC、不同 Android 版本的设备,断联日志逐字符相同 → 断联行为由 iPhone 端(iOS 18.x)统一发起,与安卓端实现、设备硬件、USB 线材均无关。
2. 复现步骤
- iPhone(iOS 18.x)通过 USB 数据线连接安卓设备;
- 在 DiPlay 0.2.15 启动有线连接(USB 权限 → 重枚举 → iAP2/USBMUX → 认证);
- 观察到 AirPlay 会话建立、视频首帧渲染、音频正常播放;
- 数秒至数十秒后(不固定),iPhone 端主动关闭控制连接,App 自动重连;
- 重连后认证再次通过,会话再次建立,随后再次被终止(循环)。
3. 跨设备一致性证据(关键)
| 断联特征 | HUAWEI BAH2 | Xiaomi elish |
|---|---|---|
| 关闭指令 | airplay control closing reason=control I/O failed: Socket closed | airplay control closing reason=control I/O failed: Socket closed |
| 关闭时流 ID | activeStreams=[100, 110] | activeStreams=[100, 110] |
| 协议级终止指令(0x43xx) | 无,直接 TCP 关闭 | 无,直接 TCP 关闭 |
| 断开后残包错误 | AirPlay transport error: Invalid NTB16 short-packet pad | AirPlay transport error: Invalid NTB16 short-packet pad |
| 断开后 USB/iAP2 物理通道 | 正常(iAP2 0x5001 每 0.45s 持续到达) | 正常(重连后 1.5s 内 IAP2 READY) |
| 断开后重新认证 | 可再次认证通过 | 8s 内 iap2 authentication accepted |
说明:上表两列日志行逐字符一致,跨设备可复现。
4. 关键日志片段(原文)
4.1 华为 BAH2(30fps 锁定向后)
airplay control closing reason=control I/O failed: Socket closed activeStreams=[100, 110]
AirPlay session ended peer=[ip]
AirPlay session ended; reconnecting from scratch
AirPlay transport error: Invalid NTB16 short-packet pad
断开前兆:iPhone 端停发数据约 1 秒(maxGap≈1000ms、readMaxMs≈1000ms、rx 从 28fps 掉到 10.2fps),随后直接 TCP 关闭。断开后 iAP2 消息仍持续到达,USB 物理链路健康。
4.2 小米平板 elish(USB 有线,VPN 问题修复后)
22:20:48.749 IAP2 READY [wired] ready=true
22:20:50.795 wired iap2 authentication accepted
22:20:52.791 wired iap2 rx=0x4300 carplay-availability
22:20:52.793 wired iap2 tx=0x4301 carplay-start-session
22:20:59.143 AirPlay session active controller=[identifier] peer=[ip]
22:20:59.930 Video: first frame rendered
(22:21:04–22:21:20 视频 83–151 包/5s、LPCM 48kHz 音频持续正常、无丢包)
22:21:23.079 airplay control closing reason=control I/O failed: Socket closed activeStreams=[100, 110]
22:21:23.098 AirPlay session ended peer=[ip]
22:21:23.181 AirPlay transport error: Invalid NTB16 short-packet pad
22:21:31.504 wired iap2 authentication accepted ← 8 秒内再次认证通过
4.3 对照组:同一 iPhone 无线路径(小米平板,成功)
21:56:50.914 wireless iAP2 CSM channel opened over RFCOMM
21:56:51.083 IAP2 READY [wireless-rfcomm] ready=true
21:56:51.597 iap2 authentication accepted
21:56:53.172 AirPlay session active
21:56:54.379 Video: first frame rendered
无线路径(蓝牙 RFCOMM 认证/控制 + Wi-Fi 热点数据)可正常运行,无上述断联。
已排除的变量
❌ 安卓设备端实现:两台设备(华为 hi6250 / 小米 qcom,Android 9 / 13)断联日志逐字符相同,排除设备相关
❌ USB 线材/供电:USB 枚举、USBMUX、NCM、iAP2 全程健康;断开后 iAP2 消息仍持续,排除物理链路
❌ 认证拒绝:认证每次 100% 通过,iPhone 在终止后数秒内再次接受新认证
❌ 视频/音频传输质量:断开前视频 27–29fps 稳定、LPCM 音频无丢包无卡顿
❌ 60fps/旋转等次要因素:锁定向 + 30fps 后仅延长会话寿命(7s → 65s),断联模式不变
6. 推测
iPhone(iOS 18.x)在会话运行中期主动终止 CarPlay 控制会话,间隔不规律、无协议级终止指令,疑似与 local experimental beta identity 的会话期复核/清退机制相关。无线路径(iAP2 over RFCOMM + Wi-Fi)不受影响,有线路径(iAP2 over USBMUX + NCM/VPN)被终止,两者差异点可作排查线索。
7. 请开发者协助的方向
- 0.2.15 使用的实验性 MFi 身份是否为已知会被 iOS 会话中期清退的类型?
- 是否有更新的认证资产或其他身份可供测试?
- 无线(RFCOMM)与有线(USBMUX/NCM-VPN)两条控制/数据通路的差异,是否可能与 iOS 端终止行为相关?
- 如需更多日志、复现数据或参与测试,可随时联系提交者。
8. English Summary
Bug: Wired CarPlay sessions are terminated by the iPhone mid-session in DiPlay 0.2.15 private beta.
- Devices: HUAWEI BAH2 (Android 9), Xiaomi elish (Android 13); iPhone 13-series, airplay=760.20.1 (iOS 18.x).
- Symptom: iAP2 authentication always succeeds; AirPlay session starts, first frame renders, audio (LPCM 48kHz) plays fine. After 6–65s (irregular), the iPhone closes the AirPlay control TCP connection directly — no protocol-level termination — then reconnects and re-authenticates successfully, looping.
- Cross-device evidence: The closing lines are byte-identical on both devices:
airplay control closing reason=control I/O failed: Socket closed activeStreams=[100, 110] followed by AirPlay transport error: Invalid NTB16 short-packet pad.
- Excluded: USB link (iAP2 keepalives continue after close), cable, authentication rejection (re-accepted within seconds), media quality (no drops before close).
- Note: The wireless path (iAP2 over Bluetooth RFCOMM + Wi-Fi hotspot) on the same iPhone works fine, which may help isolate the cause.
- Suspicion: iOS terminates sessions using the "local experimental beta identity" mid-run. Any updated identity assets or guidance would be greatly appreciated.