How to get the serial number of the hard drive of a USB drive on OS X?

I looked through DADiskCopyDescriptionand listed IOUSBDevicefrom IOKit and did not provide me with the serial number of the USB hard drive. The latter contains a USB serial number that is not equivalent to the serial number of the hard drive. How to get this (in c / C ++, NOT through the shell)?

+5
source share
1 answer

Basically you ask: "How to communicate directly with the hard drive via USB?"

Answer: It depends on the USB controller. Not all controllers support your request.

The following conditions must exist:

  • The USB bridge must support ATA pass-through (if ATA)
  • SCSI must be supported on the host OS
  • API- SCSI ( Windows Linux, MacOS X).

: -, , . , PATA, SATA/SAS SCSI.

, , Sunplus SPIF215/6, SPIF225/6; JMicron JM20329, JM20335-39; Cypress CY7C68300B/C (AT2LP), CY7C68310 (ISD-300LP).

, .

+5

All Articles