Screen blanking in Qi-Hardware Ben NanoNote

When using Qi-Hardware Ben NanoNote gadget as monitoring other machines (like a server) via usb-net (is pretty cool as small monitor display) but by default OpenWRT firmware blanks the screen after a while.

I wrote a small shell script for avoid this:

#!/bin/sh
infodir="/sys/class/power_supply/usb"
connected=`cat $infodir/online`
if [ "0" = $connected ] then
    setterm -blank 1 > /dev/tty0 
    echo "`date` - Battery, enabled screen blanking"
else
    setterm -blank 0 > /dev/tty0
    echo "`date` - Connected, disabled screen blanking"
fi 

This cannot be used in a crontab (the original idea) but is useful, enjoy :)

Comments

Popular Posts