[英]USB Serial driver in Linux and device name
My device is a USB serial device. 我的设备是USB串行设备。 When I plug in, the cdc_acm.ko driver detects it and a node is created under /dev/ with the device name as ttyACM0.
当我插入时,cdc_acm.ko驱动程序将检测到它,并在/ dev /下创建一个节点,其设备名称为ttyACM0。 When I do a soft reset, the device appears with the name ttyACM1.
当我进行软重置时,该设备将以名称ttyACM1出现。 Where can I get the information regarding the device name [under /proc/ or /etc].
我在哪里可以获得有关设备名称的信息(在/ proc /或/ etc下)。 Currently I am relying on dmesg to detect the device name.
目前,我依靠dmesg来检测设备名称。 Once I intend to automate it, I would like to know where I can get the device name information.
一旦我打算自动化它,我想知道在哪里可以获得设备名称信息。
use /proc/devices for reading major number and device name information. 使用/ proc / devices读取主要号码和设备名称信息。
a sample output is attached. 附带了示例输出。
useer@useer-VirtualBox:~$ cat /proc/devices
Character devices:
1 mem
4 /dev/vc/0
4 tty
4 ttyS
5 /dev/tty
5 /dev/console
5 /dev/ptmx
5 ttyprintk
6 lp
7 vcs
10 misc
13 input
Left side integers are major number of the corresponding devices. 左侧整数是相应设备的主要数字。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.