Files
story/docs/device-flasher-app-20261004.md
T
Codex Local bf1233d5df
ci / verify (push) Canceled after 0s
feat: expand companion platform, device controls, and memoir workflows
Add customer and operator login, BLE provisioning, device fleet controls, call memory, memoir generation, and refreshed family and maintenance portals. Include API contracts, migrations, firmware sources, tests, assets, and deployment documentation.
2026-10-08 10:06:44 +08:00

48 lines
3.1 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# EchoEar 烧录助手(Windows)
这是设备初始化与烧录工具的 Windows 图形界面,复用 `device_prepare.py` 和 `device_flash.py` 的校验、完整备份和分区写入流程。
## 交付与使用
本机交付位置:`E:\Codex\story\deliverables\echoear-flasher-20261004\EchoEarFlasher.exe`。
双击程序,选择维护后台下载的 `burn-in` JSON,确认 COM6 和 `B4:3A:45:16:34:A8`,保持默认的重新初始化模式,检查预览后开始。身份恢复模式保留设备应用固件,清理旧 Wi-Fi、语音凭据和运行状态,再写新工厂身份。
界面会显示出厂编号、平台地址、串口、预期 MAC 和写入区域。任何配置改变都会使已生成的预览失效。预览不打开串口;真实写入需要在界面确认目标与清理范围。进度按实际阶段显示;备份或校验失败会停止后续操作,不显示为成功。
完整固件模式使用配套构建目录,重写 Bootloader、分区表、应用、初始 OTA 选择、模型和显示资源,并清理旧运行配置。当前分发的是已有 `.28` 构建,尚未完成真机验收,清库后的身份恢复无需升级固件。
烧录成功后手动复位/断电重启,通过家庭端或小程序重新蓝牙配网并绑定老人。具体云端创建与配网流程见 [设备恢复说明](device-reinitialize-and-flash-20261004.md)。
## 环境
本机已有 ESP-IDF Python,程序会自动寻找;也可在高级设置选择解释器。依赖是 Python 3.10+、esptool 4.x/5.x、esp-idf-nvs-partition-gen 与 pyserial。本机验证版本为 Python 3.12、esptool 4.12.0、NVS 生成器 0.1.9、pyserial 3.5。
这是使用本机 Python 环境的原生 Windows 应用,分发目录应一起保留;它没有将 Python 运行时打包进 EXE。后台子进程隐藏运行,GUI 不显示设备密钥,不自动上传工厂材料或 Flash 备份。
## 源码与构建
- `firmware/echoear-platform-agent/tools/flash-app/EchoEarFlasher.cs`:C# WinForms 界面。
- `firmware/echoear-platform-agent/tools/flash_app_bridge.py`:JSONL 进程桥接、预览会话、冻结输入检查。
- `firmware/echoear-platform-agent/tools/flash-app/build-app.ps1`:使用系统 .NET Framework 编译器构建与按白名单打包,不安装 NuGet。
```powershell
Set-Location 'E:\Codex\story\platform\firmware\echoear-platform-agent'
.\tools\flash-app\build-app.ps1 -OutputDirectory 'E:\Codex\story\deliverables\echoear-flasher-20261004'
```
生成文件及完整 Flash 备份包含设备秘密,默认保存到程序指定的私有备份目录。源码/交付包不包含真实设备密钥。
## 验证
62 项 Python 测试通过(烧录引擎 40、初始化 6、界面桥接 16),19 项原生界面检查通过。真实 NVS 生成器及当前固件构建通过离线预览联调。界面已渲染检查,串口下拉、写入区域表、确认开关和后台入口正常显示。
离线 UI 自检不会启动桥接或访问硬件:
```powershell
.\EchoEarFlasher.exe --ui-smoke-test .\ui-test.json
.\EchoEarFlasher.exe --render-preview .\preview.png
```
本次没有创建线上设备、执行真实烧录或完成配网/通话验收。