顺便说一句,还可以编写udev规则,这些规则根据串行端口所属的设备为串行端口建立符号链接.我不确定这对于具有6个串行端口的复合设备将如何工作,但是可能有一种使其起作用的方法.I am developing an embedded solution using C and I am working with two USB sensors. If I connect each sensor alone they take this names:Device 1 (I do not know why it takes 6 names...)/dev/ttyACM0/dev/ttyACM1/dev/ttyACM2/dev/ttyACM3/dev/ttyACM4/dev/ttyACM5/dev/ttyACM6Device 2/dev/ttyACM0So when I start as an embedded system and both sensors are connected, the fastest one takes /dev/ACM0 but it not always the same. So, when I try to read device 2 I could be reading device 1...I think that It would be great to change the default names of the sensors. I guess that it is going to be possible but I do not find anything. 解决方案 You should try using the names in /dev/serial/by-id instead, since those names include the name of the device and should not depend on the order of connection.By the way, it is also possible to write udev rules that make symbolic links for the serial ports depending on what device they belong to. I am not sure how that would work for a composite device with 6 serial ports, but there probably is a way to make it work. 这篇关于在Linux中更改USB虚拟串行端口的默认名称的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持! 上岸,阿里云!