Docs/Hardware/USB
From Mandriva Community Wiki
[edit] Cameras
- Cameras can appear as removable hard drives, or can be accessed with the Picture Transfer Protocol (PTP).
[edit] Sony F-707
- In trying to access my Sony F-707 camera, the hard drive method is unreliable, it appears that you can't mix memory sizes. It is recommended to try Camera programs like Digikam or Gtkam (gphoto2) using PTP to reliably access the device.
[edit] Bluetooth adapters
[edit] Sitecom CN500 Bluetooth Adapter
- Works out of the box as of 9.2. Note that rfcomm devices are in /dev/bluetooth/rfcomm/*, otherwise the general HOWTOs out on the net are all you need to get going.
[edit] eBook Readers
[edit] RCA REB1100 eBook reader
- Command line access using a program called rebcomm from [1].
- Unless you make some changes to hotplug, only root can access the reader.
- Tested on LE2005.
- Mikkel 10:30, 15 November 2005 (MST)
[edit] Configuring hotplug for the RCA REB1100 eBook reader
There is a command line program that will let you use the RCA REB1100 eBook reader with Linux. The program is called rebcomm and you can download it from http://rebcomm.sourceforge.net. The only problem is that only root can use the program. Because I hate running programs as root, and don't like to suid programs if I don't have to, I worked out how to let the user logged in at the console do it.
Here is what I did. First, I looked in /proc/bus/usb/devices to get the Vendor and Product IDs for the device. They are Vendor=0993 ProdID=0001. I used these to create an entry in /etc/hotplug/usb.usermap for the reader.
rebcomm 0x0003 0x0993 0x0001 0x0000 0x0000 0x00 0x00 0x00 0x00 0x00 0x00 0x00000000
I then changed to the /etc/hotplug/usb directory. Here I created the rebcomm script based on the usbcam script from gphoto2.
#!/bin/bash # # /etc/hotplug/usb/rebcomm # # Script to set permissions for the REB-1100 # # In the usermap file, the first field "usb module" should be named # "rebcomm" like this script. # if [ "${ACTION}" = "add" ] && [ -f "${DEVICE}" ] then # New code, using lock files instead of copying /dev/console permissions # This also works with non-gdm logins (e.g. on a virtual terminal) # Idea and code from Nalin Dahyabhai <nalin@redhat.com> if [ -f /var/run/console.lock ] then CONSOLEOWNER=`cat /var/run/console.lock` elif [ -f /var/lock/console.lock ] then CONSOLEOWNER=`cat /var/lock/console.lock` else CONSOLEOWNER= fi if [ -n "$CONSOLEOWNER" ] then chmod 0000 "${DEVICE}" chown "$CONSOLEOWNER" "${DEVICE}" chmod 0600 "${DEVICE}" fi fi
Now, when you plug in the reader, the ownership of the device is changed to the user logged in at the console. If you wanted to, you could change the script so anyone could access the reader. But I don't know what would happen if more then one person tried to access it at the same time...
This was tested with LE2005, but it should work fine with 10.1 as well.
[edit] Card Readers
[edit] Alcor Micro Corp. Secure Digital card reader
- Reads Secure Digital cards. On 9.2, it generates an error in the log if no card is inserted when plugged in. It will recognize when a card is inserted.
- Tested with 9.2, 10.1 and LE2005.
- Mikkel 10:53, 15 November 2005 (MST)
[edit] Belkin USB Card Reader
- Just plug the device into an open USB port. /etc/fstab will be automatically updated to reflect the device (mountpoint will be /mnt/removable). That is all there is to it. No need to try and set the device to automount though, when inserting a card again, fstab will be automatically updated to 'noauto' for the device. But mounting and unmounting is so simple that this should not be a problem.
[edit] MicroTech CameraMate Digital Film Reader
- Reads Compact Flash, Microdrive, and SmartMedia. The device appears as 2 SCSI drives, with the Compact Flash as the first drive and the SmartMedia as the second. The Compact Flash card auto-mounts as /mnt/camera.
- Changing the Compact Flash card does not appear to be detected with 10.1.
- It would not work with LE2005 - it keeps trying to read the SmartMedia card slot. I created an .fdi file in /usr/share/hal/50user so that it does not try to automount the cards, This lets it works in LE2005. I have not figured out how to automount just the CF card. Right now, I manualy mount the card.
- In LE2005, it detects changing the Compact Flash card.
- Mikkel 11:28, 15 November 2005 (MST)
[edit] NewLink 5.25" Multi Functional Bay
- Reads Compact Flash, Microdrive, SmartMedia, Memory Stick, Secure Digital and MultiMedia Card, as well as giving audio, usb and firewire access on front panel. Tested with 10.1 It does not work at all with LE2005 - in fact it appears to be completely unrecognised.
[edit] Twinmos 8 in 1 cardreader
- Reads/Writes Compact Flash, Secure Digital, Smartmedia with no problem in 10.0, can insert all 3 card types together and copy to them and between each card, in 9.1 Smartmedia is a little flaky sometimes needing several attempts to mount it and can only use 1 slot (card type) at a time
[edit] USB Memory Stick Card Reader CR-V22-U2M
- (recognised by Knoppix as Genesys GL817 Reader), reads Sony Memory Stick, should also read Memory Stick Pro. Card needs to be inserted before device is plugged in, seen as /mnt/removable. An icon pops up, which, when right clicked, opens Knoqueror with options to view photos, or use other applications to view and work with them. ACPI needed enabling in MCC "boot options" for USB devices to work in LE2005.
[edit] Music Devices
[edit] iRiver IHP-1xx/3xx series MP3 Players
- Both players act as USB mass storage devices. Just plug it in and Mandriva will automatically mount it under /mnt/removable and an icon is placed on the desktop.
[edit] All mp3 players from Jens of Sweden
- Manufactured by i-BEAD (Hyundai). Labelled as linux-friendly. Furthermore, they double as USB storage devices. Just plug it in and Mandriva will automatically mount it under /mnt/removable and an icon is placed on the desktop.
[edit] Samsung Yepp YP-20S (and some other Samsung Yepp or Uproar based models)
- Go to [2] and download the tarball. I had to urpmi all the following packages (along with all their dependencies -- fairly long list) before it would compile
- gcc
- libusb-devel
- libgtk+1.2-devel
- popt-devel
- Once those are installed, tar -xvzf sulu-whatever.tgz, cd sulu-whatever and make
- It's not pretty, has to be run as root, and only uploads to the player (no downloads) but it does seems to work pretty well. This is the only solution I've ever seen for these units.
[edit] Creative Muvo USB player
- Mounts fine in 10.1 as a USB mass storage device, Just plug it in and Mandriva will automatically mount it under /mnt/removable and an icon is placed on the desktop.
[edit] MPeye HTS150, HTS550
- Is detected perfectly by HAL in 2005LE. Appears as a removable drive at /mnt/removable. The only issue is that when files are deleted on the player they are not really deleted until a sync command is issued. I have put a HOWTO on my homepage at www.jennings.homelinux.net to show how to fix that issue.
- The MPeye playlist application for Windows works perfectly under Crossover Office, but there is no need to use it because m3u playlists created in amarok can be downloaded to the device so long as amarok is configured to use /mymusic as the folder for music.
[edit] Storage Devices
[edit] Alcor Micro
- Acer Flash Drive (64 Mb flash disk), a.k.a. Sweex memory pen: recognized immediately and configured automagically under Mandriva Linux 2006.0
[edit] Disgo Classic
- 128MB or 256MB - claims to work with any kernel 2.4.0+. Tested on %100% - Hotplug mounts it as /mnt/removable.
[edit] Genesys USB 2.0 to IDE disk adapters
- There are 2 versions of this device. One is an external hard drive enclosure for a 2 1/4" drive, and the other is an adapter that plugs into a 3 1/2" or 5 1/4" IDE hard drive.
- The 2 1/2" version is little more then a metal can, a circuit board with a connector to plug in the drive on one end, and a mini USB socket and tri-color LED on the other. You plug the card into the drive, and then put the assembly into the can, with the LED and USB socket lining up with holes in the case. Both the adapter and the drive are powered by the USB connection.
- The 3 1/2" version is a molded plastic connector that plugs into the drive, and has a USB cable attached. It also has a power supply that plugs into the drive to power the drive itself. The interface is powered by the USB connection.
- Both devices work "out of the box", except that if the drives attached have more then one partition, you have to mount them manually. Both devices look the same to udev, with the exception of the SYSFS{rev} tag. This is going to make things interesting.
- Starting with LE2005, drives with more then one partition get mounted automaticly.
- Tested with 9.2, 10.1, and LE2005.
- Mikkel 11:00, 15 November 2005 (MST)
[edit] King Win 2 1/2" HDD External Enclosure
- Mounts as a USB mass storage device. Just plug it in and Mandriva will automatically mount it under /mnt/removable and an icon is placed on the desktop.
[edit] MicroMedia 32MB USB "Pen" drive
- Hotplug mounts it as /mnt/removable.
- Tested with 9.2, 10.1 and LE2005.
[edit] NEXDISK 32MB USB storage device
- Hotplug mounts it as /mnt/removable.
- Tested with 9.2, 10.1, and LE2005.
[edit] PKNY 128MB and 64MB USB "Key Ring" storage devices
- In both cases mounts as a USB mass storage device. Just plug it in and Mandriva will automatically mount it under /mnt/removable and an icon is placed on the desktop.
[edit] PNY Attache 128MB USB "Pen" drive
- Hotplug mounts it as /mnt/removable in 9.2 and 10.1.
- In LE2005 it mounts as /mnt/UDISK20.
[edit] Prolific Technology, Inc. ATAPI-6 Bridge Controller
- This is a USB 2.0 external drive enclosure. The one I have has a DVD-RW drive in it. In LE2005, an entry gets created in /etc/fstab for a CD-ROM when you plug it in. After that, it is handled the same as any other CD-ROM.
- Mikkel 14:32, 15 November 2005 (MST)
[edit] USB Easy Mounting
Don't you hate trying to mount a USB hard drive when it keeps moving around between /dev/sd[a-d]...?
The solution is quite simple. In this example there are 2 USB hard drives which are randomly used. They contain the following partitions:
Drive Partition Label 12GB 1 12G:SOFTWARE # where I download new s/w and updates 30GB 1 30G:/ # my old laptop harddrive " 6 30G:/usr " 7 30G:/var " 8 30G:/usr/local " 9 30G:/home " 10 30G:/tmp
A label can be written to partitions to help in its identification; like when you attach a hard drive and forgot what each partition holds... If your partitions are labelled, you can see what should be on a partition with the command:
e2label <device>
e.g.,
e2label /dev/sda1
To label a partition, you simply issue the command:
e2label /dev/sd[a-d][1-27] label
e.g., (using my example above)
e2label /dev/sda1 12G:SOFTWARE
Note that the use of "12G:" as a prefix is only a convention of mine... this is optional; though if you have multiple drives, I would suggest some form of identifying "/" on one drive from "/" on another drive...
Next, create /etc/fstab entries using LABEL=label; like this for my drives above:
LABEL=12G:SOFTWARE /sw ext3 user,exec,sync 0 0 LABEL=30G:/ /old/root ext3 user,exec,sync 0 0 LABEL=30G:/usr /old/usr ext3 user,exec,sync 0 0 LABEL=30G:/var /old/var ext3 user,exec,sync 0 0 LABEL=30G:/usr/local /old/usr/local ext3 user,exec,sync 0 0 LABEL=30G:/home /old/home ext3 user,exec,sync 0 0 LABEL=30G:/tmp /old/tmp ext3 user,exec,sync 0 0
and you're done...
To mount a USB hard drive, it's a simple command:
mount -L 12G:SOFTWARE # mounts at /sw mount -L 30G:/ # mounts at /old/root mount -L 30G:/home # mounts at /old/home
[edit] Links
- http://www.linux-usb.org/ - Links to many aspects of usb connectivity