Skip to content
/ asmc Public

A low-level interface for accessing AppleSMC.kext with C

License

Notifications You must be signed in to change notification settings

mrcn04/asmc

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

asmc

asmc is a library of low-level interface that allow you to read / write values to the SMC using the AppleSMC kernel extension with C. You can read the temperature of the sensors, get the fan speeds etc. The source code does not belong to me. I only edited, added, modified, enchanged the codes in a way that I need.

Caution!

This tool will allow you to read / write values to the SMC which could or could not irreversably damage your computer. Especially manipulating the fans could cause overheating and permanent damange. USE THIS PROGRAM AT YOUR OWN RISK!

Usage

With Command Line

Compiling
make
Running
./asmc

or

sudo make install # installs to /usr/local/bin
asmc

Example Usage with Swift

Create a Bridging Header file on xCode in order to access the C header.
func callCFunction() {
  SMCOpen()
  readAndPrintFanRPMs()
  ...
  SMCClose()
}

Tested on

Works both on Intel and Apple Silicon based Macbooks.

Tested on 2018 15″ Intel Macbook Pro & 2021 14″ M1 Max Macbook Pro

References

I might have looked up and took inspiration from other places as well. These are the ones that I can remember.

Source

Apple System Management Control (SMC) Tool Copyright (C) 2006

License

This project is under GPL-3.0 License

About

A low-level interface for accessing AppleSMC.kext with C

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published