Penguin
Annotated edit history of USB version 18, including all changes. View license author blame.
Rev Author # Line
15 AristotlePagaltzis 1 [USB] is an [Acronym] for __U__niversal __S__erial __B__us.
2
17 JohnMcPherson 3 This is a [Bus] with which peripherals such as mice, keyboards, scanners, [KeyDrive]s, [Scanner]s, [Printer]s, and [DigitalCamera]s etc can be to attached to a computer. [USB] provides power from the host computer. It also allows devices to be "chained". As a result, instead of having a mess of cables into the back of your computer, you could theoretically have your monitor and printer plugged into the computer, your scanner into the printer, your keyboard and camera into the monitor, and your mouse into the keyboard. So far, this scenario is purely theoretical.
16 JohnMcPherson 4
5 One advantage USB has over some [Legacy] protocols such as [PS/2] is the ability to plug devices in while the system is powered on - see also HotPlug.
18 JohnMcPherson 6
7 ----
8 !!! Linux-related USB Notes
9
10 !! USB Mass-storage
11 Many USB devices can be mounted under linux so that it becomes part of your filesystem. Examples include many USB cameras, and USB/flash-based MP3 players/memory sticks.
12
13 This requires kernel support. The default kernel you get from your vendor will probably have all the required pre-requisites, but if not, or you compile your own, then in in your kernel, you will need:
14 * USB Mass-storage support (CONFIG_USB_STORAGE)
15 * SCSI support and SCSI disk support (CONFIG_SCSI, CONFIG_BLK_DEV_SD)
16 * Microsoft "VFAT" file system support (CONFIG_VFAT_FS)
17
18 With LinuxKernel 2.6.9, you can find the relevant settings in "make menuconfig" as:
19 * Device Drivers -> USB -> USB Mass Storage support
20 * Device Drivers -> SCSI
21 * Device Drivers -> SCSI -> SCSI disk support
22 * File systems -> DOS/FAT/NT filesystems -> VFAT
23
24 You can check things are working by looking at the dmesg output when you attach a device (and have the modules loaded or compiled in). For example:
25 <verbatim>
26 usb 1-2.2: new full speed USB device using address 10
27 scsi2 : SCSI emulation for USB Mass Storage devices
28 Vendor: JetFlash Model: Transcend Rev: 0100
29 Type: Direct-Access ANSI SCSI revision: 02
30 SCSI device sda: 507392 512-byte hdwr sectors (260 MB)
31 sda: assuming Write Enabled
32 sda: assuming drive cache: write through
33 sda: sda1
34 Attached scsi removable disk sda at scsi2, channel 0, id 0, lun 0
35 USB Mass Storage device found at 10
36 </verbatim>
37 This shows that a fake SCSI disk has been attached (named "sda"), and it has one partition (sda1) that you can mount.
38
39 Once you have the required support, you should find somewhere on your filesystem to mount devices. A good place is "/media/usb":
40 <verbatim>
41 # mkdir /media/usb
42 </verbatim>
43 To let normal user accounts mount devices, add something like the following to <tt>/etc/fstab</tt>:
44 <verbatim>
45 /dev/sda1 /media/usb auto defaults,user,noauto,noatime 0 0
46 </verbatim>
47
48 Your distribution might come with this already set up, as well as appropriate HotPlug scripts to automatically mount devices when they are
49 connected.