USB mass storage programming
Madison Kelly
linux-5ZoueyuiTZhBDgjK7y7TUQ at public.gmane.org
Wed May 12 21:05:15 UTC 2004
Hi,
I am not much of a programmer so I hope this helps somewhat. I have
been working on a backup program that uses external USB drives and I
know that the devices are listed under
/proc/scsi/{scsi|sg|usb-storage-#}/#. When I 'cat' my external chassis I
get:
# This the actual drive data, after rescanning the scsi bus:
[madison-7pyt9le+KA8 at public.gmane.org tle-bu]$ sudo cat /proc/scsi/scsi
Attached devices:
Host: scsi0 Channel: 00 Id: 00 Lun: 00
Vendor: IBM-DTTA Model: -371440 Rev: T71O
Type: Direct-Access ANSI SCSI revision: 02
# This is the chassis
[madison-7pyt9le+KA8 at public.gmane.org tle-bu]$ sudo cat /proc/scsi/usb-storage-0/0
Host scsi0: usb-storage
Vendor: In-System Design
Product: USB Storage Adapter
Serial Number: 11100E00006792AF
Protocol: Transparent SCSI
Transport: Bulk
GUID: 05ab006011100e00006792af
Attached: Yes
There are a lot of other interesting files in /proc/scsi* that may
help, too.
HTH,
Madison
Stewart C. Russell wrote:
> I'm trying to port a tiny Windows utility for controlling raw mode on my
> Nikon digital camera to Linux. It's almost trivial, but I've never done
> any USB/SCSI interface programming before.
>
> All I need to do is check that the device ID strings match particular
> values, and if they do, set another device field to another string value.
>
> I can almost understand the Windows C++ here:
> <http://e2500.narod.ru/raw_format_e.htm#cpixraw>, but was wondering how
> it differs under Linux.
>
> thanks,
> Stewart
--
The Toronto Linux Users Group. Meetings: http://tlug.ss.org
TLUG requests: Linux topics, No HTML, wrap text below 80 columns
How to UNSUBSCRIBE: http://tlug.ss.org/subscribe.shtml
More information about the Legacy
mailing list