我在带有 AEOTEC Z-Stick Gen5 的 Raspberry Pi 4 GB 上运行 Home Assistant(标准 RPi 安装)。它连接到 USB 集线器,因为系统不会以其他方式使用它。 “某些东西”占据了串行端口,因此它被锁定,Z-Wave JS UI 无法使用它。
我收到这些消息,但无法弄清楚它被锁定的是什么。
2023-01-28 19:47:14.536 INFO Z-WAVE: Connecting to /dev/ttyAMA0
2023-01-29T03:47:14.538Z DRIVER version 10.4.0
2023-01-29T03:47:14.539Z DRIVER
2023-01-29T03:47:14.539Z DRIVER starting driver...
2023-01-29T03:47:14.542Z DRIVER opening serial port /dev/ttyAMA0
2023-01-29T03:47:23.550Z DRIVER Failed to open the serial port: Error Resource temporarily unavailable Cannot lock port
我查看了“lsof”输出,但没有看到 /dev/ttyAMA0 设备的提及。相反,我得到了一个列表93 道工序其中包括:
1 /package/admin/s6-2.11.1.2/command/s6-svscan 0 /dev/null
1 /package/admin/s6-2.11.1.2/command/s6-svscan 1 pipe:[19812]
1 /package/admin/s6-2.11.1.2/command/s6-svscan 2 pipe:[19813]
1 /package/admin/s6-2.11.1.2/command/s6-svscan 3 /run/service/.s6-svscan/lock
1 /package/admin/s6-2.11.1.2/command/s6-svscan 5 /run/service/.s6-svscan/control
1 /package/admin/s6-2.11.1.2/command/s6-svscan 6 /run/service/.s6-svscan/control
1 /package/admin/s6-2.11.1.2/command/s6-svscan 7 anon_inode:[signalfd]
15 /package/admin/s6-2.11.1.2/command/s6-supervise 0 /dev/null
15 /package/admin/s6-2.11.1.2/command/s6-supervise 1 pipe:[19812]
15 /package/admin/s6-2.11.1.2/command/s6-supervise 2 pipe:[19813]
15 /package/admin/s6-2.11.1.2/command/s6-supervise 3 /run/service/s6-linux-init-shutdownd/supervise/lock
15 /package/admin/s6-2.11.1.2/command/s6-supervise 4 /run/service/s6-linux-init-shutdownd/supervise/control
15 /package/admin/s6-2.11.1.2/command/s6-supervise 5 /run/service/s6-linux-init-shutdownd/supervise/control
15 /package/admin/s6-2.11.1.2/command/s6-supervise 6 anon_inode:[signalfd]
18 /package/admin/s6-linux-init-1.0.8.0/command/s6-linux-init-shutdownd 0 /dev/null
18 /package/admin/s6-linux-init-1.0.8.0/command/s6-linux-init-shutdownd 1 pipe:[19812]
18 /package/admin/s6-linux-init-1.0.8.0/command/s6-linux-init-shutdownd 2 pipe:[19813]
18 /package/admin/s6-linux-init-1.0.8.0/command/s6-linux-init-shutdownd 3 /run/service/s6-linux-init-shutdownd/fifo
.
.
.
这对我来说完全没有意义。更糟糕的是“定影器”什么也没有返回!
如何确定哪个进程实际上锁定了设备/串行端口?