Mittwoch, 7. Juli 2021

Debian on WD My Cloud Home single-bay (MCH) - part 3 (controlling the LED)

 In part 1 Debian Buster was installed via debootstrap. Part 2 discussed how a suitable kernel can be compiled.

Getting the LED to work

Having looked at the wrong places, I finally got the LED control to work. The DTB configures all internal devices and exposes them at /proc/devices/platform.

Aparrently there ar four PWM devices, of which only #3 is enabled. By adjusting the duty cycle one can actually control the LED:

echo 0 > /sys/devices/platform/980070d0.pwm/dutyRate3   # LED off
echo 100 > /sys/devices/platform/980070d0.pwm/dutyRate3 # LED 100% brightness