Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
G
Gluon SSID Changer
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
firmware
Gluon SSID Changer
Commits
f135ba05
Commit
f135ba05
authored
8 years ago
by
viisauksena
Committed by
GitHub
8 years ago
Browse files
Options
Downloads
Plain Diff
Merge pull request #5 from rubo77/patch-1
Update repository to rewritten script
parents
59490719
2aa896ec
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
README.md
+33
-6
33 additions, 6 deletions
README.md
files/lib/gluon/ssid-changer/emergency.sh
+5
-5
5 additions, 5 deletions
files/lib/gluon/ssid-changer/emergency.sh
with
38 additions
and
11 deletions
README.md
+
33
−
6
View file @
f135ba05
ssid-changer
ssid-changer.sh
===============
This script changes the SSID when there is no connection to the selected Gateway.
Once a minute it checks if there is a gateway reacheable with
`batctl gwl -H`
and
decides if a change of the SSID is necessary.
*
It is a simplified rewrite of https://github.com/ffac/gluon-ssid-changer that doesn't check
the tx value any more. It is in use in Freifunk Freiburg
*
emergency.sh
============
this repository also includes an emergency script which checks for a working batman-adv
gateway connection. If no Gateway connection exists some countermeasures are started:
Script to change the SSID when there is no suffic sufficient connection to the selected Gateway.
-
3 min offline - call
`wifi`
-
5 min offline - restart fastd
-
7 min offline - restart networking
It is quite basic, it just checks the Quality of the Connection and decides if a change of the SSID is necessary.
If no countermeasure works bringing the node online again, the router will be enforced
to reboot after 10 minutes.
Create a file "modules" with the following content in your
<a
href=
"https://github.com/ffac/site/tree/offline-ssid"
>
site directory:
</a>
*
Note: this script may cause a problem for users, that use the node on purposes intended
to work without functioning gateway connectivity, for example as a switch (disable
the cronjob there).
*
Gluon versions
==============
This branch of the skript contains the the ssid-changer version for the gluon 2016.1.x
based on openwrt
`chaos-calmer`
. There is also a pre 2016.1 (barrier braker based)
version in the branch
`master`
. It will probably not work in 2016.2 yet.
Implement this package in your firmware
=======================================
Create a file "modules" with the following content in your
<a
href=
"https://github.com/ffac/site/tree/offline-ssid"
>
site directory:
</a>
GLUON_SITE_FEEDS="ssidchanger"
<br>
PACKAGES_SSIDCHANGER_REPO=https://github.com/ffac/gluon-ssid-changer.git
<br>
...
...
@@ -13,5 +42,3 @@ PACKAGES_SSIDCHANGER_COMMIT=1146ff354ff0bb99a100d6b067fc410068e7521d<br>
PACKAGES_SSIDCHANGER_BRANCH=chaos-calmer
<br>
With this done you can add the package gluon-ssid-changer to your site.mk
This branch of the skript contains the the ssid-changer version for the current master based on openwrt chaos-calmer (upcoming 2016.1)
This diff is collapsed.
Click to expand it.
files/lib/gluon/ssid-changer/emergency.sh
+
5
−
5
View file @
f135ba05
...
...
@@ -17,7 +17,7 @@ echo 950 > /proc/$(pgrep /usr/sbin/batadv-vis)/oom_score_adj # batvis
# if we see bat GW just exit
netz
=
$(
batctl gwl
-H
|grep
-v
"gateways in range"
|wc
-l
)
if
[
$netz
-ne
0
]
;
then
if
[
$netz
-ne
0
]
;
then
echo
"
$0
found GW in network, exiting"
echo
0
>
/tmp/emergency
exit
0
...
...
@@ -26,17 +26,17 @@ fi
# see ath9k for stopped
# cat /sys/kernel/debug/ieee80211/phy0/ath9k/queues
# simple counter
# simple counter
touch
/tmp/emergency
counter
=
$(
cat
/tmp/emergency
)
if
[
-z
$counter
]
;
then
counter
=
0
;
fi
if
[
$counter
-lt
10
]
then
then
let
counter+
=
1
echo
$counter
>
/tmp/emergency
if
[
$counter
-eq
3
]
;
then
echo
"
$0
- 3 min offline - try wifi"
|logger
;
wifi
;
fi
if
[
$counter
-eq
5
]
;
then
echo
"
$0
- 5 min offline - try restart fastd"
|logger
;
/etc/init.d/fastd restart
;
fi
if
[
$counter
-eq
7
]
;
then
echo
"
$0
-
5
min offline - try restart network"
|logger
;
/etc/init.d/network restart
;
fi
if
[
$counter
-eq
7
]
;
then
echo
"
$0
-
7
min offline - try restart network"
|logger
;
/etc/init.d/network restart
;
fi
else
reboot
fi
fi
echo
$counter
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment