排错
no USB serial device found; is the e-skin plugged in?
Section titled “no USB serial device found; is the e-skin plugged in?”- 确认 USB 线能传数据。有些线只能供电。
- 运行
eskin ports。没有输出说明系统没有创建串口。 - Windows 上接 190 mm 感应垫时,安装 CH340 驱动。
- Linux 上插入板子后看一下
dmesg。
several USB serial devices found, pass port= explicitly
Section titled “several USB serial devices found, pass port= explicitly”电脑上接了不止一个 USB 串口设备。用 --port 或 EskinReader(port=...) 指定传感器。
分不清哪个是传感器时:拔掉它运行 eskin ports,插回去再运行一次,多出来的就是。
no data from PORT within 1.0s
Section titled “no data from PORT within 1.0s”串口打开了,但没有收到任何字节。
- 这个端口可能是别的设备,参考上一节。
- 把板子拔下来重新插上再试。
- 不要改
baudrate。带串口芯片的板子只在 2 000 000 baud 下发数据。
Linux 上提示 Permission denied
Section titled “Linux 上提示 Permission denied”把当前用户加进拥有该端口的用户组,然后重新登录:
sudo usermod -aG dialout "$USER"画面转了方向,或者是镜像的
Section titled “画面转了方向,或者是镜像的”依次试 --rotate 0、1、2、3,见方向。
rotate 纠正不了镜像。遇到镜像请提 issue,并写明感应垫的型号。
空载时画面不是全黑
Section titled “空载时画面不是全黑”- 拿开所有载荷后重新校准:点页面上的 re-calibrate,或调用
reader.calibrate()。 - 个别感应点闪烁时调高阈值,例如
--threshold 100。
数值比触摸慢半拍
Section titled “数值比触摸慢半拍”阻塞模式下,你的循环比传感器慢,读到的是缓冲区里的旧帧。
读取之前调用 reader.flush(),或者改用后台模式。
resyncs 一直增长
Section titled “resyncs 一直增长”传感器和程序之间丢了字节。
- 换一根短的 USB 线,直接插电脑上的接口,不要经过 hub。
- 程序读串口太慢也会丢字节,改用后台模式。
启动时出现一两次是正常的:读取器是从一帧的中间开始接收的。
页面显示“disconnected, retrying…”
Section titled “页面显示“disconnected, retrying…””eskin viz 进程已经停了。到终端里看原因,然后重新启动。
读取线程停了
Section titled “读取线程停了”后台模式下查看 reader.error。常见原因是传感器被拔掉,或者另一个程序打开了同一个串口。