4

I've been at it for a month, and still can't find a solution to this deceptively difficult problem. Specifically, I would like to read temperatures from the W83793 chip, using C#, on a Windows machine. I have virtually no experience with low-level programming. All I know is that in order to read from this chip, I need to access the SMBus, and that alone will get me started.

Despite going through every SMBus document I could find online, I am still clueless as to how I should start. I searched for C# SMBus libraries online, but couldn't find anything aside from a few Linux related documents. I don't want to re-invent the wheel here. There's got to be a library, a tutorial, or other resource out there to explain exactly how to access the SMBus in C# on Windows.

What is a simple way to access the SMBus in C#? If you can help me out to the point where I can pull SOME value, ANY value, out of a slave device on the SMBus, that will get me started.

Dalal
  • 1,096
  • 2
  • 17
  • 38

2 Answers2

1

Look at OpenHardware monitor. It will have code dealing with that already.

Else use WinRing0, if you feel adventurous. :) You would normally access the smbus via ISA port IIRC. (I did this previously before I discovered OpenHardwareMonitor, a very fun exercise).

A helpful tool is called 'ReadWriteEverthing' for poking at all kinds of hardware ports. Expect blue screens or freezes :)

leppie
  • 115,091
  • 17
  • 196
  • 297
  • I thought OpenHardwareMonitor didn't have SMBus support at this point. Where in the code (file and line) does it access the SMBus? All I see is the Ring0 class. But I don't know how to use it to access the SMBus. Also, OpenHardwareMonitor doesn't display any temperatures out of the W83793 chip, while CPUID Hardware Monitor and others do, so to me it looks like OpenHardwareMonitor doesn't appear to support SMBus. – Dalal Aug 16 '11 at 22:00
  • @Dalal: Speak to the developer of OHM. He is a very helpful. – leppie Aug 17 '11 at 04:28
  • 1
    Will try to do so - but also, you mentioned that you used to access the SMBus using ISA port IIRC _before_ you found OHM, which I presume means that you currently know how to use OHM to access the SMBus? Could you give me any hints to get started? Anything you can give me would be great. Thanks! – Dalal Aug 17 '11 at 16:10
0

Have you looked at the Windows Driver Kit? Searching around the web, it seems like its the place to start when communicating on SMBus from within windows.

Nate
  • 30,286
  • 23
  • 113
  • 184
  • 2
    To save anyone who sees this the time and effort - Windows has no native SMBus support. It does not communicate with SMBus at all. It leaves everything to the BIOS, which exposes limited functionality to certain SMBus devices over AHCI. – Polynomial Jun 17 '13 at 13:36