USB detection

Alan McKinnon alan at linuxholdings.co.za
Tue Feb 28 09:54:12 UTC 2006


On Tuesday, 28 February 2006 10:38, Brian Astill wrote:
> On Thu, 28 Feb 2002 05:33 pm, Alan McKinnon wrote:
> > There's already a Logitech device detected - what is that? a
> > stick?
>
> No. A mouse.  Do Logitech also make sticks?

Dunno :-) Ignore the above though, I kinda assumed it might be a stick 
without thinking too hard what else it might be

> > The voice recorder has probably been picked up as /dev/sdb
> > or /dev/sdb1
>
> # mount /dev/sdb /mnt/dict
> mount: you must specify the filesystem type
> # mount /dev/sdb1 /mnt/dict
> mount: you must specify the filesystem type
>
> This looks as though it works:
> # mount -t usbfs /dev/sdb1 /mnt/dict

No, that's wrong. usbfs is a virtual filesystem (like /proc) generated 
by sysfs and is normally mounted at /proc/bus/usb. It enumerates your 
usb devices. So all you have done is mount it a second time 
at /mnt/dict, and the device node is disregarded (similar to the 
device node field in /etc/fstab for swap is disregarded)

> # ls /mnt/dict
> 001  002  devices
>  # ls -l /mnt/dict/001
> total 0
> -rw-r--r--  1 root root 43 2006-02-28 21:41 001
> -rw-r--r--  1 root root 52 2006-02-28 21:41 002
> # ls -l /mnt/dict/002
> total 0
> -rw-r--r--  1 root root 43 2006-02-28 21:41 001
> -rw-r--r--  1 root root 57 2006-02-28 18:48 004
>  # ls -l /mnt/dict/devices
> -r--r--r--  1 root root 0 2006-02-28 18:48 /mnt/dict/devices
>
> But note the "total 0"s and that "devices" is of zero length.

That's correct. File sizes for virtual files are usually not reported. 
You can read them with cat:

alan at develop ~ $ mount
...
usbfs on /proc/bus/usb type usbfs (rw,devmode=0664,devgid=85)

alan at develop ~ $ cat /proc/bus/usb/devices
T:  Bus=03 Lev=01 Prnt=01 Port=04 Cnt=01 Dev#=  4 Spd=480 MxCh= 0
D:  Ver= 2.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs=  1
P:  Vendor=08ec ProdID=0845 Rev= 1.00
S:  Manufacturer=Generic
S:  Product=USB Flash Disk
S:  SerialNumber=1F581B0008FA
C:* #Ifs= 1 Cfg#= 1 Atr=80 MxPwr=200mA
I:  If#= 0 Alt= 0 #EPs= 3 Cls=08(stor.) Sub=06 Prot=50 
Driver=usb-storage
E:  Ad=81(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
E:  Ad=02(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
E:  Ad=83(I) Atr=03(Int.) MxPS=  64 Ivl=1ms

But back to your voice recorder. It seems to be a usb thingy that is 
plugged into Windows and deep dark voodoo turns it into a mass 
storage device. There's nothing about it in the kernel sources 
anywhere, and I think you are out of luck on Linux:
http://www.linuxquestions.org/hcl/showproduct.php?product=2161&cat=all

Apparently the device doesn't work too well on Windows either:
http://www.driverzone.com/viewcomment.php?company=Olympus%20America&masterid=501


-- 
Alan McKinnon
alan at linuxholdings dot co dot za
+27 82, double three seven, one nine three five




More information about the ubuntu-users mailing list