itek powered Raspberry Pi runs for over 7 hours


I tested a model B Raspberry Pi (512 MB) using an itek power bank (5600 mAh), with Internet enabled. It pinged my server every minute, and ran for about 7 hours 22 minutes.

Raspberry Pi & iTek battery pack
Raspberry Pi & itek battery pack

Set Up

  1. Raspberry Pi Model B (512 MB RAM), running latest updated Raspbian Wheezy build (with no additional background services running) on an 8 GB class 4 SD card
  2. itek power bank (5600mAh)
  3. Internet connectivity through Ethernet

I wrote a shell script to call a web based PHP script on my server. I set a cron to run this shell script every minute. What happens is the shell scripts passes the client side timestamp, and server writes it, along with sever side timestamp to a file.
The source code of both scripts is provided below.


rawurlencode() {
local string="${1}"
local strlen=${#string}
local encoded=""
for (( pos=0 ; pos<strlen ; pos++ )); do
    case "$c" in
        [-_.~a-zA-Z0-9] ) o="${c}" ;; * )  printf -v o '%%%02x' "'$c"
    echo "${encoded}"

CLIENT_TIME=`date +"%c"`
URL=$(rawurlencode "$CLIENT_TIME")

/usr/bin/wget -qO- $URL &> /dev/null


  • The script started at 4:45:12 AM client time and ended at 12:07:01 PM client time. That’s almost 7 hours 22 minutes
  • The reason to attach the device to Internet was because I don’t see the point of testing a bare naked Raspbery Pi. Most real life applications would require network connectivity
  • That brings me to another realization: I should have used my WiFi adapter instead of Ethernet to test real world situation. I plan to do this soon.
  • I was fortunate not to lose Internet connectivity, but I should have logged the timestamp locally as well
  • 7 hours is all hunky dory but itek is a fairly heavy device, and takes eon to recharge. I don’t see it a very likely companion to my Raspberry, if I intend to shoot them in air sometime.

As mentioned, I’ll test the setup again with a WiFi adapter, and update the results.

[How To] Implementing Shindig.

I should have written an article/tutorial on how to implement/use Shindig to convert your SNS into and OpenSocial compliant SNS. Time, however, has prevented me from doing it so far. May be sometime later.

For now, you can have a look at my presentation on the same topic. I had presented it at Barcamp Bangalore 7, and PHPCamp Pune. It was recommended by Dan Peterson, Google, on the Shindig developer’s mailing list. 🙂

For those who don’t have an idea what I am talking about; I have been (officially) working on OpenSocial for quite sometime. OpenSocial is a specification developed by giants like Google, MySpace, Ning, etc. to provide a common platform (API) for social app developers. Shindig, an Apache incubator project, is what can help your site become OpenSocial compliant.

By the way, I am referring to the Six degrees of Separation in the initial slides. 🙂