Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Fetching contributors…
Cannot retrieve contributors at this time
95 lines (73 sloc) 3.32 KB
This is a kernel driver for Mac OS X external USB or FireWire drives.
It extends the standard driver behaviour by providing access to drive
SMART data. The interface to SMART data is same as with ATA family
driver, so most existing applications should work. The driver requires
a SAT (SCSI ATA Translation) capable external drive enclosure.
The driver consists of a kernel extension and a user client interface
The code is based on Apple opensource files and is therefore published
under Apple Public Source License. For details see
* Use the dmg image and the installer
* Power cycle the external drives
* Check DiskUtility. The disk should have "S.M.A.R.T. Status: Verified"
* Remove driver and plugin
sudo rm -r /System/Library/Extensions/SATSMARTDriver.kext
sudo rm -r /System/Library/Extensions/SATSMARTLib.plugin
* Reboot
* Compile all targets using XCode.
xcodebuild -configuration Release
* Unmount all existing external drives.
* Load the kernel extension.
sudo tail -f /private/var/log/kernel.log &
cd build/Debug/
sudo cp -R SATSMARTLib.plugin /System/Library/Extensions
sudo cp -R SATSMARTDriver.kext /tmp
sudo kextutil -t /tmp/SATSMARTDriver.kext
* The external drives should mount automatically. Check them briefly
and unmount them.
* Test
./smart_sample -a
* Check DiskUtility. The disk should have "S.M.A.R.T. Status: Verified"
* Install the driver to system permanently
sudo cp -R SATSMARTDriver.kext /System/Library/Extensions
* Reboot
* If you want to limit the driver for certain hardware add product
and vendor identification to SATSMARTDriver/Info.plist. For example:
<key>Product Identification</key>
<key>Vendor Identification</key>
You can find out the identification string from io registry:
ioreg -r -c IOSCSIPeripheralDeviceNub
+-o IOSCSIPeripheralDeviceNub <class IOSCSIPeripheralDeviceNub, id 0x100000256$
| {
| "IOProviderClass" = "IOSCSIProtocolServices"
| "Protocol Characteristics" = {"Physical Interconnect"="USB","Physical Int$
| "IOMatchCategory" = "SCSITaskUserClientIniter"
| "Product Revision Level" = "2.02"
| "IOProbeScore" = 0
| "Product Identification" = "External"
| "CFBundleIdentifier" = ""
| "Vendor Identification" = "Generic"
| "IOClass" = "IOSCSIPeripheralDeviceNub"
| "Peripheral Device Type" = 0
| }
*** 20120521 RJVB
I created a fork ( that works with enclosures that weren't supported before, in 64bit. I'd of course be more than happy to see my tweaks included in your code (possibly a branch)!
- some code cleanup
- use NULL instead of 0 or 0L when pointers/addresses are concerned
- accept CHECK_CONDITION request status when reading SMART data. My guess is that this is comparable to the smartmontools' "-T permissive" option.
what about PASS_THROUGH_16()? The function is defined but unused; is it a 'drop-in' replacement for PASS_THROUGH_12() and if so, could one issue the 16 variant after the 12 variant failed in hope of supporting more enclosures?
Jump to Line
Something went wrong with that request. Please try again.