|
| 1 | +gluon-ssid-changer |
| 2 | +================== |
| 3 | + |
| 4 | +This package adds a script to change the SSID when there is no connection to any |
| 5 | +gateway. This Offline-SSID can be generated from the node's hostname with the |
| 6 | +first and last part of the node name or the MAC address allowing observers to |
| 7 | +recognize which node does not have a connection to a gateway. This script is |
| 8 | +called once every minute by ``micron.d`` and check gateway-connectivity. It will |
| 9 | +change the SSID to the Offline-SSID after the node lost gateway connectivity for |
| 10 | +several consecutive checks. As soon as the gateway-connectivity is back it |
| 11 | +toggles back to the original SSID. |
| 12 | + |
| 13 | +You can enable/disable it in the config mode. |
| 14 | + |
| 15 | +It checks if a gateway is reachable in an interval. Different algorithms can be |
| 16 | +selected to determine whether a gateway is reachable: |
| 17 | + |
| 18 | +- ``tq_limit_enabled=true``: (not working with BATMAN\_V) define an upper and |
| 19 | + lower bound to toggle the SSID. As long as the TQ stays in-between those |
| 20 | + bounds the SSID will not be changed. |
| 21 | +- ``tq_limit_enabled=false``: there will be only checked, if the gateway is |
| 22 | + reachable with: |
| 23 | + |
| 24 | + :: |
| 25 | + |
| 26 | + batctl gwl -H |
| 27 | + |
| 28 | +The SSID is always changed back to normal every minute as soon as the |
| 29 | +gateway-connectivity is back, The parameter ``switch_timeframe`` defines how |
| 30 | +long it will record the gateway-connectivity. **Only** if the gateway is not |
| 31 | +reachable during at least half the checks within ``switch_timeframe`` minutes, |
| 32 | +the SSID will be changed to "FF\_Offline\_$node\_hostname". |
| 33 | + |
| 34 | +The parameter ``first`` defines a learning phase after reboot (in minutes) |
| 35 | +during which the SSID may be changed to the Offline-SSID **every minute**. |
| 36 | + |
| 37 | +site.conf |
| 38 | +========= |
| 39 | + |
| 40 | +Adapt and add this block to your ``site.conf``: |
| 41 | + |
| 42 | +:: |
| 43 | + |
| 44 | + ssid_changer = { |
| 45 | + enabled = true, |
| 46 | + switch_timeframe = 30, -- only once every timeframe (in minutes) the SSID will change to the Offline-SSID |
| 47 | + -- set to 1440 to change once a day |
| 48 | + -- set to 1 minute to change every time the router gets offline |
| 49 | + first = 5, -- the first few minutes directly after reboot within which an Offline-SSID may be |
| 50 | + -- activated every minute (must be <= switch_timeframe) |
| 51 | + prefix = 'FF_Offline_', -- use something short to leave space for the nodename (no '~' allowed!) |
| 52 | + suffix = 'nodename', -- generate the SSID with either 'nodename', 'mac' or to use only the prefix: 'none' |
| 53 | + |
| 54 | + tq_limit_enabled = false, -- if false, the offline SSID will only be set if there is no gateway reacheable |
| 55 | + -- upper and lower limit to turn the offline_ssid on and off |
| 56 | + -- in-between these two values the SSID will never be changed to prevent it from |
| 57 | + -- toggeling every minute. |
| 58 | + tq_limit_max = 45, -- upper limit, above that the online SSID will be used |
| 59 | + tq_limit_min = 35 -- lower limit, below that the offline SSID will be used |
| 60 | + }, |
| 61 | + |
| 62 | +Commandline options |
| 63 | +=================== |
| 64 | + |
| 65 | +You can configure the ssid-changer on the commandline with ``uci``, for example |
| 66 | +disable it with: |
| 67 | + |
| 68 | +:: |
| 69 | + |
| 70 | + uci set ssid-changer.settings.enabled='0' |
| 71 | + |
| 72 | +Or set the timeframe to every three minutes with |
| 73 | + |
| 74 | +:: |
| 75 | + |
| 76 | + uci set ssid-changer.settings.switch_timeframe='3' |
| 77 | + uci set ssid-changer.settings.first='3' |
0 commit comments