0

I need to access Fan Speed.

Board is KGPE-D16 with Winbond W83667HGA.

I have got SMBIOS data about connectors and I need to read/write them

[Port Connector Information] (Type 8) 08 09 17 00 01 FF 00 00 FF 46 52 4E 54 5F 46 41 .........FRNT_FA 4E 31 00 00 N1..
Type 0x08 (8) Length 0x09 (9) Handle 0x0017 (23) Internal Reference Designator String1 - "FRNT_FAN1" Internal Connector Type 0xFF - Other External Reference Designator NULL External Connector Type 0x00 - None Port Type 0xFF - Other

The problem is I never used to WDK and WMI things. I am looking at Open-Hardware-Monitor and cannot understand how to insert in there. I also have RWEverything but its command/adress system is hard to understand. This problem is so simple - I just want read/write one number.

ADD1. Fan Speed is already controlled by BIOS. So I want to read it first.

ADD2. Doing in RWEverything should be easier. But I do not understand its CLI.

ADD3. In RWEverything there is command: I{len} {port}. I did not get it work yet.

ADD4. The function that does IO looks like this

private byte ReadByte(byte bank, byte register) {
  Ring0.WriteIoPort(
     (ushort)(address + ADDRESS_REGISTER_OFFSET), BANK_SELECT_REGISTER);
  Ring0.WriteIoPort(
     (ushort)(address + DATA_REGISTER_OFFSET), bank);
  Ring0.WriteIoPort(
     (ushort)(address + ADDRESS_REGISTER_OFFSET), register);
  return Ring0.ReadIoPort(
    (ushort)(address + DATA_REGISTER_OFFSET));
} 

private void WriteByte(byte bank, byte register, byte value) {
  Ring0.WriteIoPort(
     (ushort)(address + ADDRESS_REGISTER_OFFSET), BANK_SELECT_REGISTER);
  Ring0.WriteIoPort(
     (ushort)(address + DATA_REGISTER_OFFSET), bank);
  Ring0.WriteIoPort(
     (ushort)(address + ADDRESS_REGISTER_OFFSET), register);
  Ring0.WriteIoPort(
     (ushort)(address + DATA_REGISTER_OFFSET), value); 
}

The function call that reads looks like this ReadByte(0, FAN_BIT_REG[i]); ReadByte(FAN_TACHO_BANK[i], FAN_TACHO_REG[i]);

Because this codes from OpenHardwareMonitor are stupidly retarded, I can not understand what the hell is 'address'.

sanaris
  • 145
  • 6
  • You dont need WDK and stuff. Use WinRing0 or something. Some C# code adjusting my fanspeed on older motherboard https://github.com/leppie/TempServe/blob/master/TempServe/SuperIO.cs#L708 – leppie Mar 23 '14 at 15:53
  • As I have found, I2C channels on my motherboard are closed, and this motherboard is really not a choice for any hardware enthusiast. It can be solved in hardware way: cut control wire from fan, or if that doesn't work (not for all PWM fans and Mobos), put it under approximately +1 volt above ground wire. – sanaris Apr 14 '14 at 09:32
  • I doubt you need to use I2C for fan control. That chip normally is accessible via the ISA I/O port. The code from OHM is hardly stupid. Try understand it, and poke around with RWEverything. Reading the datasheet repeatedly and understanding it is very important. Depending on modes, settings can live in different registers. Do you have fan software provided from your MB manufacturer? Make snapshot before/after setting something and compare the banks. – leppie Apr 14 '14 at 09:37

0 Answers0