Hi,

I'm trying to talk to a SATA drive via Linux SCSI programming. I've had some experience doing this in Windows, but not in Linux. I've looked at the Linux SCSI programming HOWTO, but unfortunately at 12 years old, it's hopelessly outdated and the example program won't even work on a SCSI device(flash drive) that I tried it on.

So far I've managed to do the basics - opening up a device using the open() function. However I'm not sure how to send SCSI commands to the device. Is there some resource out there that can help?

I've tried looking at the sg3_utils source code to get some inspiration, but the framework seems to complicated for the basic stuff that I need.

Help? Thanks.