No description
- Rust 95.2%
- Nix 4%
- Shell 0.8%
| Filename | Latest commit message | Latest commit date |
|---|---|---|
|
|
||
| src | ||
| .gitignore | ||
| Cargo.lock | ||
| Cargo.toml | ||
| default.nix | ||
| deploy.sh | ||
| LICENSE.txt | ||
| README.md | ||
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: ???