Skip to content
Snippets Groups Projects
Commit 30b45fca authored by rubo77's avatar rubo77
Browse files

enhance readme

parent f35d482c
No related branches found
No related tags found
No related merge requests found
...@@ -5,42 +5,37 @@ _This branch of the script contains the ssid-changer version for the gluon branc ...@@ -5,42 +5,37 @@ _This branch of the script contains the ssid-changer version for the gluon branc
2018.1.x and 2018.2.x (current "master"). For older releases of Gluon use the 2018.1.x and 2018.2.x (current "master"). For older releases of Gluon use the
branches "2017.1.x" and "2016.2.x"._ branches "2017.1.x" and "2016.2.x"._
This package adds a script to change the SSID to an Offline-SSID when there is This package adds a script to change the SSID when there is
no connection to any gateway. no connection to any gateway.
This SSID can be generated from the nodes hostname with the first This Offline-SSID can be generated from the node's hostname with the first
and last part of the nodename or the mac address, to allow observers to and last part of the node name or the MAC address allowing observers to
recognise which node is down. The script is called once a minute by micron.d recognize which node does not have a connection to a gateway. This script is
and it will change from online to offline-SSID maximum once every (definable) called once every minute by `micron.d` and check gateway-connectivity. It will change the SSID to the Offline-SSID after the node lost gateway connectivity for several consecutive checks. As soon as the gateway-connectivity is back it toggles back to the original SSID.
timeframe.
You can enable/disable it in the config mode. You can enable/disable it in the config mode.
Once every timeframe it checks if there's still a gateway reachable. There can be It checks if a gateway is reachable in an interval. Different algorithms can be
selected two algorithms to analyze if a gateway is reacheable: selected to determine whether a gateway is reachable:
- `tq_limit_enabled=true`: (not working with BATMAN_V) define an upper and lower - `tq_limit_enabled=true`: (not working with BATMAN_V) define an upper and lower
limit to turn the offline_ssid on and off in-between these two values the SSID bound to toggle the SSID. As long as the TQ stays in-between those bounds the
will never be changed to prevent it from toggeling every minute. SSID will not be changed.
- `tq_limit_enabled=false`: there will be only checked, if the gateway is - `tq_limit_enabled=false`: there will be only checked, if the gateway is
reachable with: reachable with:
batctl gwl -H batctl gwl -H
Depending on the connectivity, it will be decided if a change of the SSID is The SSID is always changed back to normal every minute as soon as the gateway-connectivity is back.
necessary: There is a variable `switch_timeframe` (for ex. 1440 = 24h) that
defines a time interval after which a successful check that detects an offline The parameter `switch_timeframe` defines how long it will record the gateway-connectivity. **Only** if the gateway is not reachable during at least half the checks within `switch_timeframe` minutes,
state will result in a single change of the SSID to "FF_Offline_$node_hostname". the SSID will be changed to "FF_Offline_$node_hostname".
Only the first few minutes (also definable in a variable `first`) the
OFFLINE_SSID may also be set. All other minutes a checks will just be counted The parameter `first` defines a learning phase after reboot (in minutes) during which the SSID may be changed to the Offline-SSID **every minute**.
and reported in the log and whenever an online state is detected the SSID will
be set back immediately back to normal. when the timeframe is reached, there
will be checked if the node was offline at least half the timeframe, only then
the SSID will be changed.
site.conf site.conf
========= =========
Adapt and add this block to your site.conf: Adapt and add this block to your `site.conf`:
``` ```
ssid_changer = { ssid_changer = {
...@@ -48,13 +43,15 @@ ssid_changer = { ...@@ -48,13 +43,15 @@ ssid_changer = {
switch_timeframe = 30, -- only once every timeframe (in minutes) the SSID will change to the Offline-SSID switch_timeframe = 30, -- only once every timeframe (in minutes) the SSID will change to the Offline-SSID
-- set to 1440 to change once a day -- set to 1440 to change once a day
-- set to 1 minute to change every time the router gets offline -- set to 1 minute to change every time the router gets offline
first = 5, -- the first few minutes directly after reboot within which an Offline-SSID always may be activated (must be <= switch_timeframe) first = 5, -- the first few minutes directly after reboot within which an Offline-SSID may be
-- activated every minute (must be <= switch_timeframe)
prefix = 'FF_Offline_', -- use something short to leave space for the nodename (no '~' allowed!) prefix = 'FF_Offline_', -- use something short to leave space for the nodename (no '~' allowed!)
suffix = 'nodename', -- generate the SSID with either 'nodename', 'mac' or to use only the prefix: 'none' suffix = 'nodename', -- generate the SSID with either 'nodename', 'mac' or to use only the prefix: 'none'
tq_limit_enabled = false, -- if false, the offline SSID will only be set if there is no gateway reacheable tq_limit_enabled = false, -- if false, the offline SSID will only be set if there is no gateway reacheable
-- upper and lower limit to turn the offline_ssid on and off -- upper and lower limit to turn the offline_ssid on and off
-- in-between these two values the SSID will never be changed to prevent it from toggeling every minute. -- in-between these two values the SSID will never be changed to prevent it from
-- toggeling every minute.
tq_limit_max = 45, -- upper limit, above that the online SSID will be used tq_limit_max = 45, -- upper limit, above that the online SSID will be used
tq_limit_min = 35 -- lower limit, below that the offline SSID will be used tq_limit_min = 35 -- lower limit, below that the offline SSID will be used
}, },
...@@ -126,7 +123,10 @@ History ...@@ -126,7 +123,10 @@ History
https://github.com/viisauksena/gluon-ssid-changer that doesn't check https://github.com/viisauksena/gluon-ssid-changer that doesn't check
the tx value any more. It is now in use in*: the tx value any more. It is now in use in*:
- Freifunk Nord - Freifunk Aachen
- Freifunk Frankfurt am Main
- Freifunk Kiel - Freifunk Kiel
- - Freifunk Kreis Gütersloh
- Freifunk Nord
- Eulenfunk
- Freifunk Vogtland
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment