2016年6月20日 星期一



How to find the driver (module) associated with a device on Linux?


udevadm info -a -n /dev/sda | grep -oP 'DRIVERS?=="\K[^"]+' 
sd
ahci

arduino usb2ttl  ->   choose ch341 device driver


Ref : http://unix.stackexchange.com/questions/97676/how-to-find-the-driver-module-associated-with-a-device-on-linux


Have you ever wondered why some USB devices used /dev/ttyUSB0(or 1, or n) and others/dev/ttyACM0 (or 1, or n) when they are plugged into the host computer, while they seem to be acting asUART devices (RS-232-like) over USB in both cases? Have you wondered why example USB firmwares for microcontrollers always end up with names such as /dev/ttyACM0 and never as/dev/ttyUSB0?
Warning: this is a Linux specific post, although it also contains genuine pieces of USB culture.

Ref : https://www.rfc1149.net/blog/2013/03/05/what-is-the-difference-between-devttyusbx-and-devttyacmx/

沒有留言:

張貼留言