树莓派4B+安装Ubuntu Desktop for raspberry,其实是Ubuntu 22.04 LTS,今天发现连接带有USB-UART的数据链不识别,具体的现象就是/dev
目录下没有出现ttyUSB*
设备名称。
ls /dev/ttyUSB*
而通过lsusb
命令却又能查看得到。
通过sudo dmesg | ls tty*
最终看到了原因。
[150280.830991] usb 3-3: cp210x converter now attached to ttyUSB0
[150293.007369] usb 3-3: usbfs: interface 0 claimed by cp210x while 'brltty' sets config #1
[150293.111281] cp210x ttyUSB0: cp210x converter now disconnected from ttyUSB0
[150293.111303] cp210x 3-3:1.0: device disconnected
可以解释为:原本该设备连接到了ttyUSB0
端口,突然被一个叫brltty
的进程一脚踹掉了。。。
目测有很多人被坑,尤其是升Ubuntu到22.04并且还在学习arduino的。
可以先不管brltty
是什么进程,有人给出的方案就是卸掉,如brltty package disconnecting ttyUSB0 used for Arduino。更温和的处理方法就是禁用掉该服务。如reddit中这么做,因为直接卸掉会将某些依赖卸载掉:
Brltty
Introduction
BRLTTY is a background process (daemon) which provides access to the Linux/Unix console (when in text mode) for a blind person using a refreshable braille display. It drives the braille display, and provides complete screen review functionality. Some speech capability has also been incorporated.
转自 brltty.app