Mot-clé - freerunner

Fil des billets - Fil des commentaires

vendredi, novembre 9 2012

Using a DreamPlug with Debian as an IPv4/IPv6 router for a home LAN behind a FreeBox

The goal of this article is to describe the setup I've made for my home LAN behind a FreeBox (French ISP

Lire la suite...

mercredi, mars 3 2010

Measuring OpenMoko FreeRunner battery life with SHR-T

I've tried and apply the technique shown in Measuring Freerunner battery life for my FreeRunner which runs SHR-T.

Unfortunately, I couldn't recompile the wkalrm program on the freerunner (problems of compilation chain, I think). So I decided to use atd to insert an at command which would wake up the FR... but that isn't exactly easy since no at command seems packaged for the atd-over-fso that comes with SHR-T (actually, there's an at script provided in the initial atd version it was based on).

Thanks to help provided on the SHR ML, I've written this short resume-at shell script that can be used to insert an at command/script that will wake up the FR after a certain amount of minutes :


# Will program an at job that will just execute in some number of minutes (passed in args)
# This script will do nothing, but can be interesting to wakeup the machine

# It uses atd-over-fso for atd execution

now=`date +'%s'`

let "seconds = minutes * 60"

# add some minutes to now
let "time = now + seconds"

# filename for the at script

# Install the script
cat >$filename << EOF


echo \$this >>/tmp/resume-at.log
date >>/tmp/resume-at.log

rm \$this
echo "update" > /var/spool/at/trigger


# Make the at script executable
chmod +x $filename

# initialize the logs file
touch /tmp/resume-at.log

# Notify atd-over-fso that a new script was installed
echo "update" > /var/spool/at/trigger

Now, all that is left to do is to change the battery monitoring script to :


while :

echo ===========================================
cat /sys/class/power_supply/battery/capacity
cat /sys/class/i2c-adapter/i2c-0/0-0073/resume_reason
cat /sys/class/i2c-adapter/i2c-0/0-0073/neo1973-resume.0/resume_reason
#/root/wkalrm +30m
/home/root/resume-at 30
sleep 20
apm -s


The script has now been run, and here are the results : discharge in 66 hours and 10 minutes : Battery discharge curve

Hope this helps.