Skip to content

fix: deploy.sh 串口自动检测支持 Linux(ttyACM/ttyUSB)+ 测试 + README - #21

Open
hisayya wants to merge 1 commit into
slvDev:mainfrom
hisayya:fix/linux-usb-serial-detect
Open

fix: deploy.sh 串口自动检测支持 Linux(ttyACM/ttyUSB)+ 测试 + README#21
hisayya wants to merge 1 commit into
slvDev:mainfrom
hisayya:fix/linux-usb-serial-detect

Conversation

@hisayya

@hisayya hisayya commented Aug 15, 2026

Copy link
Copy Markdown

Closes #20

deploy.sh 只匹配 macOS /dev/cu.usbmodem*,Linux 用户(ESP32 生态主流)插板必报错。修复:

  • find_port() 扫描 ttyACM/ttyUSB/cu.usbmodem/cu.usbserial
  • 新增 SerialPortIsAutoDetected 测试(fake ls 模拟两平台)
  • README 补 hf CLI 依赖与端口说明

验证:bash -n + unittest tests.test_deploy 29/29 通过。

deploy.sh only auto-detected the macOS Arduino path (/dev/cu.usbmodem*),
so Linux users (native USB CDC at /dev/ttyACM*, UART bridges at
/dev/ttyUSB*) had to set PORT manually or the script reported no port.

Scan both OS families with a find_port helper, keep the macOS paths for
regressions, and make the error message name every pattern checked.

Also document the hf CLI dependency that fetch_model.sh needs, which
the README previously omitted.

Tests: SerialPortIsAutoDetected stubs ls and verifies each family's port
is picked; all 29 deploy tests pass.
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.

fix: deploy.sh serial-port auto-detect only matches macOS paths, Linux users fail

1 participant