USB Gadget ( linuxból mass storage device más eszköznek)

Eddig nem foglalkoztam vele, nem is tudatm , hogy lehet ilyet :-)
USB Gadget
már csak egy usb bridge kábel kellene http://www.hardwaresecrets.com/article/248

*

# modprobe g_file_storage file=/tmp/backing_file
g_file_storage gadget: File-backed Storage Gadget, version: 28 November 2005
g_file_storage gadget: Number of LUNs=1
g_file_storage gadget-lun0: ro=0, file: /tmp/backing_file

* connect target's USB cable to your PC and,

On your Linux Host:

* If you have a recent Linux distribution, your device should be automatically mounted. Otherwise:
o as root, launch dmesg and find the /dev/sdaX device assigned to your board:

... usb 1-1.4: new full speed USB device using uhci_hcd and address 7
... usb 1-1.4: configuration #1 chosen from 1 choice
... scsi1 : SCSI emulation for USB Mass Storage devices
... Vendor: Linux Model: File-Stor Gadget Rev: 0314
... Type: Direct-Access ANSI SCSI revision: 02
... SCSI device sda: 8192 512-byte hdwr sectors (4 MB)
... sda: Write Protect is off
... SCSI device sda: 8192 512-byte hdwr sectors (4 MB)
... sda: Write Protect is off
... sda: sda1
... sd 1:0:0:0: Attached scsi disk sda
... sd 1:0:0:0: Attached scsi generic sg0 type 0

*
o then mount the device and enjoy file sharing:

$ sudo mount /dev/sda1 /mnt/tmp
$ cd /mnt/tmp
$ showimage /mnt/tmp/test.jpg

Hozzászólások

itthon tudtok olyan helyet ahol lehet kapni?
(usb bridge kábel)

sikerult?
en arra gondoltam, hogy a tv-mhez (amihez usbn lehet mass storaget dugni, ellenben nincs network) kotnek egy nast (pl WD MyBook-ot, lecserelnem rajta a fw-t es kiajanlanam a tartalmat igy :)
--
B+ - http://pozor.hu