No description
  • Rust 95.2%
  • Nix 4%
  • Shell 0.8%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
2026-11-09 05:08:45 -05:00
src wait for all child processes to exit 2026-11-09 05:08:45 -05:00
.gitignore setup 2026-11-02 22:49:03 -05:00
Cargo.lock now here's the thing 2026-11-06 07:22:04 -05:00
Cargo.toml now here's the thing 2026-11-06 07:22:04 -05:00
default.nix now here's the thing 2026-11-06 07:22:04 -05:00
deploy.sh now here's the thing 2026-11-06 07:22:04 -05:00
LICENSE.txt now here's the thing 2026-11-06 07:22:04 -05:00
README.md tweaks 2026-11-06 13:25:00 -05:00

wd-fan-control

This is a small Rust program managing thermals on a WD MyCloud EX4100. It:

  • Sets the fan speed based on CPU and disk temperatures
  • Writes status to the front LCD screen
  • Shuts down the system if anything gets dangerously hot

It's partially based on mcm-daemon, which has the same general goal, but was causing me issues.

up_send_ctl

This is a mysterious binary that I yoinked from the stock firmware, alongside an up_send_daemon. This is a (extremely jank, but generally functional) CLI interface for the MCU. I messed around with it for a while to try to figure out everything it does, and these are my findings.

Commands

Running up_send_ctl with no arguments helpfully prints a list of commands. Unhelpfully, if you do anything wrong it generally just segfaults.

I was not able to get any results from anything with a "???".

  • SetFanSpeed <power: 0-255>: actually sets fan speed
  • FanStatusGet: ???
  • SysName : sets system name on display
  • SysIP1 <x.x.x.x>: sets first system IP
  • SysIP2 <x.x.x.x>: sets second system IP
  • SysIP1Dis: marks first IP as disconnected
  • SysIP2Dis: marks second IP as disconnected
  • SysIPBondSet: hides second IP
  • SysIPBondClean: shows second IP
  • HDDExist: ???
  • VolStatus: ???
  • VolRaidState: ???
  • VolUsedPct : ???
  • VolClean: ???
  • MFGLCD <test: 0|1|2> : ???
  • LCDSleepMode <0|1>: when on, the LCD will automatically turn off when idle
  • FanSpeed : sets fan speed display (arbitrary string)
  • HDHealthy : sets Drive Status (arbitrary string)
  • CapacityFree : sets Capacity display (arbitrary string)
  • ErrStatus: ???
  • DeviceShutdownMsg: force display to show "System is shutting down", permanent until reboot
  • DeviceRstMsg: force display to show "System rebooting", permanent until reboot
  • Standby <mode: 0|1|2|3|4|5|6>: ???
  • OledTest <0|1|2>: ???
  • FirmwareVer : sets the displayed firmware version (arbitrary string)
  • temperature : sets the displayed temperature
  • usbExist <0|1>: ???
  • backupStatus <0|1>: ???
  • backupDirection <0|1>: ???
  • DeviceReady: display exits startup mode
  • APREnable: ???
  • APRDisable: ???
  • DeviceShutdown <delay, seconds>: restart the NAS
  • MCUReset <delay, seconds>: restart the NAS
  • DeviceShutdownByUPS <delay, seconds>: restart the NAS
  • MCUVer: ???
  • HddAccessLed <set: 0|1> <hdd: 0|1|2>: ???
  • MFGMode <0|1>: locks display to current view
  • ThermalGet: ???
  • GetOnCause: ???
  • PwrLedBlue <0 (off) | 1 (on) | 2 (blinking) | 3 (breath)>: set power LED state
  • PwrLedBlueBreath : ???
  • APRStat: ???
  • WOLEnable: enable wake-on-lan (presumably, untested)
  • WOLDisable: disable wake-on-lan (presumably, untested)
  • WOLStat: ???
  • PowerStatus: ???
  • SataLED <0 (off) | 1 (on) | 2 (blinking)>: control the drive bay lights
  • SataStatus: ???