LaFonera Software Heartbeat

From DD-WRT Wiki

Revision as of 03:03, 19 February 2007 by Wildblue (Talk | contribs)
Jump to: navigation, search

You are here: DD-WRT wiki mainpage / LaFonera / Software / Heartbeat

The Fon heartbeat

This is the way to simulate the fon heartbeat, so that the LaFonera with dd-wrt is shown as active on the fon maps.

It is based on the work of freddy (http://fon.freddy.eu.org), futejia (http://futejia.blogspot.com) and krikkit (http://www.krikkit.net)


At first you have to register your LaFonera on www.fon.com

If you have done this successfully there are two ways you can enable it on maps.fon.com.

Fast and simple

This is the most easy way (This guide is also available on http://www.wildblue.de/fonera/heartbeat/howto). It is for simply putting your LaFonera on maps.fon.com without any need to set up your own WEBserver / FTPserver.

made by wildblue!

Actual Version: 2.0.3

Feel free to ask me for an update of the code.


  1. Open the web-based configuration on your DD-WRT-Fonera (e.g. 192.168.1.1)
  2. Go to the "Administration" section, then to "Commands" (German: "Diagnose")
  3. paste the follwing commands and select "Save Startup" (German: "Startup speichern")
#!/bin/sh
mkdir /tmp/simthefon

echo '#!/bin/sh
sleep 60
cd /tmp/simthefon
/usr/bin/wget http://www.wildblue.de/fonera/heartbeat/key
/usr/bin/wget http://www.wildblue.de/fonera/heartbeat/simthefon
/usr/bin/wget http://www.wildblue.de/fonera/heartbeat/known_hosts
cat /tmp/simthefon/known_hosts >> /tmp/root/.ssh/known_hosts
chmod a+x /tmp/simthefon/simthefon
( /tmp/simthefon/simthefon cron >/tmp/simthefon/simthefon.log & ) &' >> /tmp/simthefon/heartbeat

echo 'SHELL=/bin/sh
PATH=/etc:/bin:/sbin:/usr/bin:/usr/sbin
HOME=/tmp/root

*/5 * * * * root /tmp/simthefon/simthefon cron >/tmp/simthefon/simthefon.log' >> /tmp/cron.d/heartbeat

chmod a+x /tmp/simthefon/heartbeat
/tmp/simthefon/heartbeat

stopservice cron && startservice cron

4. Now you can reboot your router or simply past the commands again and select "Run Commands" (German: "Kommandos ausführen")


Thats` it. Your LaFonera is now active on maps.fon.com

* Keep in mind that it can take some time before your router gets active on the maps, it doesn't update immediately because FON is updating their maps not every minute.

Also please note, that i will change the script, if nessesary, for the correct execution on your device.


more difficult ... the advanced way

use your own WEBserver / FTPserver

The method shown above is the simpliest way to activate your LaFonera on maps.fon.com. If you are a little more advanced in setting up a webserver or if your workstation is running 24/7 then the second way might be interesting for you.

If somebody could make the router think that he (the attacker) is www.wildblue.de or if the www.wildblue.de server gets compromised, he is able to do *anything* as root on your router! I don't think this could happen because my webserver is no dynDNS device, its a web-hosted server. If you are a little paranoic or just want to test your skills, feel free to try the second solution:

1. download the script from http://www.wildblue.de/fonera/heartbeat/simthefon

2. download the fon key from http://www.wildblue.de/fonera/heartbeat/key

3. download known_hosts file from http://www.wildblue.de/fonera/heartbeat/known_hosts

4. copy the files "simthefon, key, known_hosts" on your local WEBserver / FTPserver or any other location where you can download it with wget on your LaFonera afterwards...

6. paste the text below into Administration --> Commands --> Commands input field and click "Save startup"

#!/bin/sh
sleep 60
mkdir /tmp/simthefon
cd /tmp/simthefon
/usr/bin/wget ftp://192.168.1.2/simthefon/key
/usr/bin/wget ftp://192.168.1.2/simthefon/simthefon.sh
/usr/bin/wget ftp://192.168.1.2/simthefon/known_hosts
cat /tmp/simthefon/known_hosts >> /tmp/root/.ssh/known_hosts
chmod a+x /tmp/simthefon/simthefon.sh
( /tmp/simthefon/simthefon.sh >/tmp/simthefon/simthefon.log & ) &

do not forget to edit the wget commands, to fit your locations...

reboot your LaFonera...

your hotspot should now be ACTIVE on http://maps.fon.com

  • In the near future maybe this script could be included in the DD-WRT source (depends on BrainSlayer)