Failing to copy files to USB
Posted: Tue Sep 30, 2014 10:39 am
Hi, i'm having issues with my raspberry pi model B (running a fully up-to-date raspbian) and my 8GB USB storage device: i am developing a small embedded system which has to check for the presence of certain files inside the USB device and copy them (if they're not there). My problem is that only few (3-5) out of ~20 files in dir1 are actually being copied to USB. What can i do?
It all happens via bash script (this are just the last few lines):
#lsusb -v output:
It all happens via bash script (this are just the last few lines):
Code: Select all
if [[ ! -d "$STORAGE"/dir1 ]]; then
cp -rf "$SOURCE"/dir1 "$STORAGE"
fi
sleep 10
sync
sleep 20
sync
shutdown -h nowCode: Select all
Bus 001 Device 005: ID 0718:0619 Imation Corp.
Device Descriptor:
bLength 18
bDescriptorType 1
bcdUSB 2.00
bDeviceClass 0 (Defined at Interface level)
bDeviceSubClass 0
bDeviceProtocol 0
bMaxPacketSize0 64
idVendor 0x0718 Imation Corp.
idProduct 0x0619
bcdDevice 1.00
iManufacturer 1 Imation
iProduct 2 Nano Pro
iSerial 3 [redacted]
bNumConfigurations 1
Configuration Descriptor:
bLength 9
bDescriptorType 2
wTotalLength 32
bNumInterfaces 1
bConfigurationValue 1
iConfiguration 0
bmAttributes 0x80
(Bus Powered)
MaxPower 100mA
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 0
bAlternateSetting 0
bNumEndpoints 2
bInterfaceClass 8 Mass Storage
bInterfaceSubClass 6 SCSI
bInterfaceProtocol 80 Bulk-Only
iInterface 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x81 EP 1 IN
bmAttributes 2
Transfer Type Bulk
Synch Type None
Usage Type Data
wMaxPacketSize 0x0200 1x 512 bytes
bInterval 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x02 EP 2 OUT
bmAttributes 2
Transfer Type Bulk
Synch Type None
Usage Type Data
wMaxPacketSize 0x0200 1x 512 bytes
bInterval