Robust network examiner

Share your opinion about Porteus Kiosk Edition.
Forum rules
Porteus Kiosk section of the forum is unmaintained now. Its kept in a 'read only' mode for archival purposes.
Please use the kiosk contact page for directing your queries: https://porteus-kiosk.org/contact.html
jet
White ninja
White ninja
Posts: 24
Joined: 10 Feb 2015, 21:49
Distribution: Kiosk
Location: Finland

Robust network examiner

Post#1 by jet » 21 Jun 2018, 15:53

Hi.

Trying to get a tablet computer to work reliably over wifi with Porteus Kiosks for digital signage purposes.

The problem is now that Porteus Kiosk V4.7 and eralier executes the web browser even if there was a problem with the connection (to the internet). So the result is a browser window dispalying that it cannot connect to the specific site.

This is definately a no-go with digital signage purposes and kiosk applications too. :sorry:

I hope Porteus Kiosk could in the very near future test reliably the connection before launching the browser.

And if the connection is lost, then there should be functions first to re-init the connection and if that does not work then restart the Kiosk after x number of failed attempts.

Ping destinations, Re-init retry times and timers should be user configurable with config file.


Kind regards,
Jan

User avatar
fanthom
Moderator Team
Moderator Team
Posts: 5666
Joined: 28 Dec 2010, 02:42
Distribution: Porteus Kiosk
Location: Poland
Contact:

Robust network examiner

Post#2 by fanthom » 21 Jun 2018, 16:59

Hello Jan,

"I hope Porteus Kiosk could in the very near future test reliably the connection before launching the browser."
This function is implemented already, see here:
http://porteus-kiosk.org/parameters.html#homepage_check

"And if the connection is lost, then there should be functions first to re-init the connection"
This is default if you use dhcp. I have tested this scenario many times by powering off the access point. Connection was always reinitialized properly by wpa_supplicant and dhcpcd.

"and if that does not work then restart the Kiosk after x number of failed attempts."
This could be implemented in a 'run_command=' parameter (it can do pretty much everything) or through customized build.
Please add [Solved] to your thread title if the solution was found.

jet
White ninja
White ninja
Posts: 24
Joined: 10 Feb 2015, 21:49
Distribution: Kiosk
Location: Finland

Robust network examiner

Post#3 by jet » 21 Jun 2018, 17:49

Hi fanthom !
fanthom wrote:
21 Jun 2018, 16:59
Hello Jan,

"I hope Porteus Kiosk could in the very near future test reliably the connection before launching the browser."

This function is implemented already, see here:
http://porteus-kiosk.org/parameters.html#homepage_check

Unfortunately that can give false positives.

Would need to be abe to find for a specific code in the html to be sure it has connected succesfully.

Kind regards,
Jan

User avatar
fanthom
Moderator Team
Moderator Team
Posts: 5666
Joined: 28 Dec 2010, 02:42
Distribution: Porteus Kiosk
Location: Poland
Contact:

Robust network examiner

Post#4 by fanthom » 21 Jun 2018, 18:33

Not sure what you mean.

This function uses following command to determine if webpage is available:

Code: Select all

wget -q -U Mozilla --spider -T20 -t1 http://domain.com
If you need to search for specific content then only kiosk customization can help.
Please add [Solved] to your thread title if the solution was found.

jet
White ninja
White ninja
Posts: 24
Joined: 10 Feb 2015, 21:49
Distribution: Kiosk
Location: Finland

Robust network examiner

Post#5 by jet » 21 Jun 2018, 18:40

Hi.

If router is just booting up any http request may go to routers log-in page, so it would be essential to be able to be sure that the result is from the specific domain.

This can be done reliably only by getting some kind of signature from that domain.


Would be nice to have this kind of paramter option:

homepage_poll=https://domain.com/index.php?giveId=true 1234

Where 1234 is the expected result from https://domain.com/index.php?giveId=true

or

Where 1234 is the needle to be found in output of specific url like https://domain.com/index.php

If the exact value or needle is found then launch browser to home page
Last edited by jet on 21 Jun 2018, 19:36, edited 1 time in total.

User avatar
fanthom
Moderator Team
Moderator Team
Posts: 5666
Joined: 28 Dec 2010, 02:42
Distribution: Porteus Kiosk
Location: Poland
Contact:

Robust network examiner

Post#6 by fanthom » 21 Jun 2018, 19:02

Dont think many people would use it. You are first asking for it.

Please use 'run_command=' parameter to perform this check.
Please add [Solved] to your thread title if the solution was found.

jet
White ninja
White ninja
Posts: 24
Joined: 10 Feb 2015, 21:49
Distribution: Kiosk
Location: Finland

Robust network examiner

Post#7 by jet » 21 Jun 2018, 19:08

Hi.

It would make Porteus Kiosk much more reliable, secure and user friendly and that is what really counts. :happy62:


In the meanwhile, how to perform the task thru run_command (with exact commands)? :oops:

Kind regards,
Jan

User avatar
fanthom
Moderator Team
Moderator Team
Posts: 5666
Joined: 28 Dec 2010, 02:42
Distribution: Porteus Kiosk
Location: Poland
Contact:

Robust network examiner

Post#8 by fanthom » 23 Jun 2018, 12:30

Something like here:

Code: Select all

run_command=while true; do dunstify -C 100 2>/dev/null; wget -U Mozilla -T20 -t1 http://domain.com -O- | grep -q "your string" && break || { dunstify -r 100 -u critical "Homepage is not available"; sleep 9; }; done
Please add [Solved] to your thread title if the solution was found.

jet
White ninja
White ninja
Posts: 24
Joined: 10 Feb 2015, 21:49
Distribution: Kiosk
Location: Finland

Robust network examiner

Post#9 by jet » 23 Jun 2018, 14:55

Thanks!! :D

Works great!

With this fix Porteus Kiosk is now much more robust!

Changed some of the values: Enough time for the connection to be established on slow connections, and long enough time before trying again so it would not be interpreted as brute force attack or similar.

-T40
-t2
sleep 60

I hope this would be implemented in next Porteus Kiosk release as homepage_poll

Will make a donation soon :)

Kind regards,
Jan

User avatar
fanthom
Moderator Team
Moderator Team
Posts: 5666
Joined: 28 Dec 2010, 02:42
Distribution: Porteus Kiosk
Location: Poland
Contact:

Robust network examiner

Post#10 by fanthom » 23 Jun 2018, 17:56

"I hope this would be implemented in next Porteus Kiosk release as homepage_poll"
Whats wrong with using 'run_command=' parameter? Using run_command you can configure every single detail how this task should be handled.

"Will make a donation soon :)"
Great - thank you in advance.
Please add [Solved] to your thread title if the solution was found.

jet
White ninja
White ninja
Posts: 24
Joined: 10 Feb 2015, 21:49
Distribution: Kiosk
Location: Finland

Robust network examiner

Post#11 by jet » 23 Jun 2018, 18:23

fanthom wrote:
23 Jun 2018, 17:56
Whats wrong with using 'run_command=' parameter? Using run_command you can configure every single detail how this task should be handled.
Nothing is wrong with it but would be great to have it as standard "right out of the box" :)

Or maybe there could be "a light version" implemented directly to 'homepage_check=' parameter as an optional second parameter like this:

homepage_check=Homepage is not available - please contact your administrator|StringToBeFound

Kind regards,
Jan

jet
White ninja
White ninja
Posts: 24
Joined: 10 Feb 2015, 21:49
Distribution: Kiosk
Location: Finland

Robust network examiner

Post#12 by jet » 06 Sep 2018, 12:13

It seems that the configuration change checking is not working it it takes long time to get the internet access.

How to trigger it with cron?

Kind regards,
Jan

User avatar
fanthom
Moderator Team
Moderator Team
Posts: 5666
Joined: 28 Dec 2010, 02:42
Distribution: Porteus Kiosk
Location: Poland
Contact:

Robust network examiner

Post#13 by fanthom » 06 Sep 2018, 18:22

Remote config is checked only during kiosk boot. You cant trigger it later on.
You need to fix your network i'm afraid.
Please add [Solved] to your thread title if the solution was found.

Locked