Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • ffnw-firmware/siteconf
  • pic/siteconf
  • PowerPan/siteconf
  • netmon-sc/siteconf
  • floh1111/siteconf
  • lrnzo/siteconf
  • florian.lottes/siteconf
7 results
Show changes
{
domain_names = { suedost = 'Südost' },
domain_seed = '644056d244937557f31b224f1b5b52d941ae63874ab13826c9966a58b9df6aff',
prefix6 = '2a0f:b506:ff19::/64',
extra_prefixes6 = { 'fd74:fdaa:9dc4::/64', '2a06:e881:2000:4902::/64' },
prefix4 = '10.18.48.0/21',
wifi24 = {
ap = {
ssid = 'test.nordwest.freifunk.net',
owe_ssid = 'owe.test.nordwest.freifunk.net',
owe_transition_mode = true,
},
mesh = {
id = 't-ffnw-mesh_02:00:0a:12:30:00',
},
},
wifi5 = {
ap = {
ssid = 'test.nordwest.freifunk.net',
owe_ssid = 'owe.test.nordwest.freifunk.net',
owe_transition_mode = true,
},
mesh = {
id = 't-ffnw-mesh_02:00:0a:12:30:00',
},
},
next_node = {
name = { 'node.ffnw', 'nextnode', 'nn' },
ip6 = 'fd74:fdaa:9dc4::127',
mac = '16:41:95:40:f7:dc',
},
mesh_vpn = {
tunneldigger = {
brokers = {'suedost01.sn.ffnw.de:9002'}
},
},
hoodselector = {
shapes = {
{
{
lat = 52.07,
lon = 8.42
},
{
lat = 52.07,
lon = 9.3
},
{
lat = 52.944,
lon = 9.3
},
{
lat = 52.944,
lon = 8.67
},
{
lat = 52.76,
lon = 8.67
},
{
lat = 52.76,
lon = 8.443
},
{
lat = 52.69,
lon = 8.443
},
{
lat = 52.69,
lon = 8.32
},
{
lat = 52.46,
lon = 8.32
},
{
lat = 52.46,
lon = 8.42
},
{
lat = 52.07,
lon = 8.42
}
}
}
}
}
{
domain_names = { tossens = 'Tossens' },
domain_seed = '08d037cae17c5a9cbc5b9fa19bdf873e7c66b9fa5b92a2e2e74c1866440bdc00',
prefix6 = '2a0f:b506:ff1a::/64',
extra_prefixes6 = { 'fd74:fdaa:9dc4::/64', '2a06:e881:2000:4900::/64' },
prefix4 = '10.18.216.0/21',
wifi24 = {
ap = {
ssid = 'test.nordwest.freifunk.net',
owe_ssid = 'owe.test.nordwest.freifunk.net',
owe_transition_mode = true,
},
mesh = {
id = 't-ffnw-mesh_02:00:0a:12:d8:00',
},
},
wifi5 = {
ap = {
ssid = 'test.nordwest.freifunk.net',
owe_ssid = 'owe.test.nordwest.freifunk.net',
owe_transition_mode = true,
},
mesh = {
id = 't-ffnw-mesh_02:00:0a:12:d8:00',
},
},
next_node = {
name = { 'node.ffnw', 'nextnode', 'nn' },
ip6 = 'fd74:fdaa:9dc4::127',
mac = '16:41:95:40:f7:dc',
},
mesh_vpn = {
tunneldigger = {
brokers = {'tossens01.sn.ffnw.de:9000'}
},
},
hoodselector = {
shapes = {
{
{
lat = 53.5,
lon = 8.18
},
{
lat = 53.5,
lon = 8.315
},
{
lat = 53.63,
lon = 8.315
},
{
lat = 53.63,
lon = 8.18
},
{
lat = 53.5,
lon = 8.18
}
}
}
}
}
{
domain_names = { wilhelmshaven = 'Wilhelmshaven' },
domain_seed = 'c4773223c43939b50f66bd1dd3129fe4d75f81dbfe49969adf36db159d58d236',
prefix6 = '2a0f:b506:ff1b::/64',
extra_prefixes6 = { 'fd74:fdaa:9dc4::/64', '2a06:e881:2000:4601::/64' },
prefix4 = '10.18.232.0/21',
wifi24 = {
ap = {
ssid = 'test.nordwest.freifunk.net',
owe_ssid = 'owe.test.nordwest.freifunk.net',
owe_transition_mode = true,
},
mesh = {
id = 't-ffnw-mesh_02:00:0a:12:e8:00',
},
},
wifi5 = {
ap = {
ssid = 'test.nordwest.freifunk.net',
owe_ssid = 'owe.test.nordwest.freifunk.net',
owe_transition_mode = true,
},
mesh = {
id = 't-ffnw-mesh_02:00:0a:12:e8:00',
},
},
next_node = {
name = { 'node.ffnw', 'nextnode', 'nn' },
ip6 = 'fd74:fdaa:9dc4::127',
mac = '16:41:95:40:f7:dc',
},
mesh_vpn = {
tunneldigger = {
brokers = {'whv01.sn.ffnw.de:9001'}
},
},
hoodselector = {
shapes = {
{
{
lat = 53.5,
lon = 8.03
},
{
lat = 53.5,
lon = 8.18
},
{
lat = 53.62,
lon = 8.18
},
{
lat = 53.62,
lon = 8.03
},
{
lat = 53.5,
lon = 8.03
}
}
}
}
}
From 28944a798cdd929f3b87f18112fcf7b3c2c4c442 Mon Sep 17 00:00:00 2001
From: runner01 <runner01@ffnw.de>
Date: Fri, 8 Feb 2019 04:43:50 +0100
Subject: [PATCH 1/4] add gluon-geolocator
---
package/gluon-geolocator/Makefile | 14 ++
package/gluon-geolocator/check_site.lua | 2 +
.../files/etc/config/geolocator | 2 +
.../files/usr/lib/micron.d/geolocator | 1 +
.../luasrc/lib/gluon/geolocator/geolocator | 130 ++++++++++++++++++
.../lib/gluon/upgrade/540-geolocator-settings | 26 ++++
6 files changed, 175 insertions(+)
create mode 100644 package/gluon-geolocator/Makefile
create mode 100644 package/gluon-geolocator/check_site.lua
create mode 100644 package/gluon-geolocator/files/etc/config/geolocator
create mode 100644 package/gluon-geolocator/files/usr/lib/micron.d/geolocator
create mode 100755 package/gluon-geolocator/luasrc/lib/gluon/geolocator/geolocator
create mode 100755 package/gluon-geolocator/luasrc/lib/gluon/upgrade/540-geolocator-settings
diff --git a/package/gluon-geolocator/Makefile b/package/gluon-geolocator/Makefile
new file mode 100644
index 00000000..54dd3002
--- /dev/null
+++ b/package/gluon-geolocator/Makefile
@@ -0,0 +1,14 @@
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=gluon-geolocator
+PKG_VERSION:=1
+PKG_RELEASE:=1
+
+include ../gluon.mk
+
+define Package/gluon-geolocator
+ TITLE:=Provide the geolocator to receive positions over wifi
+ DEPENDS:=+gluon-node-info +micrond +lua-bit32
+endef
+
+$(eval $(call BuildPackageGluon,gluon-geolocator))
diff --git a/package/gluon-geolocator/check_site.lua b/package/gluon-geolocator/check_site.lua
new file mode 100644
index 00000000..2771d938
--- /dev/null
+++ b/package/gluon-geolocator/check_site.lua
@@ -0,0 +1,2 @@
+need_boolean(in_site({'geolocator', 'autolocation'}), false)
+need_number(in_site({'geolocator', 'interval'}), false)
diff --git a/package/gluon-geolocator/files/etc/config/geolocator b/package/gluon-geolocator/files/etc/config/geolocator
new file mode 100644
index 00000000..aed88cce
--- /dev/null
+++ b/package/gluon-geolocator/files/etc/config/geolocator
@@ -0,0 +1,2 @@
+config geolocator 'settings'
+ option static_location '0'
diff --git a/package/gluon-geolocator/files/usr/lib/micron.d/geolocator b/package/gluon-geolocator/files/usr/lib/micron.d/geolocator
new file mode 100644
index 00000000..7379b730
--- /dev/null
+++ b/package/gluon-geolocator/files/usr/lib/micron.d/geolocator
@@ -0,0 +1 @@
+*/5 * * * * /lib/gluon/geolocator/geolocator
diff --git a/package/gluon-geolocator/luasrc/lib/gluon/geolocator/geolocator b/package/gluon-geolocator/luasrc/lib/gluon/geolocator/geolocator
new file mode 100755
index 00000000..3ec5771c
--- /dev/null
+++ b/package/gluon-geolocator/luasrc/lib/gluon/geolocator/geolocator
@@ -0,0 +1,130 @@
+#!/usr/bin/lua
+
+local bit = require('bit32')
+local unistd = require('posix.unistd')
+local fcntl = require('posix.fcntl')
+local uci = require('simple-uci').cursor()
+local json = require ("jsonc")
+local ubus = require 'ubus'
+local iwinfo = require("iwinfo")
+
+local LOC="gluon-node-info"
+local GLC="geolocator"
+local TIME_STAMP="/tmp/geolocator_timestamp"
+
+if not uci:get_bool(GLC, "settings", "auto_location") then
+ os.exit(0)
+end
+
+-- PID file to ensure the geolocator isn't running parallel
+local lockfile = '/var/lock/geolocator.lock'
+local lockfd, err = fcntl.open(lockfile, bit.bor(fcntl.O_WRONLY, fcntl.O_CREAT), 384) -- mode 0600
+
+if not lockfd then
+ io.stderr:write(err, '\n')
+ os.exit(1)
+end
+
+local ok, _ = fcntl.fcntl(lockfd, fcntl.F_SETLK, {
+ l_start = 0,
+ l_len = 0,
+ l_type = fcntl.F_WRLCK,
+ l_whence = unistd.SEEK_SET,
+})
+
+if not ok then
+ io.stderr:write(string.format(
+ "Unable to lock file %s. Make sure there is no other instance of the geolocator running.\n",
+ lockfile
+ ))
+ os.exit(1)
+end
+
+-- Iterates over all active WLAN interfaces
+-- Returning true from the callback function will skip all remaining
+-- interfaces of the same radio
+local function foreach_radio(f)
+ local uconn = assert(ubus.connect(), 'failed to connect to ubus')
+ local status = uconn:call('network.wireless', 'status', {})
+ ubus.close(uconn)
+
+ for _, radio in pairs(status) do
+ for _, iface in ipairs(radio.interfaces) do
+ if f(iface.ifname) then
+ break
+ end
+ end
+ end
+end
+
+local function receive_json(request)
+ local f = assert(io.popen(string.format("exec wget -T 15 -q -O- '%s'", request)), 'failed to run wget')
+ local data = f:read('*a')
+ f:close()
+
+ return json.parse(data)
+end
+
+-- Get position
+local function locate()
+ local done_bssids = {}
+ local found_bssids = {}
+ foreach_radio(function(ifname)
+ local iw = iwinfo[iwinfo.type(ifname)]
+ if not iw then
+ -- Skip other ifaces of this radio, as they
+ -- will have the same type
+ return true
+ end
+
+ local scanlist = iw.scanlist(ifname)
+ if not scanlist then
+ return false
+ end
+
+ for _, entry in ipairs(scanlist) do
+ if entry.mode:match("Master") then
+ local bssid = string.upper(entry.bssid:gsub(":", ""))
+ if not done_bssids[bssid] then
+ table.insert(found_bssids, bssid)
+ done_bssids[bssid] = true
+ end
+ end
+ end
+
+ return true
+ end)
+
+ assert(#found_bssids > 0, 'insufficient BSSIDs found')
+
+ local data = receive_json('http://openwifi.su/api/v1/bssids/' .. table.concat(found_bssids, ','))
+ assert(type(data) == 'table' and data.lon and data.lat, 'location not available')
+
+ return data
+end
+
+-- Check if interval over or not exist
+if io.open(TIME_STAMP) ~= nil then
+ if os.time() - tonumber(io.open(TIME_STAMP):read("*a")) < uci:get(GLC, "settings", "refresh_interval") * 60 then
+ os.exit(0)
+ end
+end
+
+local pos = locate()
+if not next(pos) then
+ os.exit(1)
+end
+if not uci:get_bool(GLC, "settings", "static_location") then
+ uci:set(LOC, uci:get_first(LOC, 'location'), 'latitude', pos.lat)
+ uci:set(LOC, uci:get_first(LOC, 'location'), 'longitude', pos.lon)
+ uci:save(LOC)
+ uci:commit(LOC)
+end
+local timestap = io.open(TIME_STAMP, "w")
+if timestap ~= nil then
+ timestap:write(os.time())
+ timestap:close()
+ os.exit(0)
+end
+io.stdout:write("Can`t create file on " .. TIME_STAMP .. "\n")
+os.exit(1)
diff --git a/package/gluon-geolocator/luasrc/lib/gluon/upgrade/540-geolocator-settings b/package/gluon-geolocator/luasrc/lib/gluon/upgrade/540-geolocator-settings
new file mode 100755
index 00000000..84c9f99c
--- /dev/null
+++ b/package/gluon-geolocator/luasrc/lib/gluon/upgrade/540-geolocator-settings
@@ -0,0 +1,26 @@
+#!/usr/bin/lua
+
+local site = require 'gluon.site'
+local uci = require('simple-uci').cursor()
+
+local config = 'geolocator'
+
+local static_location = uci:get(config, 'settings', 'static_location')
+
+local auto_location = uci:get(config, 'settings', 'auto_location')
+if not auto_location then
+ auto_location = site.geolocator.autolocation(false)
+end
+
+local refresh_interval = uci:get(config, 'settings', 'refresh_interval')
+if not refresh_interval then
+ refresh_interval = site.geolocator.interval(720) -- default: 12h
+end
+
+uci:delete(config, 'settings')
+uci:section(config, config, 'settings', {
+ static_location = static_location,
+ refresh_interval = refresh_interval,
+ auto_location = auto_location,
+})
+uci:save(config)
--
2.20.1
+++ patches/openwrt/0098-wi-enable-IEEE802.11s-scan-support.patch
@@ -0,0 +1,25 @@
+From: Jan-Tarek Butt <tarek@ring0.de>
+Date: Tue, 11 Apr 2017 16:38:39 +0200
+Subject: wi enable IEEE802.11s scan support
+
+Signed-off-by: Jan-Tarek Butt <tarek@ring0.de>
+
+diff --git a/package/network/utils/iw/patches/305-enable_IEEE802.11s_scan_support.patch b/package/network/utils/iw/patches/305-enable_IEEE802.11s_scan_support.patch
+new file mode 100644
+index 0000000000000000000000000000000000000000..3b43bb9258c5b3d708f8d73d8e542fc530a0f8ac
+--- /dev/null
++++ b/package/network/utils/iw/patches/305-enable_IEEE802.11s_scan_support.patch
+@@ -0,0 +1,13 @@
++--- a/scan.c
+++++ b/scan.c
++@@ -1333,7 +1333,9 @@
++ [74] = { "Overlapping BSS scan params", print_obss_scan_params, 14, 255, BIT(PRINT_SCAN), },
++ [50] = { "Extended supported rates", print_supprates, 0, 255, BIT(PRINT_SCAN), },
++ [113] = { "MESH Configuration", print_mesh_conf, 7, 7, BIT(PRINT_SCAN), },
+++#endif
++ [114] = { "MESH ID", print_ssid, 0, 32, BIT(PRINT_SCAN) | BIT(PRINT_LINK), },
+++#if 0
++ [127] = { "Extended capabilities", print_capabilities, 0, 255, BIT(PRINT_SCAN), },
++ [107] = { "802.11u Interworking", print_interworking, 0, 255, BIT(PRINT_SCAN), },
++ [108] = { "802.11u Advertisement", print_11u_advert, 0, 255, BIT(PRINT_SCAN), },
++
+++ patches/openwrt/0099-iw-inc-release-number.patch
@@ -0,0 +1,17 @@
+From: Jan-Tarek Butt <tarek@ring0.de>
+Date: Mon, 17 Apr 2017 16:05:05 +0200
+Subject: iw: inc release number
+
+Signed-off-by: Jan-Tarek Butt <tarek@ring0.de>
+
+diff --git a/package/network/utils/iw/Makefile b/package/network/utils/iw/Makefile
+index d17cbca0df391a287fb9d80a3d9c1ca1355c1774..1c3d3783db11cdc427129ce235be32a3c27f72fa 100644
+--- a/package/network/utils/iw/Makefile
++++ b/package/network/utils/iw/Makefile
+@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
+
+ PKG_NAME:=iw
+ PKG_VERSION:=4.3
+-PKG_RELEASE:=1
++PKG_RELEASE:=2
+
+ PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
+ PKG_SOURCE_URL:=@KERNEL/software/network/iw
From 71bcf5add0180cda356f6c9ce69e2a676e4daba6 Mon Sep 17 00:00:00 2001
From: Jan-Tarek Butt <tarek@ring0.de>
Date: Sun, 25 Feb 2018 08:42:42 +0100
Subject: [PATCH 2/4] ffnw config migration from gluon-node-info to geolocator
Signed-off-by: Jan-Tarek Butt <tarek@ring0.de>
---
.../lib/gluon/upgrade/900-geloc-conf-migration | 17 +++++++++++++++++
1 file changed, 17 insertions(+)
create mode 100755 package/gluon-geolocator/luasrc/lib/gluon/upgrade/900-geloc-conf-migration
diff --git a/package/gluon-geolocator/luasrc/lib/gluon/upgrade/900-geloc-conf-migration b/package/gluon-geolocator/luasrc/lib/gluon/upgrade/900-geloc-conf-migration
new file mode 100755
index 00000000..6bfb1059
--- /dev/null
+++ b/package/gluon-geolocator/luasrc/lib/gluon/upgrade/900-geloc-conf-migration
@@ -0,0 +1,17 @@
+#!/usr/bin/lua
+
+local uci = require('simple-uci').cursor()
+local config = 'gluon-node-info'
+local sname = uci:get_first(config, 'location')
+if sname then
+ local options = {'refresh_interval', 'static_location', 'auto_location'}
+ for _, option in ipairs(options) do
+ local value = uci:get(config, sname, option)
+ if value then
+ uci:set('geolocator', 'settings', option, value)
+ uci:delete(config, sname, option)
+ end
+ end
+ uci:save(config)
+ uci:save('geolocator')
+end
--
2.20.1
From a273489a54d14454e6e53af94ab479b7c72f74d2 Mon Sep 17 00:00:00 2001
From: runner01 <runner01@ffnw.de>
Date: Mon, 18 Mar 2019 21:29:26 +0100
Subject: [PATCH 3/4] hoodselector to domain migration
Domain migration: restart services after migration
Signed-off-by: runner01 <runner01@ffnw.de>
---
.../lib/gluon/upgrade/010-domain-migrate | 38 +++++++++++++++++++
1 file changed, 38 insertions(+)
create mode 100755 package/gluon-hoodselector/luasrc/lib/gluon/upgrade/010-domain-migrate
diff --git a/package/gluon-hoodselector/luasrc/lib/gluon/upgrade/010-domain-migrate b/package/gluon-hoodselector/luasrc/lib/gluon/upgrade/010-domain-migrate
new file mode 100755
index 00000000..9146970b
--- /dev/null
+++ b/package/gluon-hoodselector/luasrc/lib/gluon/upgrade/010-domain-migrate
@@ -0,0 +1,38 @@
+#!/usr/bin/lua
+
+local uci = require('simple-uci').cursor()
+local hoodutil = require('hoodselector.util')
+
+local last_hood = uci:get('hoodselector', 'hoodselector', 'hood')
+
+-- Return domain based on a given MESH-ID. nil if no matching domain could be found
+function get_domain_by_meshid(jdomains, meshid)
+ for _, jdomain in pairs(jdomains) do
+ if jdomain.domain.wifi24 ~= nil then
+ if jdomain.domain.wifi24.mesh ~= nil then
+ if meshid:lower() == jdomain.domain.wifi24.mesh.id:lower() then
+ return jdomain
+ end
+ end
+ end
+ if jdomain.domain.wifi5 ~= nil then
+ if jdomain.domain.wifi5.mesh ~= nil then
+ if meshid:lower() == jdomain.domain.wifi5.mesh.id:lower() then
+ return jdomain
+ end
+ end
+ end
+ end
+ return nil
+end
+
+if last_hood ~= nil then
+ print(last_hood)
+ local new_domain = get_domain_by_meshid(hoodutil.get_domains(),"ffnw-mesh_"..last_hood)
+ if new_domain ~= nil then
+ print(new_domain.domain_code)
+ hoodutil.set_domain_config(new_domain)
+ os.execute("rm /etc/config/hoodselector")
+ hoodutil.restart_services()
+ end
+end
--
2.20.1
......@@ -23,7 +23,7 @@ msgstr ""
"mit unseren Servern verbinden. Der Key ist dafür da, dass sich dein Knoten "
"an unseren Servern authorisieren kann."
"<div class=\"the-key\">"
" # <%= hostname %>"
" # <%= pcdata(hostname) %>"
" <br/>"
"<%= pubkey %>"
"</div>"
......@@ -33,14 +33,51 @@ msgstr ""
" weiter."
"</p>"
msgid "gluon-config-mode:novpn"
msgstr ""
"<p>Du hast ausgewählt, <strong>kein Mesh-VPN</strong> "
"zu nutzen. Dein Knoten kann also nur dann eine Verbindung zum Freifunk-Netz "
"aufbauen, wenn andere Freifunk-Router in WLAN-Reichweite sind."
" <br/>"
"Bei Fragen oder Problemen helfen wir dir gerne unter "
"<a href=\"https://ffnw.de\">https://ffnw.de</a>"
" weiter."
"</p>"
msgid "gluon-config-mode:reboot"
msgstr ""
"<p>Dein Knoten startet gerade neu und wird anschließend versuchen, "
"sich mit anderen Freifunkknoten in seiner Nähe und/oder unseren Servern zu "
"verbinden. Weitere Informationen zur "
"<p>Dein Knoten <em><%= pcdata(hostname) %></em> startet gerade neu und wird "
"anschließend versuchen, sich mit anderen Freifunkknoten in seiner Nähe "
"und/oder unseren Servern zu verbinden. Weitere Informationen zur "
"Nordwest Freifunk-Community findest du auf "
"<a href=\"https://ffnw.de/\">unserer Webseite</a>.</p>"
"<p>Um zu dieser Konfigurationsseite zurückzugelangen, drücke im normalen "
"Betrieb für 10 Sekunden den Reset-Button. Das Gerät wird dann im Config "
"Mode neustarten.</p>"
"<p>Viel Spaß mit deinem Knoten und bei der Erkundung von Freifunk! Los geht's!</p>"
msgid "gluon-config-mode:altitude-label"
msgstr "Höhe"
msgid "gluon-config-mode:altitude-help"
msgstr ""
"Die Höhenangabe ist optional und sollte nur gesetzt werden, wenn ein "
"exakter Wert bekannt ist."
# Leave empty to use the default text, which can be found in:
# package/gluon-config-mode-hostname/i18n/
msgid "gluon-config-mode:hostname-help"
msgstr ""
# Leave empty to use the default text, which can be found in:
# package/gluon-config-mode-geo-location/i18n/
msgid "gluon-config-mode:geo-location-help"
msgstr ""
# Leave empty to use the default text, which can be found in:
# package/gluon-config-mode-contact-info/i18n/
msgid "gluon-config-mode:contact-help"
msgstr ""
msgid "gluon-config-mode:contact-note"
msgstr ""
......@@ -24,20 +24,52 @@ msgstr ""
"any action."
"</p>"
"<div class=\"the-key\">"
" # <%= hostname %>"
" # <%= pcdata(hostname) %>"
" <br/>"
"<%= pubkey %>"
"</div>"
"If you have questions or problems please write to us to: "
"<a href=\"mailto:info@nordwest.freifunk.net\">info@nordwest.freifunk.net</a>."
msgid "gluon-config-mode:novpn"
msgstr ""
"<p>You have selected <strong>not</strong> to use the mesh VPN. "
"Your node will only be able to connect to the Freifunk network if other nodes in reach "
"already have a connection.</p>"
msgid "gluon-config-mode:reboot"
msgstr ""
"<p>The node is currently rebooting and will then attempt to connect to other "
"nearby Freifunk nodes and/or our servers after that. "
"<p>The node <em><%= pcdata(hostname) %></em> is currently rebooting and will "
"then attempt to connect to other nearby Freifunk nodes and/or our servers after that. "
"You can find lots of information on the Freifunk Nordwest community on "
"<a href=\"https://nordwest.freifunk.net/\">our homepage</a>.</p>"
"<p>To get back to this configuration interface, press the reset button for "
"10 seconds during normal operation. The device will then reboot into config "
"mode.</p>"
"<p>Have fun with your node while exploring the Freifunk network! Let's go!</p>"
msgid "gluon-config-mode:altitude-label"
msgstr "Altitude"
msgid "gluon-config-mode:altitude-help"
msgstr ""
"Specifying the altitude is optional and should only be done if a proper "
"value is known."
# Leave empty to use the default text, which can be found in:
# package/gluon-config-mode-hostname/i18n/
msgid "gluon-config-mode:hostname-help"
msgstr ""
# Leave empty to use the default text, which can be found in:
# package/gluon-config-mode-geo-location/i18n/
msgid "gluon-config-mode:geo-location-help"
msgstr ""
# Leave empty to use the default text, which can be found in:
# package/gluon-config-mode-contact-info/i18n/
msgid "gluon-config-mode:contact-help"
msgstr ""
msgid "gluon-config-mode:contact-note"
msgstr ""
features({
'autoupdater',
'ebtables-filter-multicast',
'ebtables-filter-ra-dhcp',
'mesh-batman-adv-15',
%A
'respondd',
'status-page',
'web-advanced',
'web-wizard',
'ebtables-source-filter',
'radv-filterd',
'lock-password',
'web-private-wifi',
'web-logging',
'geolocator',
'config-mode-geo-location-osm',
'hoodselector'
})
packages({
'ffnw-banner',
'respondd-module-airtime',
'iwinfo',
'wget-ssl',
'ca-bundle',
'ca-certificates'
})
if not device_class('tiny') then
features({
'wireless-encryption-wpa3',
'web-cellular'
})
end
-- Custom package lists
local pkgs_usb_hid = {
'kmod-usb-hid',
'kmod-hid-generic'
}
local pkgs_usb_serial = {
'kmod-usb-serial',
'kmod-usb-serial-ch341',
'kmod-usb-serial-cp210x',
'kmod-usb-serial-ftdi',
'kmod-usb-serial-pl2303'
}
local pkgs_usb_storage = {
'block-mount',
'blkid',
'kmod-fs-ext4',
'kmod-fs-ntfs',
'kmod-fs-vfat',
'kmod-usb-storage',
'kmod-usb-storage-extras', -- Card Readers
'kmod-usb-storage-uas', -- USB Attached SCSI (UAS/UASP)
'kmod-nls-base',
'kmod-nls-cp1250', -- NLS Codepage 1250 (Eastern Europe)
'kmod-nls-cp437', -- NLS Codepage 437 (United States, Canada)
'kmod-nls-cp850', -- NLS Codepage 850 (Europe)
'kmod-nls-cp852', -- NLS Codepage 852 (Europe)
'kmod-nls-iso8859-1', -- NLS ISO 8859-1 (Latin 1)
'kmod-nls-iso8859-13', -- NLS ISO 8859-13 (Latin 7; Baltic)
'kmod-nls-iso8859-15', -- NLS ISO 8859-15 (Latin 9)
'kmod-nls-iso8859-2', -- NLS ISO 8859-2 (Latin 2)
'kmod-nls-utf8' -- NLS UTF-8
}
local pkgs_usb_net = {
'kmod-mii',
'kmod-usb-net',
'kmod-usb-net-asix',
'kmod-usb-net-asix-ax88179',
'kmod-usb-net-cdc-eem',
'kmod-usb-net-cdc-ether',
'kmod-usb-net-cdc-subset',
'kmod-usb-net-dm9601-ether',
'kmod-usb-net-hso',
'kmod-usb-net-ipheth',
'kmod-usb-net-mcs7830',
'kmod-usb-net-pegasus',
'kmod-usb-net-rndis',
'kmod-usb-net-rtl8152',
'kmod-usb-net-smsc95xx',
}
local pkgs_pci = {
'pciutils'
}
local pkgs_pci_net = {
'kmod-bnx2'
}
if target('ath79') then
if device({
'buffalo-wzr-hp-ag300h',
'devolo-wifi-pro-1750e',
'buffalo-wzr-600dhp',
'buffalo-wzr-hp-g300nh-rtl8366s',
'd-link-dir825b1',
'gl.inet-gl-ar150',
'gl.inet-6416',
'gl.inet-gl-ar150',
'gl.inet-gl-ar300m-nor',
'gl.inet-gl-ar300m-lite',
'gl.inet-gl-ar750',
'gl.inet-gl-ar750s-nor',
'gl.inet-gl-xe300',
'librerouter-v1',
'netgear-wndr3700',
'netgear-wndr3700-v2',
'netgear-wndr3700-v4',
'netgear-wndr3800',
'netgear-wndr3800ch',
'netgear-wndr4300',
'tp-link-archer-a7-v5',
'tp-link-archer-c5-v1',
'tp-link-archer-c7-v2',
'tp-link-archer-c7-v4',
'tp-link-archer-c7-v5',
'tp-link-archer-c59-v1',
'tp-link-tl-wdr3500-v1',
'tp-link-tl-wdr3600-v1',
'tp-link-tl-wdr4300-v1',
'tp-link-tl-wr842n-v3',
'tp-link-tl-wr902ac-v1',
'tp-link-tl-wr1043nd-v2',
'tp-link-tl-wr1043nd-v3',
'tp-link-tl-wr1043nd-v4',
}) then
packages(pkgs_usb_serial)
end
end
if target('ipq40xx') then
packages(pkgs_usb_serial)
packages(pkgs_usb_storage)
end
if target('ipq806x') then
packages(pkgs_usb_serial)
packages(pkgs_usb_storage)
end
if target('mediatek') then
packages(pkgs_usb_serial)
packages(pkgs_usb_storage)
end
if target('mpc85xx') then
packages(pkgs_usb_serial)
packages(pkgs_usb_storage)
end
if target('ramips', 'mt7621') then
packages(pkgs_usb_serial)
end
if target('rockchip') then
-- No PCI / video
packages(pkgs_usb_net)
packages(pkgs_usb_serial)
packages(pkgs_usb_storage)
end
if target('sunxi') then
-- No PCI / video
packages(pkgs_usb_serial)
packages(pkgs_usb_storage)
end
-- Include all custom packages for RaspberryPi
if target('bcm27xx') then
packages(pkgs_usb_hid)
packages(pkgs_usb_net)
packages(pkgs_usb_serial)
packages(pkgs_usb_storage)
end
-- Include all custom packages for x86
if target('x86') then
packages(pkgs_pci)
packages(pkgs_pci_net)
packages(pkgs_usb_hid)
packages(pkgs_usb_net)
packages(pkgs_usb_serial)
packages(pkgs_usb_storage)
end
-- the Network-activated setup-mode allows us to unbreak the device
if device({'zyxel-nwa55axe'}) then
broken(false)
packages({'ffda-network-setup-mode'})
end
GLUON_SITE_FEEDS='ffnw'
GLUON_SITE_FEEDS='ffnw community'
PACKAGES_FFNW_REPO=https://git.nordwest.freifunk.net/ffnw-firmware/packages.git
PACKAGES_FFNW_REPO=https://git.ffnw.de/ffnw-firmware/packages.git
PACKAGES_FFNW_BRANCH=master
PACKAGES_FFNW_COMMIT=8fbe541e6442261bf1013551efb53700d9ed9c16
PACKAGES_FFNW_COMMIT=44d6aeca186e5ff92e8372f0a7e774d5ca443d3e
PACKAGES_COMMUNITY_REPO=https://github.com/freifunk-gluon/community-packages.git
PACKAGES_COMMUNITY_COMMIT=bd78c4cea3fd2e203c0628ded1098c7a92cb3ae4
PACKAGES_COMMUNITY_BRANCH=master
#!/bin/bash
patch_target() {
if [ "$(find "$PWD"/gluon_patches/*.patch 2> /dev/null | wc -l)" -ge 1 ]; then
for patch in "$PWD"/gluon_patches/*.patch; do
patch --no-backup-if-mismatch -p0 -d "../" -i "$patch"
echo "patching $patch on $(../;pwd)"
done
fi
}
cd ..
if git status | head -n1 | grep "v2016.2.x"; then
patch_target
else
echo "no gluon repo founden or wrong branch"
exit 1
fi
......@@ -2,175 +2,147 @@
hostname_prefix = 'ffnw-',
site_name = 'Freifunk Nordwest',
site_code = 'ffnw',
default_domain = 'default',
timezone = 'CET-1CEST,M3.5.0,M10.5.0/3', -- Europe/Berlin
ntp_servers = {'ntp.ffnw'},
opkg = {
openwrt = 'http://mirror.ffnw.de/openwrt/%n/%v/%S/packages',
extra = {
modules = 'http://mirror.ffnw.de/modules/gluon-%GS-%GR/%S',
%A
},
},
prefix6 = 'fd74:fdaa:9dc4::/64',
mesh_on_wan = false,
timezone = 'CET-1CEST,M3.5.0,M10.5.0/3', -- Europe/Berlin
regdom = 'DE',
ntp_servers = {
'ntp.ffnw',
radv_filterd = {
threshold = 20,
},
regdom = 'DE',
wifi24 = {
channel = 6,
htmode = 'HT40+',
supported_rates = {6000, 9000, 12000, 18000, 24000, 36000, 48000, 54000},
basic_rate = {6000, 9000, 18000, 36000, 54000},
ap = {
ssid = 'testing.nordwest.freifunk.net',
},
ibss = {
ssid = 'testing.mesh.ffnw',
bssid = '02:CA:FF:EE:BA:BE',
mesh = {
mcast_rate = 12000,
},
--[[mesh = {
id = 'testing-ffnw-mesh',
mcast_rate = 12000,
},--]]
},
wifi5 = {
channel = 44,
htmode = 'HT40+',
ap = {
ssid = 'testing.nordwest.freifunk.net',
},
ibss = {
ssid = 'testing.mesh.ffnw',
bssid = '02:CA:FF:EE:BA:BE',
outdoor_chanlist = '100-140',
mesh = {
mcast_rate = 12000,
},
--[[mesh = {
id = 'testing-ffnw-mesh',
mcast_rate = 12000,
},--]]
},
next_node = {
ip6 = 'fd74:fdaa:9dc4::127',
mac = '16:41:95:40:f7:dc',
dns = {
cacheentries = 5000,
servers = {'2a06:e881:2000:8::1','2a06:e881:2000:7::1'},
},
mesh = {
batman_adv = {
gw_sel_class = 1, --class 1 is calculated from both the TQ and the announced bandwidth.
routing_algo = "BATMAN_IV", -- also possible: "BATMAN_V" and "BATMAN_IV_LEGACY", but this value may not be unset
},
},
fastd_mesh_vpn = {
methods = { 'salsa2012+umac' },
mesh_vpn = {
enabled = true,
configurable = true,
mtu = 1312,
groups = {
backbone = {
limit = 1,
peers = {
default02 = {
key = '32a02dd5e6b9233926e178ac609023ad30bcf26954d38d410088bbdc0b2258cb',
remotes = {'"default02.ffnw.de" port 11111'},
},
default03 = {
key = '9737c65a17cfaa8339315ee53d2b9e02520733780362efacf9503737f5a23204',
remotes = {'"default03.ffnw.de" port 11111'},
},
default04 = {
key = '18199a10620dbd13728a09402ca2364436ca27e46e669a2ebdfe20976dc45e6f',
remotes = {'"default04.ffnw.de" port 11111'},
},
default05 = {
key = '5c1738236ba6930f654fd5e815e0c63ac03f81551ee2b183045b256fb133f77d',
remotes = {'"default05.ffnw.de" port 11111'},
},
default06 = {
key ='22e270ff9b2d1017c3a0b00dd22a58ef7e5915a355eeb16f0b8b52d7eb377869',
remotes = {'"default06.ffnw.de" port 11111'},
},
},
},
tunneldigger = {
mtu = 1312,
},
-- The bandwidth limit can be enabled by default here.
bandwidth_limit = {
enabled = false,
egress = 1200,
ingress = 12000,
-- Default upload limit (kbit/s).
egress = 1800,
-- Default download limit (kbit/s).
ingress = 14400,
},
},
interfaces = {
lan = {
default_roles = { 'client' },
},
wan = {
default_roles = { 'uplink' },
},
single = {
default_roles = { 'uplink' },
},
},
autoupdater = {
enabled = 1,
branch = 'stable',
branches = {
stable = {
name = 'stable',
mirrors = {
'http://autoupdate.ffnw/stable',
%B
},
good_signatures = 4,
good_signatures = 3,
pubkeys = {
'22c79b193a36269fd7fd51531e762b776e982926c90822df80b56f2be11648d4', --bjo
'99c420e95dd0923ee6277af5c306f9ae6b97f8793b08edd41448925df5fe35b9', --floh1111
'd2b1366a38514e0fac47b119a8a08973ea8020bf9c138908d32b56a5d99f3079', --baranator
'5d95cc2ef3ad17fe3716469e1effde4a49a25d4de9befa4a6eb260e4cda79ab0', --tata
'0e6704ba26c150185514a391658455a612839c35bd83e0faffa81e0be48356e2', --sk
'1f45d9be8a07cc2b6fcc384c71685fc0895a54be0d884aa4637c93ec4f36d970', --stefan6
'36dff98a686a15d7fb129fe98df7977c7d53919aa512b825356bd8d638fca534', --PowerPan
'13f022eb0704007a58a6a68952feaa5a91af4015db46f13bf3eb676a06e926f2', --fkr
'cc2e9b38ebe37613aa05bde6c0543a97a72940b1eee9f8ab89236e804cf0a3ff', --lethexa
'785004680028afc482a5c92b392d6d7ebdfa26a48e678cb447e78d9b2eb84556', --f700w
'd3a4cbc90a2d4dbfc5386dd035016a04bfdfe1e7615fa8ea25bea5c048a7f106', --lrnzo
'e3d2e96563b9be3e95a3d748c0ff50a6f854208b68b4a1181667641d74754c76', --stefan
},
},
rc = {
name = 'stable',
mirrors = {
%C
},
good_signatures = 1,
pubkeys = {
'99c420e95dd0923ee6277af5c306f9ae6b97f8793b08edd41448925df5fe35b9', --floh1111
'5d95cc2ef3ad17fe3716469e1effde4a49a25d4de9befa4a6eb260e4cda79ab0', --tata
'0e6704ba26c150185514a391658455a612839c35bd83e0faffa81e0be48356e2', --sk
'785004680028afc482a5c92b392d6d7ebdfa26a48e678cb447e78d9b2eb84556', --f700w
'd3a4cbc90a2d4dbfc5386dd035016a04bfdfe1e7615fa8ea25bea5c048a7f106', --lrnzo
'e3d2e96563b9be3e95a3d748c0ff50a6f854208b68b4a1181667641d74754c76', --stefan
},
},
testing = {
name = 'testing',
mirrors = {
'http://autoupdate.ffnw/testing',
%D
},
good_signatures = 1,
pubkeys = {
'22c79b193a36269fd7fd51531e762b776e982926c90822df80b56f2be11648d4', --bjo
'99c420e95dd0923ee6277af5c306f9ae6b97f8793b08edd41448925df5fe35b9', --floh1111
'd2b1366a38514e0fac47b119a8a08973ea8020bf9c138908d32b56a5d99f3079', --baranator
'5d95cc2ef3ad17fe3716469e1effde4a49a25d4de9befa4a6eb260e4cda79ab0', --tata
'0e6704ba26c150185514a391658455a612839c35bd83e0faffa81e0be48356e2', --sk
'1f45d9be8a07cc2b6fcc384c71685fc0895a54be0d884aa4637c93ec4f36d970', --stefan6
'36dff98a686a15d7fb129fe98df7977c7d53919aa512b825356bd8d638fca534', --PowerPan
'13f022eb0704007a58a6a68952feaa5a91af4015db46f13bf3eb676a06e926f2', --fkr
'785004680028afc482a5c92b392d6d7ebdfa26a48e678cb447e78d9b2eb84556', --f700w
'd3a4cbc90a2d4dbfc5386dd035016a04bfdfe1e7615fa8ea25bea5c048a7f106', --lrnzo
'e3d2e96563b9be3e95a3d748c0ff50a6f854208b68b4a1181667641d74754c76', --stefan
},
},
nightly_master = {
name = 'nightly_master',
mirrors = {
'http://autoupdate.ffnw/nightly/master',
%E
},
good_signatures = 1,
pubkeys = {
'f89880c62f6975facbffa582f6a7078a63102477f1770f429f4e6e2a1ac7506f', --runner02.ffnw.de
'f89880c62f6975facbffa582f6a7078a63102477f1770f429f4e6e2a1ac7506f', --runner01.ffnw.de
},
},
},
},
setup_mode = {
skip = false,
},
location = {
autolocation = 1,
interval = 1000,
config_mode = {
geo_location = {
show_altitude = true,
osm = {
center = {
lat = 53.084126922,
lon = 7.915649414,
},
},
},
},
}
GLUON_SITE_PACKAGES := \
gluon-mesh-batman-adv-15 \
gluon-respondd \
gluon-autoupdater \
gluon-config-mode-core \
gluon-config-mode-autoupdater \
gluon-config-mode-hostname \
gluon-config-mode-mesh-vpn \
gluon-ebtables-filter-multicast \
gluon-ebtables-filter-ra-dhcp \
gluon-luci-admin \
gluon-luci-autoupdater \
gluon-luci-portconfig \
gluon-luci-private-wifi \
gluon-luci-wifi-config \
gluon-mesh-vpn-fastd \
gluon-next-node \
gluon-radvd \
gluon-setup-mode \
gluon-status-page \
haveged \
iwinfo \
ffnw-banner \
libwlocate \
lwtrace \
ffnw-node-info \
ffnw-config-mode-geo-location \
ffnw-config-mode-contact-info \
ffnw-hoodselector \
ffnw-multiple-v6-watchdoog
USB_BASIC := \
kmod-usb-core \
kmod-usb2 \
kmod-usb-hid
USB_NIC := \
kmod-usb-net \
kmod-usb-net-asix \
kmod-usb-net-rtl8150 \
kmod-usb-net-rtl8152 \
kmod-usb-net-dm9601-ether
ifeq ($(GLUON_TARGET),x86-generic)
GLUON_SITE_PACKAGES += \
$(USB_BASIC) \
kmod-usb-ohci-pci \
$(USB_NIC)
endif
ifeq ($(GLUON_TARGET),x86-64)
GLUON_SITE_PACKAGES += \
$(USB_BASIC) \
$(USB_NIC) \
kmod-igb
endif
DEFAULT_GLUON_RELEASE := $(shell date '+%Y%m%d')-$(shell git log -1 --pretty=format:%h)
DEFAULT_GLUON_PRIORITY := 0
DEFAULT_GLUON_REGION := eu
GLUON_ATH10K_MESH := ibss
GLUON_MULTIDOMAIN=1
# Allow overriding from the command line
GLUON_RELEASE ?= $(DEFAULT_GLUON_RELEASE)
GLUON_PRIORITY ?= $(DEFAULT_GLUON_PRIORITY)
GLUON_REGION ?= $(DEFAULT_GLUON_REGION)
%B
%C
GLUON_AUTOUPDATER_ENABLED ?= 1
GLUON_DEPRECATED ?= upgrade
GLUON_LANGS ?= de en
GLUON_PRIORITY ?= 0
GLUON_REGION ?= eu