LaFonera Software Heartbeat

From DD-WRT Wiki

(Difference between revisions)
Jump to: navigation, search
Revision as of 16:25, 26 June 2007 (edit)
Wildblue (Talk | contribs)
m
← Previous diff
Revision as of 02:19, 28 June 2007 (edit) (undo)
Wildblue (Talk | contribs)
m (reworked category support)
Next diff →
Line 1: Line 1:
[[Category:LaFonera]] [[Category:LaFonera]]
 +[[Category:LaFonera_(en)]]
[[Category:LaFonera_Software]] [[Category:LaFonera_Software]]
 +[[Category:LaFonera_Software_(en)]]
You are here: '''[[Main_Page|DD-WRT wiki mainpage]] / [[LaFonera|LaFonera]] / [[LaFonera_Software|Software]] / Heartbeat''' You are here: '''[[Main_Page|DD-WRT wiki mainpage]] / [[LaFonera|LaFonera]] / [[LaFonera_Software|Software]] / Heartbeat'''

Revision as of 02:19, 28 June 2007

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.

advanced setup with better security (requires a local/trusted server)

IMPORTANT! This method doesent seem to work, have tested it thrououghly on the latest two-three releaases and I never get active. The above script from Wildblue however works correctly. This one below just dolesnt make any connection, the only message in the logfile is *** starting mode *** and nothing else! You can still adopt the above script tomrelaym on your own HTTP/FTP server, like below, to gain security.

I have the same problem with the advanced method, script v2.0.3 too. when i made a ps, I can see the "dbclient" process which remains blocked. When I execute manually the script with ( /tmp/simthefon/simthefon.sh >/tmp/simthefon/simthefon.log & ) & , everything is OK. Wildblue, can you look at that? If necessary, I can provide logs. --Microbug 15:51, 13 Apr 2007 (CEST)


- 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 also be a good idea to inspect the content of the downloaded 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"

#!/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


Maybe you want to see what is developed?

You can always check the development progress at

http://www.wildblue.de/fonera/heartbeat/versions/simthefon_2.0.0

http://www.wildblue.de/fonera/heartbeat/versions/simthefon_2.0.1

http://www.wildblue.de/fonera/heartbeat/versions/simthefon_2.0.2

http://www.wildblue.de/fonera/heartbeat/versions/simthefon_2.0.3

etc.

You can find the actual Version at http://www.wildblue.de/fonera/heartbeat/simthefon

When you run this file the version number is displayed.


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




this page was made by wildblue!