--- Sent from my BlackBerry Z10
I've got a USB flash device with custom firmware on it. It is used as a standard flash memory device that somebody plugs in, mounts, and uses to run software that may or may not already be running. One of the programs on the device sends pass-through commands that are vendor/product specific to the firmware. I have to keep this mounted, must not lock it in exclusive access mode, and not interfere with whatever other programs are running that may interact with the stick's file system.
The commands I will do will include READ(10) & WRITE(10), along with some CDBs that are formerly defined as vendor-specific per the ANSI spec. (10 & 16-byte opcodes that might start with C0, 02, EE among others).
The USBPrivateDataSample isn't even close. I doubt it would even compile, and it doesn't have anything in there for sending mass storage type commands. Basically, looking for a "hello world" type of sample app that works on a mounted USB target device that uses a pass-through CDB to do something simple.
For what it is worth, I do not have to make this work with just any usb flash device, so if there is some constraint that requires me to limit it to a specific pair of 16-bit usbVendor/usbProduct combinations, then that is OK).
Q. So is there pass-through function somewhere that allows an app to send ANSI-standard block CDBs to a mounted USB flashmemory device, and a sample app?
Q. Would that technique require a kext or anything else? Remember, exclusive access for the program is unacceptable for my needs, I want to be able to have a program that has read/write access to the filesystem on the USB to invoke this pass-through code and interct with the filesystem.
------------------
6 Infinite Loop
M/S 306-2MS
Cupertino CA 95014
phone: (408) 974-4033
fax: (408) 862-7577
email: sar...@apple.com
It would be great if anyone could implement the ability to send SCSI
passthrough commands on MacOS X in libcdio:
http://www.gnu.org/software/libcdio/
The mmc_run_cmd() function is there right for that purpose, but I
think it doesn't do anything on MacOS X.
If someone did this, we would immediately gain SCSI passthrough in an
immediate and portable way.