dimPi is a simple shell script for controlling a Raspberry Pi's onboard LEDs (ACT, PWR, LNK, SPD and SND).
By default, it disables all LEDs directly after boot-up.
It contains lan951x-led-ctl
[1] and lan7800-led-ctl
[2] by Dominic Radermacher as git modules.
Use git clone --recursive https://github.com/poulet-lab/dimPi.git
to obtain a local clone of the repository, including the submodules.
Change to the cloned dimPi
directory and execute install.sh
as root.
The install script will fetch the necessary dependencies, compile the sources and move everything in its place.
It will also enable dimPi.service
to automatically disable all LEDs after booting up.
gcc
usbutils
libusb-1.0-0-dev
The dependencies are only necessary for compilation and installation. The install script will try to fetch them automatically.
dimPi takes a single argument:
dimPi 0
- disable all LEDs,dimPi 1
- enable all LEDs, ordimPi s
- return all LEDs to their default state.
Alternatively, use the supplied systemd service:
systemctl start dimPi
- disable all LEDs, orsystemctl stop dimPi
- return all LEDs to their default state.
So far, I have only tested the script on Raspberry Pi Models 3B and 3B+ running Raspbian. I expect it to run on all RaspberryPis using a LAN951x or LAN7800 Ethernet controller and running a Debian derivative (rasbian, Noobs, ...). However, dimPi will currently not work correctly on a Pi Zero board (this may be addressed at a later point).
[1] https://mockmoon-cybernetics.ch/cgi/cgit/linux/lan951x-led-ctl.git
[2] https://mockmoon-cybernetics.ch/cgi/cgit/linux/lan7800-led-ctl.git