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
From 886bd0ad1b4d401452e207966e88630c55e2ebd6 Mon Sep 17 00:00:00 2001
From: Jan-Tarek Butt <tarek@ring0.de>
Date: Fri, 28 Jul 2017 02:41:30 +0200
Subject: [PATCH 3/5] add pkg gluon-geolocator
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
* add check_site.lua
* add config geolocator
* add geolocator.sh
* add cron file
* add upgrade script for intervall
* mv to 540-geolocator-settings
* add 540-geolocator-settings
* add luaminifyer
* change check_site.lua
* rm ffnw spec stuff and add site array to geolocator.sh
* change lua require
* change lua require 'gluon.site_config' to 'gluon.site'
* clean up cron file
- rm unneded semicolon
- remove the sh
* use taps and chang val type in check_site.lua
- set geolocator.autolocation as need_boolean
- replace spaces with taps
* geolocator.sh replace spaces with taps
* geolocator.sh rm unneeded ;
* geolocator.sh use if/fi instead of {}
* upgrade script prepare for new site file
* rm geolocator.sh
* porting from shell to lua code
* rm .sh file ending
* fix line endings and write mode
* set uci getbool fix scan for surrounded wifis
* rm TODO commend after discussion wiht Neoraider
* refactoring and spellcheck
- rm irrelevant else states
- fix print message for time stamp file
* fix intervall in 540-geolocator-settings
- change intervall value from seconds to minutes
* ensure MAC addreses are filert by uppercase matching
---
package/gluon-geolocator/Makefile | 36 ++++++
package/gluon-geolocator/check_site.lua | 5 +
.../gluon-geolocator/files/etc/config/geolocator | 2 +
.../files/usr/lib/micron.d/geolocator | 1 +
.../luasrc/lib/gluon/geolocator/geolocator | 135 +++++++++++++++++++++
.../lib/gluon/upgrade/540-geolocator-settings | 38 ++++++
6 files changed, 217 insertions(+)
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
......@@ -54,67 +20,40 @@ Subject: [PATCH 3/5] add pkg gluon-geolocator
diff --git a/package/gluon-geolocator/Makefile b/package/gluon-geolocator/Makefile
new file mode 100644
index 00000000..3896ae70
index 00000000..54dd3002
--- /dev/null
+++ b/package/gluon-geolocator/Makefile
@@ -0,0 +1,36 @@
@@ -0,0 +1,14 @@
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=gluon-geolocator
+PKG_VERSION:=1
+PKG_RELEASE:=1
+
+PKG_BUILD_DIR := $(BUILD_DIR)/$(PKG_NAME)
+
+include ../gluon.mk
+
+define Package/gluon-geolocator
+ SECTION:=gluon
+ CATEGORY:=Gluon
+ TITLE:=Provide the geolocator to receive positions over wifi
+ DEPENDS:=+gluon-node-info +micrond
+endef
+
+define Build/Prepare
+ mkdir -p $(PKG_BUILD_DIR)
+ DEPENDS:=+gluon-node-info +micrond +lua-bit32
+endef
+
+define Build/Compile
+ $(call GluonSrcDiet,./luasrc,$(PKG_BUILD_DIR)/luadest/)
+endef
+
+define Package/gluon-geolocator/install
+ $(CP) ./files/* $(1)/
+ $(CP) $(PKG_BUILD_DIR)/luadest/* $(1)/
+endef
+
+define Package/gluon-geolocator/postinst
+#!/bin/sh
+$(call GluonCheckSite,check_site.lua)
+endef
+
+$(eval $(call BuildPackage,gluon-geolocator))
+$(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..3fb49cd8
index 00000000..2771d938
--- /dev/null
+++ b/package/gluon-geolocator/check_site.lua
@@ -0,0 +1,5 @@
+if need_table('geolocator', nil, false) then
+ need_boolean('geolocator.autolocation', false)
+ need_number('geolocator.interval', false)
+ need_string_array_match('geolocator.blacklist', '^%w+:%w+:%w+:%w+:%w+:%w+$', false)
+end
@@ -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,4 @@
@@ -0,0 +1,2 @@
+config geolocator 'settings'
+ option static_location '0'
+ option auto_location '1'
+ option refresh_interval '1000'
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
......@@ -124,130 +63,125 @@ index 00000000..7379b730
+*/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..1a08ccf2
index 00000000..3ec5771c
--- /dev/null
+++ b/package/gluon-geolocator/luasrc/lib/gluon/geolocator/geolocator
@@ -0,0 +1,135 @@
@@ -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 ("luci.jsonc")
+require("iwinfo")
+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 PID_PART="/var/run/geolocator.pid"
+local TIME_STAMP="/tmp/geolocator_timestamp"
+
+local function file_exsist(file)
+ return io.open(file, "r") ~= nil
+end
+local lockfile = '/var/lock/geolocator.lock'
+local lockfd, err = fcntl.open(lockfile, bit.bor(fcntl.O_WRONLY, fcntl.O_CREAT), 384) -- mode 0600
+
+if file_exsist(PID_PART) then
+ io.stdout:write("The geolocator is still running.\n")
+ os.exit(0)
+end
+if io.open(PID_PART, "w") == nil then
+ io.stdout:write("Can`t create pid file on " .. PID_PART .. "\n")
+if not lockfd then
+ io.stderr:write(err, '\n')
+ os.exit(1)
+end
+
+-- Program terminating function including removing of PID file
+local function exit(exc)
+ if file_exsist(PID_PART) then
+ os.remove(PID_PART)
+ end
+ os.exit(exc)
+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
+
+local function table_contains(tbl, prefix)
+ for _, entry in ipairs(tbl) do
+ if entry:match(prefix) then
+ return true
+-- 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
+ return false
+end
+
+local function getWifiifnames()
+ local ifnames = {}
+ uci:foreach('wireless', 'wifi-iface',
+ function(s)
+ local ifname = uci:get('wireless', s['.name'], 'ifname')
+ if (ifname ~= nil) then
+ table.insert(ifnames, ifname)
+ end
+ end
+ )
+ return ifnames
+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 Get_geolocation_info()
+
+ -- Get list of BSSID there should ignored
+ local blacklist_bssid = { }
+ for _, bl_bssid in ipairs(uci:get(GLC, "settings", "blacklist")) do
+ -- Ensure rm colons and uppercase
+ table.insert(blacklist_bssid,(string.upper(bl_bssid):gsub(":", "")))
+ end
+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 scaned_bssid = ""
+ local uniq = { }
+ for _, ifname in ipairs(getWifiifnames()) do
+ local api = iwinfo.type(ifname)
+ if api then
+ local iw = iwinfo[api]
+ local scanlist = iw.scanlist(ifname)
+ if not scanlist then
+ return false
+ end
+
+ -- Get list of BSSID without blacklisted and redundancy entrys.
+ for _, net in ipairs(iw.scanlist(ifname) or { }) do
+ -- Ensure rm colons and uppercase
+ net.bssid = string.upper(net.bssid:gsub(":", ""))
+ if not uniq[net.bssid] and not table_contains(blacklist_bssid, net.bssid) then
+ scaned_bssid = scaned_bssid .. "," .. net.bssid
+ uniq[net.bssid] = true
+ 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
+ if #scaned_bssid < 12 then
+ io.stdout:write("No surrounded BSSIDs found.\n")
+ return { }
+ end
+ scaned_bssid = scaned_bssid:gsub("^,(.-),*", "%1")
+ end
+ end
+ -- Request position
+ local req = io.popen("wget -T 15 -q -O - http://openwifi.su/api/v1/bssids/" .. scaned_bssid)
+ if not req then
+ io.stdout:write("connection failed.\n")
+ return { }
+ end
+
+ local jreq, _, err = json.parse(req:read("*a"), 1, nil)
+ req:close()
+ if err or jreq == nil or jreq.lon == nil or jreq.lat == nil then
+ io.stdout:write("openwifi.su doesn't gif a location.\n")
+ return { }
+ 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 jreq
+end -- end Get_geolocation_info()
+ return data
+end
+
+-- Check if interval over or not exist
+if file_exsist(TIME_STAMP) then
+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
+ exit(0)
+ os.exit(0)
+ end
+end
+
+local pos = Get_geolocation_info()
+local pos = locate()
+if not next(pos) then
+ exit(1)
+ 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)
......@@ -259,19 +193,19 @@ index 00000000..1a08ccf2
+if timestap ~= nil then
+ timestap:write(os.time())
+ timestap:close()
+ exit(0)
+ os.exit(0)
+end
+io.stdout:write("Can`t create file on " .. TIME_STAMP .. "\n")
+exit(1)
+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..6f17e8c3
index 00000000..84c9f99c
--- /dev/null
+++ b/package/gluon-geolocator/luasrc/lib/gluon/upgrade/540-geolocator-settings
@@ -0,0 +1,38 @@
@@ -0,0 +1,26 @@
+#!/usr/bin/lua
+
+local site = require 'gluon.site_config'
+local site = require 'gluon.site'
+local uci = require('simple-uci').cursor()
+
+local config = 'geolocator'
......@@ -280,23 +214,12 @@ index 00000000..6f17e8c3
+
+local auto_location = uci:get(config, 'settings', 'auto_location')
+if not auto_location then
+ auto_location = 0
+ if site.geolocator.autolocation then
+ auto_location = tonumber(site.geolocator.autolocation)
+ end
+ auto_location = site.geolocator.autolocation(false)
+end
+
+local refresh_interval = uci:get(config, 'settings', 'refresh_interval')
+if not refresh_interval then
+ refresh_interval = 720 -- default: 12h
+ if site.config_mode.location.interval then
+ refresh_interval = site.geolocator.interval
+ end
+end
+
+local blacklist = {}
+if site.geolocator.blacklist then
+ blacklist = site.geolocator.blacklist
+ refresh_interval = site.geolocator.interval(720) -- default: 12h
+end
+
+uci:delete(config, 'settings')
......@@ -304,9 +227,8 @@ index 00000000..6f17e8c3
+ static_location = static_location,
+ refresh_interval = refresh_interval,
+ auto_location = auto_location,
+ blacklist = blacklist,
+})
+uci:save(config)
--
2.16.1
2.20.1
From 2993f96b2b3eddd0f401a45982ce65b128e71223 Mon Sep 17 00:00:00 2001
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 6/6] ffnw config migration from gluon-node-info to geolocator
Subject: [PATCH 2/4] ffnw config migration from gluon-node-info to geolocator
Signed-off-by: Jan-Tarek Butt <tarek@ring0.de>
---
.../luasrc/lib/gluon/upgrade/900-geloc-conf-migration | 17 +++++++++++++++++
.../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
......@@ -33,5 +33,5 @@ index 00000000..6bfb1059
+ uci:save('geolocator')
+end
--
2.16.2
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
This diff is collapsed.
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 ffho tecff'
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=64ba97cb4238c9cdbda1a8c54989fd72a98ce5f9
PACKAGES_FFNW_COMMIT=44d6aeca186e5ff92e8372f0a7e774d5ca443d3e
PACKAGES_FFHO_REPO=https://git.ffho.net/FreifunkHochstift/ffho-packages.git
PACKAGES_FFHO_BRANCH=v2017.1.x
PACKAGES_FFHO_COMMIT=806f98a8f4bc0896ba29b903a8b9f72c39db2f09
PACKAGES_TECFF_REPO=https://github.com/tecff/gluon-packages.git
PACKAGES_TECFF_BRANCH=v2018.1.x
PACKAGES_TECFF_COMMIT=7964a2884f1b43d994f8d1da931e89c5d36d3890
PACKAGES_COMMUNITY_REPO=https://github.com/freifunk-gluon/community-packages.git
PACKAGES_COMMUNITY_COMMIT=bd78c4cea3fd2e203c0628ded1098c7a92cb3ae4
PACKAGES_COMMUNITY_BRANCH=master
......@@ -2,9 +2,7 @@
hostname_prefix = 'ffnw-',
site_name = 'Freifunk Nordwest',
site_code = 'ffnw',
domain_seed = '7e960cab48068f4b17f865a04c211a27478dc25873d693775034ecf46d90a0cb',
prefix6 = 'fd74:fdaa:9dc4::/64',
default_domain = 'default',
timezone = 'CET-1CEST,M3.5.0,M10.5.0/3', -- Europe/Berlin
......@@ -18,77 +16,62 @@
regdom = 'DE',
radv_filterd = {
threshold = 20,
},
wifi24 = {
channel = 6,
supported_rates = {6000, 9000, 12000, 18000, 24000, 36000, 48000, 54000},
basic_rate = {6000, 9000, 18000, 36000, 54000},
ap = {
ssid = 'testing.nordwest.freifunk.net',
},
mesh = {
id = 't-ffnw-mesh_02:00:0A:12:E0:00',
mcast_rate = 12000,
},
},
wifi5 = {
channel = 44,
ap = {
ssid = 'testing.nordwest.freifunk.net',
},
outdoor_chanlist = '100-140',
mesh = {
id = 't-ffnw-mesh_02:00:0A:12:E0:00',
mcast_rate = 12000,
},
},
dns = {
servers = {'2001:1b60:3:34:7711:1:0:1','2001:67c:1400:2250::1'},
},
next_node = {
name = { 'node.ffnw', 'nextnode', 'nn' },
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 = {
vxlan = false,
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
},
},
mesh_vpn = {
enabled = true,
mtu = 1312,
fastd = {
methods = { 'null','salsa2012+umac' },
configurable = true,
groups = {
backbone = {
limit = 1,
peers = {
default06 = {
key ='22e270ff9b2d1017c3a0b00dd22a58ef7e5915a355eeb16f0b8b52d7eb377869',
remotes = {'"default06.ffnw.de" port 11111'},
},
},
},
},
},
tunneldigger = {
brokers = {'default06.ffnw.de:9000'}
mtu = 1312,
},
-- The bandwidth limit can be enabled by default here.
bandwidth_limit = {
enabled = false,
-- Default upload limit (kbit/s).
egress = 1800,
-- Default download limit (kbit/s).
ingress = 14400,
},
},
mesh_on_wan = false,
mesh_on_lan = false,
poe_passthrough = false,
interfaces = {
lan = {
default_roles = { 'client' },
},
wan = {
default_roles = { 'uplink' },
},
single = {
default_roles = { 'uplink' },
},
},
autoupdater = {
branch = 'stable',
......@@ -98,45 +81,54 @@
mirrors = {
%B
},
good_signatures = 4,
good_signatures = 3,
pubkeys = {
'22c79b193a36269fd7fd51531e762b776e982926c90822df80b56f2be11648d4', --bjo
'99c420e95dd0923ee6277af5c306f9ae6b97f8793b08edd41448925df5fe35b9', --floh1111
'd2b1366a38514e0fac47b119a8a08973ea8020bf9c138908d32b56a5d99f3079', --baranator
'5d95cc2ef3ad17fe3716469e1effde4a49a25d4de9befa4a6eb260e4cda79ab0', --tata
'0e6704ba26c150185514a391658455a612839c35bd83e0faffa81e0be48356e2', --sk
'1f45d9be8a07cc2b6fcc384c71685fc0895a54be0d884aa4637c93ec4f36d970', --stefan6
'36dff98a686a15d7fb129fe98df7977c7d53919aa512b825356bd8d638fca534', --PowerPan
'13f022eb0704007a58a6a68952feaa5a91af4015db46f13bf3eb676a06e926f2', --fkr
'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 = {
%C
%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 = {
%D
%E
},
good_signatures = 1,
pubkeys = {
'f89880c62f6975facbffa582f6a7078a63102477f1770f429f4e6e2a1ac7506f', --runner01.ffnw.de
'f89880c62f6975facbffa582f6a7078a63102477f1770f429f4e6e2a1ac7506f', --runner01.ffnw.de
},
},
},
......@@ -144,40 +136,13 @@
config_mode = {
geo_location = {
map_lon = 52.951947558,
map_lat = 7.844238281,
show_altitude = true,
osm = {
center = {
lat = 53.084126922,
lon = 7.915649414,
},
},
},
},
geolocator = {
autolocation = true,
interval = 1000,
blacklist = {
'02:00:0A:12:E0:00',
'02:00:0A:12:80:00',
'02:00:0A:12:88:00',
'02:00:0A:12:98:00',
'02:00:0A:12:90:00',
'02:00:0A:12:B0:00',
'02:00:0A:12:B8:00',
'02:00:0A:12:A0:00',
'02:00:0A:12:A8:00',
'02:00:0A:12:C0:00',
'02:00:0A:12:C8:00',
'02:00:0A:12:D0:00',
'02:00:0A:12:28:00',
'02:00:0A:12:E8:00',
'02:00:0A:12:20:00',
'02:00:0A:12:38:00',
'02:00:0A:12:30:00',
'02:00:0A:12:48:00',
'02:00:0A:12:40:00',
'02:00:0A:12:50:00',
'02:00:0A:12:58:00',
'02:00:0A:12:60:00',
'02:00:0A:12:18:00',
'02:00:0A:12:68:00',
'02:00:0A:12:D8:00',
},
},
}
GLUON_FEATURES := \
web-wizard \
autoupdater \
web-advanced \
status-page \
mesh-batman-adv-15 \
%A
ebtables-filter-multicast \
ebtables-filter-ra-dhcp \
ebtables-limit-arp \
radvd \
radv-filterd \
web-private-wifi \
geolocator \
web-logging \
hoodselector
GLUON_SITE_PACKAGES := \
-gluon-config-mode-geo-location \
gluon-config-mode-geo-location-with-geloc-map \
-gluon-web-autoupdater \
ffho-web-autoupdater \
haveged \
iwinfo \
tecff-ath9k-broken-wifi-workaround \
ffnw-banner \
ffnw-hoods \
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 \
kmod-usb-net-mcs7830
ifeq ($(GLUON_TARGET),x86-generic)
GLUON_SITE_PACKAGES += \
$(USB_BASIC) \
kmod-usb-ohci-pci \
$(USB_NIC) \
kmod-phy-broadcom
endif
ifeq ($(GLUON_TARGET),x86-64)
GLUON_SITE_PACKAGES += \
$(USB_BASIC) \
$(USB_NIC) \
kmod-phy-broadcom \
kmod-igb
endif
GLUON_ATH10K_MESH := 11s
GLUON_MULTIDOMAIN=1
# Allow overriding from the command line
%B
%C
GLUON_AUTOUPDATER_ENABLED ?= 1
GLUON_DEPRECATED ?= upgrade
GLUON_LANGS ?= de en
GLUON_PRIORITY ?= 0
GLUON_REGION ?= eu
GLUON_LANGS ?= de en