Skip to content
kulvind3rPublic

About

EC Register Reader based on PawnIO driver

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

8 Commits

Folders and files

Repository files navigation

ECReader

ECReader

Read-only Windows tool for reading Embedded Controller registers via PawnIO driver.

‼️ CAUTION

  • Claude Code / Sonnet - 4.5 assisted development. Author is not a C++ or embedded system dev. Use at your own risk.
  • Do not run multiple instances. Do not run during BIOS updates. Easy to forget if running in background.

Features

  • Monitor mode: Live 16×16 grid showing all 256 registers with change detection
  • Dump mode: One-time snapshot of all registers
  • Read mode: Query specific registers for scripting
  • Fast: Optimized to scan all 256 registers in ~1.5 seconds
  • Safe: Read-only, mutex-protected, no EC hammering

Quick Start

Prerequisites:

Run:

ECReader.exe monitor           # Live grid monitor
ECReader.exe dump              # One-time snapshot
ECReader.exe -r 30 31 32       # Read specific registers
ECReader.exe version           # Show version

Commands

Monitor Mode

ECReader.exe monitor              # 5 second updates
ECReader.exe monitor -i 2         # 2 second updates (minimum)

Shows 16×16 grid with color coding:

  • Red = value changed since last scan. First Scan always shows red.
  • Green = non-zero unchanged value
  • Gray = zero value

Grid format makes register addresses easy to calculate:

  • Row labels: 00:, 10:, 20:, ..., F0:
  • Column headers: +0, +1, ..., +F
  • Register address = row + column (e.g., row 20: + column +5 = 0x25)

Dump Mode

ECReader.exe dump                 # Hex values
ECReader.exe dump -d              # Decimal values

One-time 16×16 grid snapshot. Red = non-zero, gray = zero.

Read Mode

ECReader.exe -r 30                # Single register
ECReader.exe -r 30 31 32          # Multiple registers
ECReader.exe -r 30 -d             # Decimal output

Output: 0x30:5A,0x31:3C,0x32:28

Options

Flag Description
-i <seconds> Update interval (min: 2, default: 5)
-d Decimal instead of hex
-v Verbose debug output (for -r command only)
-s Show statistics

Use Cases

Find CPU temperature register:

  1. Start monitor mode
  2. Run stress test
  3. Watch for increasing values

Find fan speed register:

  1. Start monitor with -i 2
  2. Change fan speed
  3. Watch for changing values

Script automation:

while($true) {
  .\ECReader.exe -r 30
  Start-Sleep 1
}

Performance

  • Full scan: ~1.5 seconds (256 registers)
  • Per register: ~6ms average
  • Memory: ~2MB runtime
  • Optimizations: Adaptive busy-wait, retry logic, reduced timeouts

Safety

  • ✅ Read-only (no write capability)
  • ✅ Mutex synchronization
  • ✅ 2-second minimum interval
  • ✅ Automatic retry on conflicts
  • ✅ Clean error handling

Troubleshooting

"Cannot open PawnIO driver"

sc query PawnIO
sc start PawnIO

Run as Administrator.

Monitor shows no changes

  • Close HWiNFO and other monitoring tools
  • Try faster updates: -i 2
  • Use dump to see current values

Timing: ~6ms per register with optimized waits

Building

WSL + MinGW:

sudo apt install mingw-w64
./build.sh

Credits

Built using PawnIO driver for EC access and LibreHardwareMonitor for Implementation approaches on how to use PawnIO driver.

About

EC Register Reader based on PawnIO driver

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Contributors

Languages