简体   繁体   中英

how to access usb Mass Storage Device in uclinux…?

I have got the kernel log it says about usb but how can access it . there is no device registration in /dev ..? how access this..? and configured and anabledin kernel

Under "Device Drivers"

Under "USB Support" Enable "USB Mass Storage Support" (Optionally) Enable "USB Mass Storage verbose debug" Under "SCSI device support -->" Enable "SCSI disk support"

usb 1-2: new full speed USB device using lpc178x-ohci and address 2         
usb 1-2: New USB device found, idVendor=8564, idProduct=1000                    
usb 1-2: New USB device strings: Mfr=1, Product=2, SerialNumber=3               
usb 1-2: Product: Mass Storage Device                                           
usb 1-2: Manufacturer: JetFlash                                                 
usb 1-2: SerialNumber: 74O2LC2HD514SCME 

@Amar, in the kernel log, will find the information regarding where the plugged in USB mass storage device is attached to in the filesystem for ex: it can be either sda or sdb or sdc . Check and use mount command to mount USB mass storage sudo mount /dev/sd* <Path where you want to mount USB device> and after you can access USB mass storage. Below is the kernel log information on where the USB mass storage is attached to

[85508.500115] usb 1-1: new high speed USB device using ehci_hcd and address 3
[85509.110370] usb 1-1: configuration #1 chosen from 1 choice
[85509.112895] scsi4 : SCSI emulation for USB Mass Storage devices
[85509.113486] usb-storage: device found at 3
[85509.113487] usb-storage: waiting for device to settle before scanning
[85514.128615] usb-storage: device scan complete
[85514.137855] scsi 4:0:0:0: Direct-Access Generic- Compact Flash 1.01 PQ: 0 ANSI: 0
[85514.146766] scsi 4:0:0:1: Direct-Access Multiple Flash Reader  1.05 PQ: 0 ANSI: 0
[85514.148945] sd 4:0:0:0: Attached scsi generic sg2 type 0
[85514.149018] sd 4:0:0:1: Attached scsi generic sg3 type 0
[85514.549761] sd 4:0:0:0: [sdb] Attached SCSI removable disk
[85514.558770] sd 4:0:0:1: [sdc] 31116288 512-byte logical blocks: (15.9 GB/14.8 GiB)
[85514.586964] sd 4:0:0:1: [sdc] Write Protect is off
[85514.586966] sd 4:0:0:1: [sdc] Mode Sense: 03 00 00 00
[85514.586968] sd 4:0:0:1: [sdc] Assuming drive cache: write through
[85514.711875] sd 4:0:0:1: [sdc] Assuming drive cache: write through
[85514.711880]  sdc: sdc1 sdc2 sdc3 sdc4
[85514.808220] sd 4:0:0:1: [sdc] Assuming drive cache: write through
[85514.808224] sd 4:0:0:1: [sdc] Attached SCSI removable disk

In this case mount either /dev/sdc1 or /dev/sdc2 or /dev/sdc3 or /dev/sdc4 partition depending on which partition you are interested in.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM