Quote:
Originally Posted by maphacker
Hi guys:
I am having some problems with the USB ports. Some people said when you hot plug a device into USB port, under /dev will appear a ttyUSB*. But for my laptop, no matter what device I plug into the USB port(say a flash drive). There are only bunch of usbdev1.1_ep00, usbdev1.2_ep00, usbdev1.3_ep00 and usbmon* files, but not any ttyUSB*? Can anyone explain why?
So,I guess what I want to know is what is the difference between ttyUSB and usbdev1.1_ep00 files?
Thanks,
Yang
|
Well, all of the /dev entries (
most of them) are nodes created with numeric codes which the kernel knows how to coordinate with I/O addresses and channels in the physical computer.
Usually, when you hook up a USB device, a log entry will appear in /var/log/messages. So, for example, if I hook up a USB hard drive and then tail the messages file . . .
Code:
Every time I think I know where it's at, they move it.
adam@hydra5:~$ tail /var/log/messages
Apr 11 15:37:06 hydra5 kernel: usb 1-2: Manufacturer: Western Digital
Apr 11 15:37:06 hydra5 kernel: usb 1-2: SerialNumber: 574341505A30313332333338
Apr 11 15:37:06 hydra5 kernel: usb 1-2: configuration #1 chosen from 1 choice
Apr 11 15:37:06 hydra5 kernel: scsi7 : SCSI emulation for USB Mass Storage devices
Apr 11 15:37:11 hydra5 kernel: scsi 7:0:0:0: Direct-Access WD 3200AAJ External 1.06 PQ: 0 ANSI: 0
Apr 11 15:37:11 hydra5 kernel: sd 7:0:0:0: Attached scsi generic sg2 type 0
Apr 11 15:37:11 hydra5 kernel: sd 7:0:0:0: [sdb] 625142448 512-byte logical blocks: (320 GB/298 GiB)
Apr 11 15:37:11 hydra5 kernel: sd 7:0:0:0: [sdb] Write Protect is off
Apr 11 15:37:11 hydra5 kernel: sdb: sdb1
Apr 11 15:37:11 hydra5 kernel: sd 7:0:0:0: [sdb] Attached SCSI disk
adam@hydra5:~$
So then I can see that it saw the hard drive and it took on the name '/dev/sdb'.
USB devices, once connected, don't need to be accessed by the user as their raw channels and ports; the kernel assigns them a device name like anything else.