PDA

View Full Version : USB storage device



jjbergdolt
07-22-2005, 09:15 PM
How to get access to an USB storage device?
Herafter are details generated by lsusb (part of usbutils).
-------------
Bus 001 Device 003: ID 0aec:5010 Neodio Technologies Corp. ND5010 Card Reader
Device Descriptor:
bLength 18
bDescriptorType 1
bcdUSB 1.10
bDeviceClass 0 (Defined at Interface level)
bDeviceSubClass 0
bDeviceProtocol 0
bMaxPacketSize0 16
idVendor 0x0aec Neodio Technologies Corp.
idProduct 0x5010 ND5010 Card Reader
bcdDevice 1.00
iManufacturer 1 Generic
iProduct 2 USB Storage Device
iSerial 3 0AEC305000001A003
bNumConfigurations 1
Configuration Descriptor:
bLength 9
bDescriptorType 2
wTotalLength 32
bNumInterfaces 1
bConfigurationValue 1
iConfiguration 0
bmAttributes 0x80
MaxPower 100mA
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 0
bAlternateSetting 0
bNumEndpoints 2
bInterfaceClass 8 Mass Storage
bInterfaceSubClass 6 SCSI
bInterfaceProtocol 80 Bulk (Zip)
iInterface 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x01 EP 1 OUT
bmAttributes 2
Transfer Type Bulk
Synch Type None
Usage Type Data
wMaxPacketSize 0x0040 1x 64 bytes
bInterval 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x82 EP 2 IN
bmAttributes 2
Transfer Type Bulk
Synch Type None
Usage Type Data
wMaxPacketSize 0x0040 1x 64 bytes
bInterval 0

rwcitek
07-23-2005, 04:15 PM
How to get access to an USB storage device?
Herafter are details generated by lsusb (part of usbutils).
If all goes well, you plug in the device and Knoppix recognizes it as /dev/uba or similar. I've had the best luck by plugging in the USB device and then booting Knoppix.

Try that and let us know how things go.

Regards,
- Robert
http://www.cwelug.org/

jjbergdolt
07-23-2005, 07:09 PM
I do not have /dev/uba on my system.
There is /dev/usb directory with many files like dab..., dc..., ez..., lp..., mdc..., mouse..., rio..., scanner..., tty...
I do not know if any is suitable for my device.

rwcitek
07-23-2005, 09:54 PM
I do not have /dev/uba on my system.
There is /dev/usb directory with many files like dab..., dc..., ez..., lp..., mdc..., mouse..., rio..., scanner..., tty...
Hmm. Sounds like your USB storage device is not being recognized. Boot up again with the USB device plugged in and type these commands:

cat /proc/partitions
lsmod | grep usb
lspci
lsusb
dmesg | grep -A 3 -i usb
Please post the results.

Regards,
- Robert
http://www.cwelug.org/

fpd
07-24-2005, 02:19 AM
In Konqueror, press F9 to open up the side-bar if your USB device is recognized it should look like this:

+ Hard Disk (sda1) [/mnt/sda1]

jjbergdolt
07-24-2005, 11:07 AM
Hello Robert,
Many thanks for your help.
Hereafter are the results of the test.
---------
cat /proc/partitions
major minor #blocks name

3 0 20010816 hda
3 1 5237158 hda1
3 2 1 hda2
3 5 1052226 hda5
3 6 1028128 hda6
3 7 3574431 hda7
3 8 530113 hda8
3 9 8586711 hda9
--------------
lsmod | grep usb
usbhid 42176 0
usbcore 101496 5 ub,usbhid,ohci_hcd,uhci_hcd
-----------
lspci
0000:00:00.0 Host bridge: Intel Corp. 82815 815 Chipset Host Bridge and Memory Controller Hub (rev 02)
0000:00:01.0 PCI bridge: Intel Corp. 82815 815 Chipset AGP Bridge (rev 02)
0000:00:1e.0 PCI bridge: Intel Corp. 82801 PCI Bridge (rev 02)
0000:00:1f.0 ISA bridge: Intel Corp. 82801BA ISA Bridge (LPC) (rev 02)
0000:00:1f.1 IDE interface: Intel Corp. 82801BA IDE U100 (rev 02)
0000:00:1f.2 USB Controller: Intel Corp. 82801BA/BAM USB
(Hub #1) (rev 02)
0000:00:1f.3 SMBus: Intel Corp. 82801BA/BAM SMBus (rev 02)
0000:00:1f.4 USB Controller: Intel Corp. 82801BA/BAM USB (Hub #2) (rev 02)
0000:01:00.0 VGA compatible controller: ATI Technologies Inc Radeon RV100 QY [Radeon 7000/VE]
0000:02:0a.0 Multimedia audio controller: Ensoniq 5880 AudioPCI (rev 02)
0000:02:0b.0 Ethernet controller: National Semiconductor Corporation DP83815 (MacPhyter) Ethernet Controller
0000:02:0c.0 Communication controller: Rockwell International HCF 56k Data/Fax/Voice/Spkp (w/Handset) Modem (rev 01)
----------
lsusb
Bus 002 Device 001: ID 0000:0000
Bus 001 Device 002: ID 0aec:5010 Neodio Technologies Corp. ND5010 Card Reader
Bus 001 Device 001: ID 0000:0000
----------
dmesg | grep -A 3 -i usb
usbcore: registered new driver usbfs
usbcore: registered new driver hub
USB Universal Host Controller Interface driver v2.2
PCI: Found IRQ 4 for device 0000:00:1f.2
uhci_hcd 0000:00:1f.2: Intel Corp. 82801BA/BAM USB (Hub #1)
PCI: Setting latency timer of device 0000:00:1f.2 to 64
uhci_hcd 0000:00:1f.2: irq 4, io base 0xa400
uhci_hcd 0000:00:1f.2: new USB bus registered, assigned bus number 1
hub 1-0:1.0: USB hub found
hub 1-0:1.0: 2 ports detected
PCI: Found IRQ 9 for device 0000:00:1f.4
PCI: Sharing IRQ 9 with 0000:02:0b.0
uhci_hcd 0000:00:1f.4: Intel Corp. 82801BA/BAM USB (Hub #2)
PCI: Setting latency timer of device 0000:00:1f.4 to 64
uhci_hcd 0000:00:1f.4: irq 9, io base 0xa000
uhci_hcd 0000:00:1f.4: new USB bus registered, assigned bus number 2
hub 2-0:1.0: USB hub found
hub 2-0:1.0: 2 ports detected
usb 1-1: new full speed USB device using uhci_hcd and address 2
ohci_hcd: 2004 Nov 08 USB 1.1 'Open' Host Controller (OHCI) Driver (PCI)
usbcore: registered new driver hiddev
usbcore: registered new driver usbhid
drivers/usb/input/hid-core.c: v2.0:USB HID core driver
ub: sizeof ub_scsi_cmd 64 ub_dev 2504
ieee1394: Initialized config rom entry `ip1394'
uba: device 2 capacity nsec 0 bsize 512
usbcore: registered new driver ub
Serial: 8250/16550 driver $Revision: 1.90 $ 14 ports, IRQ sharing disabled
parport: PnPBIOS parport detected.
parport0: PC-style at 0x378 (0x778), irq 7, dma 3 [PCSPP,TRISTATE,COMPAT,ECP,DMA]
--------------

jjbergdolt
07-24-2005, 11:28 AM
>>In Konqueror, press F9 to open up the side-bar if your USB device is recognized it should look like this:

>>+ Hard Disk (sda1) [/mnt/sda1]
--------
sda1 does not exist on my system
Hereafter is the content of /mnt:
app
auto
cdrom
cdrom1
floppy
hda1
hda5
hda6
hda7
test
uba1

rwcitek
07-24-2005, 02:28 PM
cat /proc/partitions
major minor #blocks name

3 0 20010816 hda
3 1 5237158 hda1
3 2 1 hda2
3 5 1052226 hda5
3 6 1028128 hda6
3 7 3574431 hda7
3 8 530113 hda8
3 9 8586711 hda9
It's not there.


lsmod | grep usb
usbhid 42176 0
usbcore 101496 5 ub,usbhid,ohci_hcd,uhci_hcd
Looks like you're missing a few modules. Here's what mine looks like:

lsmod | grep -i usb
usbhid 42176 0
usb_storage 63296 0
usbcore 101496 7 usbhid,usb_storage,ub,ohci_hcd,uhci_hcd,ehci_hcd


dmesg | grep -A 3 -i usb
ub: sizeof ub_scsi_cmd 64 ub_dev 2504
ieee1394: Initialized config rom entry `ip1394'
uba: device 2 capacity nsec 0 bsize 512
usbcore: registered new driver ub
Looks like it found it but didn't recognize it as a storage devices.

Try booting up. Open up a terminal and type these commands:

sudo su - # become root
modprobe usb_storage
modprobe ehci_hcd
lsmod | grep usb
cat /proc/partitions

Please post the output of those commands here.

Regards,
- Robert
http://www.cwelug.org/

jjbergdolt
07-24-2005, 02:57 PM
Hello Robert,
Hereafter the results of the tests.
---------------
sudo su - # become root
modprobe usb_storage
modprobe ehci_hcd
lsmod | grep usb
usb_storage 63296 0
usbhid 42176 0
usbcore 101496 7 ehci_hcd,usb_storage,ub,usbhid,ohci_hcd,uhci_hcd
----------
cat /proc/partitions
major minor #blocks name

3 0 20010816 hda
3 1 5237158 hda1
3 2 1 hda2
3 5 1052226 hda5
3 6 1028128 hda6
3 7 3574431 hda7
3 8 530113 hda8
3 9 8586711 hda9

rwcitek
07-25-2005, 04:06 AM
Hello Robert,
Hereafter the results of the tests.
Knoppix sees it but still doesn't want to recognize it as a storage device.

Let's try something else. Boot into Knoppix without having the storage device attached. Then type the following:

cat /etc/knoppix-version
uname -va
lsusb
sudo dmesg -c >> dmesg.txt
echo '===' >> dmesg.txt
Now attach the storage device to the USB slot of your computer and type the following:

lsusb
sudo dmesg -c >> dmesg.txt
grep -B 3 -A 1000 '^===' dmesg.txt
Please post the output of those commands here.

Regards,
- Robert
http://www.cwelug.org/

jjbergdolt
07-25-2005, 06:59 AM
Hello Robert,
Please find hereafter the results of the tests.
I feel a scsi module is missing but wich one?
Ubuntu Live recognizes my device.
It includes a module scsi_mod that is used by usb_storage.
But modprobe can not not find scsi_mod on my Knoppix.
I think Ubuntu is based on an older kernel.
----------
cat /etc/knoppix-version
3.9 2005-05-27
---------
uname -va
Linux Knoppix 2.6.11 #2 SMP Thu May 26 20:53:11 CEST 2005 i686 GNU/Linux
--------
lsusb
Bus 002 Device 001: ID 0000:0000
Bus 001 Device 001: ID 0000:0000
-------
sudo dmesg -c >> dmesg.txt
echo '===' >> dmesg.txt
-------
sudo dmesg -c >> dmesg.txt
echo '===' >> dmesg.txt
------
------
lsusb
Bus 002 Device 001: ID 0000:0000
Bus 001 Device 002: ID 0aec:5010 Neodio Technologies Corp. ND5010 Card Reader
Bus 001 Device 001: ID 0000:0000
------
sudo dmesg -c >> dmesg.txt
grep -B 3 -A 1000 '^===' dmesg.txt
usb 1-1: new full speed USB device using uhci_hcd and address 2
ub: sizeof ub_scsi_cmd 64 ub_dev 2504
uba: device 2 capacity nsec 0 bsize 512
usbcore: registered new driver ub

rwcitek
07-25-2005, 03:30 PM
usb 1-1: new full speed USB device using uhci_hcd and address 2
ub: sizeof ub_scsi_cmd 64 ub_dev 2504
uba: device 2 capacity nsec 0 bsize 512
usbcore: registered new driver ub
As far as I can tell, Linux sees your USB storage device as /dev/uba. Try these commands as root:

cat /dev/uba | od -bc | head
fdisk -l /dev/uba
Please post the results.

My suspicions are that even though the kernel recognizes your USB device, the ub driver may not be working correctly with it.

Regards,
- Robert
http://www.cwelug.org/

jjbergdolt
07-25-2005, 04:56 PM
Hello Robert,
You are right.
---------
cat /dev/uba | od -bc | head
cat: /dev/hba: No medium found
0000000
------
fdisk -l /dev/uba
0000000

rwcitek
07-25-2005, 11:13 PM
Hello Robert,
You are right.
---------
cat /dev/uba | od -bc | head
cat: /dev/hba: No medium found
0000000
------
fdisk -l /dev/uba
0000000
From another list someone recommend that the ub driver be removed and use usb-storage instead. So, try this:

sudo su - # become root
rmmod ub
modprobe usb-storage
At this point, it can't hurt, right? ;)

Regards,
- Robert
http://www.cwelug.org/

rrfish72
07-26-2005, 03:21 AM
Try loading the imm and/or ppa module.

jjbergdolt
07-26-2005, 06:56 AM
sudo su - # become root
rmmod ub
modprobe usb-storage
-----
I do not see any changes.
Is a scsi support required for usb storage devices?
lsmod does not display any scsi module.

jjbergdolt
07-26-2005, 07:03 AM
Try loading the imm and/or ppa module.
---------
modprobe imm
FATAL: Error inserting imm (/lib/modules/2.6.11/kernel/drivers/scsi/imm.ko): Unknown symbol in module, or unknown parameter (see dmesg)
-----
modprobe ppa
FATAL: Error inserting ppa (/lib/modules/2.6.11/kernel/drivers/scsi/ppa.ko): Unknown symbol in module, or unknown parameter (see dmesg)

jjbergdolt
07-26-2005, 07:21 AM
When I compare with Ubuntu live that is also based on Debian, I notice the following:

Partitions:
major minor #blocks name

8 16 62720 sdb
8 17 62576 sdb1
3 0 20010816 hda
3 1 5237158 hda1
3 2 1 hda2
3 5 1052226 hda5
3 6 1028128 hda6
3 7 3574431 hda7
3 8 530113 hda8
3 9 8586711 hda9

My usb device is recognized as sdb1.
---------
lsmod:
Module Size Used by
....
scsi_mod 119936 2 sd_mod,usb_storage
usbcore 107384 6 usb_storage,usbserial,usbhid,usbkbd,uhci_hcd
usb_storage 64064 2
....

scsi-mod is not included in Knoppix.
When I try to load it I get an error message, module not found.
------
uname:
Linux ubuntu 2.6.10-5-386 #1 Tue Apr 5 12:12:40 UTC 2005 i686 GNU/Linux

This is an older kernel version, Knoppix is 2.6.11

jjbergdolt
07-26-2005, 11:10 AM
After loading a module with modprobe is it possible to force Knoppix to redetect again all devices?
Is it done automatically?

rrfish72
07-29-2005, 06:08 AM
Use modconf as root to load all modules that you want to load automatically. Just enter through until it says successfully loaded. Type modconf in a terminal and goto scsi to find the modules mentioned.