london3r
Posts: 2
Joined: Tue Jan 16, 2018 10:01 pm

LAN 'Keep Alive' using Pi - help needed!

Wed Feb 21, 2018 10:05 pm

I'm stumped on a problem and would like to use a Pi as the solution.

My internet service provider relies on 'activity' to keep the connection live. I normally leave my PC on but this is inefficient. What I need to do is have the pi auto run (on boot) a login script, then navigate to a follow on website after a 30 second delay:

Code for logon: curl --data "login-username=london3r&password=password" https://login.local.com

Page to load after delay: http://keepalive.sector101.co.uk/keepal ... 8834917941

This solution would automatically log in to my web provider, then keep a live website running. It will all be operating headless.

The pages I have been reading do not offer a 'best solution' or even a working solution:

Run on startup (but which is best?): https://www.dexterindustries.com/howto/ ... t-startup/
Run browser fullscreen: https://gist.github.com/klan/7482956
Avoid sleep (which one works?): https://raspberrypi.stackexchange.com/q ... w-to-avoid

pcmanbob
Posts: 3870
Joined: Fri May 31, 2013 9:28 pm
Location: Mansfield UK

Re: LAN 'Keep Alive' using Pi - help needed!

Thu Feb 22, 2018 9:57 am

If you just need activity do you really need to be signed in to a web site and keep a web page constantly loading.

if you ping a site on the web at say 1 minute intervals that will mean you have a small amount of traffic on your service almost constantly.

so using cron you would add this to the pi user using crontab -e

Code: Select all

1-59/2 * * * * ping -c 2 8.8.8.8 >/dev/null 2>&1
so here we do 2 ping tests every other minute to google and all the output from the ping command will simply be discarded, you could always increase the number of pings if you want more data send but don't go to big with the number or you may end up with overlapping ping commands running.
Please only ask questions in the forum I will not answer questions sent to me directly via PM
Remember we want information.......................no information no help
The use of crystal balls & mind reading is not supported

Return to “Beginners”

Who is online

Users browsing this forum: lmarmisa, nick8967 and 42 guests