FON Boards Forum Index FON Boards
The Fonero meeting point
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Gpl heartbeat script for non official firmware
Goto page Previous  1, 2, 3, 4, 5 ... 11, 12, 13  Next
 
Post new topic   Reply to topic    FON Boards Forum Index -> Community Help
View previous topic :: View next topic  
Author Message
Ross
MOD
MOD


Joined: 09 Feb 2006
Posts: 438

PostPosted: Tue Aug 01, 2006 17:23    Post subject: Reply with quote

Dema, I appreciate your efforts and agree that FON uses open source firmware and you have the right to experiment. I also think you have the right to post about it. My point was that I must focus on helping Foneros who are using the official FON firmware. If in the future if I have extra capacity I'll be happy to assist you, at this time I can't.
Back to top
View user's profile Send private message Send e-mail Visit poster's website
dema
Fonero Pub A


Joined: 09 Jun 2006
Posts: 188
Location: Lamporecchio (pt) - ITALY

PostPosted: Tue Aug 01, 2006 17:35    Post subject: Reply with quote

Ross wrote:
Dema, I appreciate your efforts and agree that FON uses open source firmware and you have the right to experiment. I also think you have the right to post about it. My point was that I must focus on helping Foneros who are using the official FON firmware. If in the future if I have extra capacity I'll be happy to assist you, at this time I can't.

Do not worry Ross , I'm not angry with anyone . I work as entrepreneur in shoe business from 15 years , I know what pain in the ass is customer service . And my business is much easier than tech , infact the worst situation i would face is "zapatos" not fitting or breaking Smile.
Your enviroment is more complicated.
_________________
status: Linus
setup: ADSL2MUE linksys » Linksys WRT54GL
firmware: dd-wrt v23 sp2 09/15/06 std nokaid FON compliant
link: 1024><256 kbit/s
ISP: NGI Milano - Italy
wlan devices: apple mac book


callme on skype
Proud member of the "Borat" english speakers
Back to top
View user's profile Send private message Visit poster's website Yahoo Messenger
mathsped
Fonero A


Joined: 24 Jul 2006
Posts: 44
Location: Denmark

PostPosted: Tue Aug 01, 2006 19:04    Post subject: Reply with quote

And I always believd that Zapatos were a complicated thing to figure out....and that's why I haven't used them the last 20 years Smile

@ Ross

I, and I'm sure the rest of us are appreciating your efforts, and as I see it, you're doing a great job !

But I'm 100% behind dema in his quest for making a working soulution for us who are using DD-WRT as it's a better firmware by any standards compared with Open Wrt, and it's sad to see that FON abandoed DD-WRT.

As we now have seen with FON's latest version of firmware where they have inroduced backdoors and stuff to enable them to take full control of our routers that we paif money for. I seriously doubt that it's even legal in the EU to re-program a router via a backdoor without prior agreement, and I have NOT agreed to allowing FON to control my router.

I fully support FON's vision, and I will have my router running 24/7 for all FONeros (as it is now), but I simply won't run it with a router that is fitted with a firmware that I don't trust.

Why don't FON simply provide us with a script that could be run on any linux based firmware ?

Maybe brainslayer will implement a FON script in the next version of DD-WRT ? Maybe even FON approved Wink
_________________
We are not pshychics, with 99% certainty - (c) FON
Router: Linksys WRT54-GL v.1.1 SSID: fon.com_free.wifi
Firmware: DD-WRT v23 SP1- Final (06/06/06) std ("FON compliant")
24/7 for ALL FONeros
Status: linus
Wireless device: PDA iPaq 4150
Back to top
View user's profile Send private message
fulbrich
Fonero B


Joined: 06 Jun 2006
Posts: 92
Location: NRW, Germany

PostPosted: Fri Aug 04, 2006 11:26    Post subject: Reply with quote

dema wrote:
Now , let's say the final script for heartbeat to be included in dd-wrt.

step 3)
execute the following command from the console
Code:
echo "mode='start' wlmac='the mac you registered your hot spot' mac='the mac you register your hotspot -2' fonrev='1' firmware='0.6.6' chillver='1.0-1' thclver='1.0'" | ssh -T -p 1937 -i /key openwrt@download.fon.com



Hi, I did this above and the message complainig about firmware version in "My Router" page is gone. This works for me. I haven't the heartbeat installed now... this will follow.
_________________
Tschüs,
Frank
---------------------------------
status: former Linus quitted 04.July.2006 due to legal concers.
setup: - » -
firmware:
Back to top
View user's profile Send private message
dema
Fonero Pub A


Joined: 09 Jun 2006
Posts: 188
Location: Lamporecchio (pt) - ITALY

PostPosted: Fri Aug 04, 2006 11:38    Post subject: Reply with quote

Fullbrich ,
try to install the heartbeat in the dd-wrt with room space for jffs and let us know if it's working.
If we succed to make it work , we can gather the progresses made in this forum and try to write a final complete working dd-wrt howto.
We can put it to the wiki too.
_________________
status: Linus
setup: ADSL2MUE linksys » Linksys WRT54GL
firmware: dd-wrt v23 sp2 09/15/06 std nokaid FON compliant
link: 1024><256 kbit/s
ISP: NGI Milano - Italy
wlan devices: apple mac book


callme on skype
Proud member of the "Borat" english speakers
Back to top
View user's profile Send private message Visit poster's website Yahoo Messenger
fulbrich
Fonero B


Joined: 06 Jun 2006
Posts: 92
Location: NRW, Germany

PostPosted: Fri Aug 04, 2006 12:26    Post subject: Reply with quote

dema wrote:
Fullbrich ,
try to install the heartbeat in the dd-wrt with room space for jffs and let us know if it's working.

I try my very best ... I am learning linux in the moment, to administrate the box...

I think the first ssh connection to fon after a boot needs to be done manually , to get the host key which need to be confirmed with y/n isn't it ? I'll do some testing in the evening, I hope. I wish is to put all together into one startscript which should start after boot, but I am not sure about the host key y/n question.

I am on the point of view that it is a good idea to have
Code:
sleep "$((0x$(head /dev/urandom |hexdump |awk '$2 > 0 {print $2}'|head -n1) % 3600))"
in the CRON script to have a random period so that no DoS will take place against the FON heartbeat server.
_________________
Tschüs,
Frank
---------------------------------
status: former Linus quitted 04.July.2006 due to legal concers.
setup: - » -
firmware:
Back to top
View user's profile Send private message
kyros
FON-FRIENDS


Joined: 21 Jul 2006
Posts: 268
Location: Vienna / Austria

PostPosted: Fri Aug 04, 2006 13:03    Post subject: Reply with quote

Hi all,

I am not as it-skilled as you all but perhaps the heartbeat script (status all 5 minutes) I have installed on my router can help you in your plan.

This script updates the activity info in my signature. It's coming from www.fonfan.de.
I registered at at.fonfan.de. The Idea is to be able to access maps with activity status now and to be able to monitor the router's status e.g. with the status-picker you see below.

First you have to register there at the FONFAN page to get a fonfan Foneroid.

The script ist written into the router using PUTTY.
This is the how to (PDF):

-------------------------------------------------------------

starting PUTTY over wired LAN.
contacting IP of the router.
using SSH protocol
name the seccion and save, then open connection
login with root and your password

cd /bin
vi fonfan
press i
#!/bin/ash
wget -q -O - "http://www.fonfan.de/engine/status.php?efoneroid=XXXX&eident=YYYY&status=2"
(XXXX = fonfan Foneroid, YYYY = atfonfan registered e-mail addresse)
press ESC
enter :wq
chmod 755 fonfan
crontab -e
press i
go back to the end of the first line after the last sign and press Return
*/5 * * * * /bin/fonfan
enter ESC
enter :wq
exit
press Return

ready!
-------------------------------------------------------------

I used it as a cooking recipe and it worked.
Perhaps this can help you.

Regards, Kyros
_________________
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
dema
Fonero Pub A


Joined: 09 Jun 2006
Posts: 188
Location: Lamporecchio (pt) - ITALY

PostPosted: Fri Aug 04, 2006 14:29    Post subject: Reply with quote

fulbrich wrote:

I am on the point of view that it is a good idea to have
Code:
sleep "$((0x$(head /dev/urandom |hexdump |awk '$2 > 0 {print $2}'|head -n1) % 3600))"
in the CRON script to have a random period so that no DoS will take place against the FON heartbeat server.

Agree , because at least 50% of foneros will revert to DD-wrt sooner or later.
And the DoS is a serius threat .

Laughing Laughing Laughing Laughing Laughing
_________________
status: Linus
setup: ADSL2MUE linksys » Linksys WRT54GL
firmware: dd-wrt v23 sp2 09/15/06 std nokaid FON compliant
link: 1024><256 kbit/s
ISP: NGI Milano - Italy
wlan devices: apple mac book


callme on skype
Proud member of the "Borat" english speakers
Back to top
View user's profile Send private message Visit poster's website Yahoo Messenger
Strolls
Fonero A


Joined: 28 Jul 2006
Posts: 35

PostPosted: Fri Aug 04, 2006 14:36    Post subject: Reply with quote

dema wrote:
Agree , because at least 50% of foneros will revert to DD-wrt sooner or later.
And at least 87% of statistics are pulled out of someone's arse. Razz
dema wrote:
And the DoS is a serius threat.
I'm sure the University of Colorado would agree on this one.

Stroller.
Back to top
View user's profile Send private message
dema
Fonero Pub A


Joined: 09 Jun 2006
Posts: 188
Location: Lamporecchio (pt) - ITALY

PostPosted: Fri Aug 04, 2006 14:58    Post subject: Reply with quote

Strollin', strollin' we could have fun just strollin'
Rockin', rollin', oh yeah

Song : Strollin'
Artist: Prince
Album: Diamonds & Pearls

You might have posted a similar reply Laughing Laughing
_________________
status: Linus
setup: ADSL2MUE linksys » Linksys WRT54GL
firmware: dd-wrt v23 sp2 09/15/06 std nokaid FON compliant
link: 1024><256 kbit/s
ISP: NGI Milano - Italy
wlan devices: apple mac book


callme on skype
Proud member of the "Borat" english speakers
Back to top
View user's profile Send private message Visit poster's website Yahoo Messenger
fulbrich
Fonero B


Joined: 06 Jun 2006
Posts: 92
Location: NRW, Germany

PostPosted: Fri Aug 04, 2006 20:27    Post subject: Reply with quote

Hello dema,
thank you very much for your "heartbeat howto".
I tried some testing... can you confirm what I marked in green , please ? I had to modifiy some steps, because it didn't work at me as expected.
You see, I am no so much experienced. The next question is how to put all together into one master script to be copied to /jffs and started by the startup_rc script.



step 6)
Build a script to be executed by cron inside the router.
type this
Code:

echo " echo "mode='cron' wlmac='the mac you registered your hot spot' mac='the mac you register your hotspot -2' fonrev='1' firmware='0.6.6' " | ssh -T -p 1937 -i /key openwrt@download.fon.com" > /tmp/hb.sh

verify with
Code:
cat /tmp/hb.sh
should give you the string you typed before.

I did this and found that in hb.sh that the " are missing before mode and after 0.0.6' ... I added this manually. What needs to be changed in step 6 to get this by script ?

type this in the console
Code:

echo '  9      *       *       *       *       root /tmp/./hb.sh > /tmp/test.txt' >> /tmp/crontab


... can I strip the . before /hb.sh ??

BEWARE IF DD-WRT BUILD IS EARLIER THAN JUNE 2006 CHANGE CROND TO CRON

step 7)
check you syslog for the correct functioning of heartbeat script.

Please don't laught ... how can I check the syslog ?? /var/log/messages is empty - maybe a good sign. A test.txt had been created, but it is empty.
_________________
Tschüs,
Frank
---------------------------------
status: former Linus quitted 04.July.2006 due to legal concers.
setup: - » -
firmware:
Back to top
View user's profile Send private message
dema
Fonero Pub A


Joined: 09 Jun 2006
Posts: 188
Location: Lamporecchio (pt) - ITALY

PostPosted: Sat Aug 05, 2006 13:50    Post subject: Reply with quote

fulbrich wrote:


Please don't laught ... how can I check the syslog ?? /var/log/messages is empty - maybe a good sign. A test.txt had been created, but it is empty.

I have written the heartbeat howto without on field testing , but just in theoric base. So for sure I made a lot of mistakes.
Anyway , to check the syslog , you need to enable it in the GUI administration , and to broadcast it to a host capable to receive syslog.
The wrt54 has too limited resources to store the system logs , so you need to store it in another computer. The ideal would be a linux host running syslogd.
_________________
status: Linus
setup: ADSL2MUE linksys » Linksys WRT54GL
firmware: dd-wrt v23 sp2 09/15/06 std nokaid FON compliant
link: 1024><256 kbit/s
ISP: NGI Milano - Italy
wlan devices: apple mac book


callme on skype
Proud member of the "Borat" english speakers
Back to top
View user's profile Send private message Visit poster's website Yahoo Messenger
Freddy
Fonero Pub A


Joined: 26 Jul 2006
Posts: 230
Location: Germany

PostPosted: Sun Aug 06, 2006 11:17    Post subject: Reply with quote

I'm using
Code:
nvram get wl0_hwaddr

to get my WLAN mac, workign fine for me

EDIT:
Ok, here's me complete script and the key:
http://fon.freddy.eu.org/heartbeat/

Quote:
Make sure that JFFS2 and Cron is enabled
Download "fonkey" and "thinclient" to /jffs/
Change chmod of "thinclient" to 755
Add this line to your startup script and reboot the router:
/jffs/thinclient start 2>&1 | logger


Last edited by Freddy on Sat Aug 19, 2006 19:11; edited 3 times in total
Back to top
View user's profile Send private message Visit poster's website
dema
Fonero Pub A


Joined: 09 Jun 2006
Posts: 188
Location: Lamporecchio (pt) - ITALY

PostPosted: Sun Aug 06, 2006 18:43    Post subject: Reply with quote

Freddy wrote:
I'm using
Code:
nvram get wl0_hwaddr

to get my WLAN mac, workign fine for me

EDIT:
Ok, here's me complete script and the key:
http://fon.freddy.eu.org/heartbeat/0.6.6/

Quote:
Make sure that "JFFS2" is enabled and "Clean JFFS2" is disabled
Download "fonkey" and "thinclient" to /jffs/
Change chmod of "thinclient" to 755
Add this line to your startup script and reboot the router:
/jffs/thinclient start >> /var/log/thinclient.log

Looks great and I will put it in the italian wiki . Can I ?
To make your script works , you need a dd-wrt special version with space left for jffs partition. The default dd-wrt v23 doesn't have space left.
_________________
status: Linus
setup: ADSL2MUE linksys » Linksys WRT54GL
firmware: dd-wrt v23 sp2 09/15/06 std nokaid FON compliant
link: 1024><256 kbit/s
ISP: NGI Milano - Italy
wlan devices: apple mac book


callme on skype
Proud member of the "Borat" english speakers
Back to top
View user's profile Send private message Visit poster's website Yahoo Messenger
Freddy
Fonero Pub A


Joined: 26 Jul 2006
Posts: 230
Location: Germany

PostPosted: Sun Aug 06, 2006 18:49    Post subject: Reply with quote

dema wrote:
Looks great and I will put it in the italian wiki . Can I ?
To make your script works , you need a dd-wrt special version with space left for jffs partition. The default dd-wrt v23 doesn't have space left.


Of course you can put it in a wiki, I'm using "DD-WRT v23 SP2 (08/04/06) std (SVN revision 3390)" and had some space left on jffs (I'm now at 86%)
Back to top
View user's profile Send private message Visit poster's website
mathsped
Fonero A


Joined: 24 Jul 2006
Posts: 44
Location: Denmark

PostPosted: Sun Aug 06, 2006 19:06    Post subject: Reply with quote

And this dd-wrt ver. 23 Sp2 can be found where ?

With some luck, it might even be a version where kaid is removed, or an option to include it if U're into Xbox's ?
_________________
We are not pshychics, with 99% certainty - (c) FON
Router: Linksys WRT54-GL v.1.1 SSID: fon.com_free.wifi
Firmware: DD-WRT v23 SP1- Final (06/06/06) std ("FON compliant")
24/7 for ALL FONeros
Status: linus
Wireless device: PDA iPaq 4150
Back to top
View user's profile Send private message
Freddy
Fonero Pub A


Joined: 26 Jul 2006
Posts: 230
Location: Germany

PostPosted: Sun Aug 06, 2006 19:24    Post subject: Reply with quote

it comes with kaid, i's at tha alpha section of dd-wrt download
Back to top
View user's profile Send private message Visit poster's website
Freddy
Fonero Pub A


Joined: 26 Jul 2006
Posts: 230
Location: Germany

PostPosted: Mon Aug 07, 2006 12:20    Post subject: Reply with quote

ok, there was a bug in the script, cron didn't work just reload the script
Back to top
View user's profile Send private message Visit poster's website
dema
Fonero Pub A


Joined: 09 Jun 2006
Posts: 188
Location: Lamporecchio (pt) - ITALY

PostPosted: Mon Aug 07, 2006 13:41    Post subject: Reply with quote

Freddy , it means that your script isn't working yet.
I had no time to put it in a test , but reading it , everithing looks correct.Pls give us some details.
_________________
status: Linus
setup: ADSL2MUE linksys » Linksys WRT54GL
firmware: dd-wrt v23 sp2 09/15/06 std nokaid FON compliant
link: 1024><256 kbit/s
ISP: NGI Milano - Italy
wlan devices: apple mac book


callme on skype
Proud member of the "Borat" english speakers
Back to top
View user's profile Send private message Visit poster's website Yahoo Messenger
Freddy
Fonero Pub A


Joined: 26 Jul 2006
Posts: 230
Location: Germany

PostPosted: Mon Aug 07, 2006 14:35    Post subject: Reply with quote

I've updated it again, the problem was that I've to use exact paths, $HOME isn't set for the startup script and cron dosn't care about $PATH
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    FON Boards Forum Index -> Community Help All times are GMT + 1 Hour
Goto page Previous  1, 2, 3, 4, 5 ... 11, 12, 13  Next
Page 4 of 13

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


© FON | Please observe Nettiquette | RSS XML RSS feed of the last messages posted | Powered by phpBB © 2001, 2005 phpBB Group