LaFonera Software Heartbeat

From DD-WRT Wiki

(Difference between revisions)
Jump to: navigation, search
Revision as of 10:28, 8 March 2007 (edit)
Krikkit (Talk | contribs)
m
← Previous diff
Current revision (00:00, 4 October 2007) (edit) (undo)
Wildblue (Talk | contribs)
m (Protected "LaFonera Software Heartbeat": There is only one method of sending fon.com the heartbeat. I created a new site for developing purposes. [edit=sysop:move=sysop])
 
(32 intermediate revisions not shown.)
Line 1: Line 1:
[[Category:LaFonera]] [[Category:LaFonera]]
 +[[Category:LaFonera_(en)]]
[[Category:LaFonera_Software]] [[Category:LaFonera_Software]]
-You are here: '''[[Main_Page|DD-WRT wiki mainpage]] / [[LaFonera|LaFonera]] / [[LaFonera_Software|Software]] / Heartbeat'''+[[Category:LaFonera_Software_(en)]]
 +You are here: '''[[Main_Page|DD-WRT wiki mainpage]] / [[LaFonera_(en)|LaFonera]] / [[:Category:LaFonera_Software_(en)|Software]] / Heartbeat'''
== The Fon heartbeat == == The Fon heartbeat ==
Line 17: Line 19:
This is the most easy way (This guide is also available on http://www.wildblue.de/fonera/heartbeat/howto). 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. It is for simply putting your LaFonera on maps.fon.com without any need to set up your own WEBserver / FTPserver.
 +
 +
 +<div style="text-align: left; padding: 5px; background: #FFBE69; border: #000000 1px solid;">Version changed to 2.0.4. You have to update the code from this page on your LaFonera, everything else is done automatically. </div>
''' made by [[User:wildblue|wildblue!]]''' ''' made by [[User:wildblue|wildblue!]]'''
-'''Actual Version: 2.0.3'''+'''Actual Version: 2.0.4'''
 + 
 +<pre>
 +version 2.0.0 (modified for DD-WRT) (md5 362706c581b9c7d1c1799d6936cde455)
 + 
 +version 2.0.1 (autodetection MAC) (md5 dd9c50e0ff86c4ed87315d00a892a076)
 + 
 +version 2.0.2 (added cron mode) (md5 c12695b038a37bf789477cd6864578f7)
 + 
 +version 2.0.3 (changed MAC-retrival) (md5 15f4b146765511140b73f87eba7cfe12)
 + 
 +version 2.0.4 (changed update freq.) (md5 0726ceba23bb4e3fbcca4ca02d443f41)
 + 
 +You can verify the md5 hashes with the linux-command "md5sum simthefon_2.0.x"
 + 
 +</pre>
Feel free to ask me for an update of the code. Feel free to ask me for an update of the code.
Line 35: Line 55:
echo '#!/bin/sh echo '#!/bin/sh
-sleep 60+sleep 30
cd /tmp/simthefon cd /tmp/simthefon
/usr/bin/wget http://www.wildblue.de/fonera/heartbeat/key /usr/bin/wget http://www.wildblue.de/fonera/heartbeat/key
Line 53: Line 73:
/tmp/simthefon/heartbeat /tmp/simthefon/heartbeat
-stopservice cron && startservice cron</pre>+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.+
- +
-== advanced setup with better security (requires a local/trusted server)==+
- +
-- The method shown above is potentially dangerous! If the www.wildblue.de server gets compromised, it is able to execute *anything* as root on your router! It is not recommended to choose that simple approach. Copy the scripts to a local/trusted ftp/web server, like described below, instead! It would be also a good idea to inspect the content of the downloades script files!+
- +
-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"+
- +
-<pre>+
-#!/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 & ) &+
</pre> </pre>
-do not forget to edit the wget commands, to fit your locations...+''' There are no different versions for sending fon.com the heartbeat from your LaFonera. If you wish to add features, let me know.'''
-reboot your LaFonera... 
-your hotspot should now be ACTIVE on http://maps.fon.com+''' I will publish an updated version of the code sending LaFonera's heartbeat in the next days. (2007-10-04). '''
-* In the near future maybe this script could be included in the DD-WRT source (depends on BrainSlayer)+Inspired by Pepsimax2k's modifications of freddys code, i will reduce the number of files downloaded but not reduce any functionality like he did.
-* Here is a Link to another Forum where the heartbeat-function was discussed earlier [http://boards.fon.com/viewtopic.php?p=7517#7517 Heartbeat for the LaFonera]+You can rewiew Pepsimax2k's code if you want to help developing [[LaFonera_Software_Heartbeat-dev|here]].

Current revision

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.


Version changed to 2.0.4. You have to update the code from this page on your LaFonera, everything else is done automatically.


made by wildblue!

Actual Version: 2.0.4

version 2.0.0 (modified for DD-WRT)   (md5 362706c581b9c7d1c1799d6936cde455)

version 2.0.1 (autodetection MAC)     (md5 dd9c50e0ff86c4ed87315d00a892a076)

version 2.0.2 (added cron mode)       (md5 c12695b038a37bf789477cd6864578f7)

version 2.0.3 (changed MAC-retrival)  (md5 15f4b146765511140b73f87eba7cfe12)

version 2.0.4 (changed update freq.)  (md5 0726ceba23bb4e3fbcca4ca02d443f41)

You can verify the md5 hashes with the linux-command "md5sum simthefon_2.0.x"

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 30
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

There are no different versions for sending fon.com the heartbeat from your LaFonera. If you wish to add features, let me know.


I will publish an updated version of the code sending LaFonera's heartbeat in the next days. (2007-10-04).

Inspired by Pepsimax2k's modifications of freddys code, i will reduce the number of files downloaded but not reduce any functionality like he did.

You can rewiew Pepsimax2k's code if you want to help developing here.