Giter VIP home page Giter VIP logo

apu-led-button's Introduction

apu-led-button

Linux kernel module for PC Engine's APU system board to access the three front LEDs and the reset button. Originally published here but slightly modified for Ubuntu Server 14.04 and newer.

After the installation, the first LED will indicate if the system is up using ledtrig-timer. You could also use ledtrig-heartbeat instead if you prefer a more active status LED. The second and third LED will act as RX/TX indicators for the network port of your choice. The configuration sample below uses eth1 because it's the WAN port in my setup. Additionally, pressing the front reset button for at least a second will issue a beep and soft-reboot the APU.

See here for more trips and tricks for the APU.

Installation

# sudo apt-get install linux-headers-$(uname -r) build-essential
# git clone https://github.com/trick77/apu-led-button
# cd apu-led-button
# make && sudo make install

(as root)

# echo "ledtrig-timer" >> /etc/modules
# echo "ledtrig-heartbeat" >> /etc/modules
# echo "apuled-button" >> /etc/modules

Sample configuration

Insert these lines to /etc/rc.local just above exit 0:

echo "timer" > /sys/class/leds/apu\:1/trigger
echo "1750" > /sys/class/leds/apu:\1/delay_on
echo "250" > /sys/class/leds/apu\:1/delay_off
/usr/local/sbin/apuled eth1 -c nrt -f
/usr/local/sbin/apubutton&

...and reboot.

The LEDs trigger capabilities are listed in /sys/class/leds/apu:1/trigger with the currently active trigger marked in brackets.

# cat /sys/class/leds/apu\:1/trigger
none usb-gadget usb-host cpu0 cpu1 [timer] rfkill0 phy0rx phy0tx phy0assoc phy0radio phy0tpt heartbeat

License

  • Copyright © 2014, Mark Schank
  • Copyright © 2013, Christian Herzog

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation.

apu-led-button's People

Contributors

trick77 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

apu-led-button's Issues

DKMS support

The current Makefile doesn't support DKMS yet. The code has to be recompiled manually whenever a new kernel version is installed.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.