Commit Graph

80 Commits

Author SHA1 Message Date
Maciej Krüger
a8d6a99f5b
gluon-mesh-vpn-wireguard: fix empty string key
Co-Authored-By: Matthias Schiffer <mschiffer@universe-factory.net>
2022-01-14 04:53:28 +01:00
Maciej Krüger
816d2796be
gluon-core: add gluon info binary
This copies the code from web-admin and uses it to create a neat
cli-accessible summary about a node

This could also be extended or possibly have all the data the status
page has

Co-Authored-By: Matthias Schiffer <mschiffer@universe-factory.net>
2022-01-14 04:53:19 +01:00
David Bauer
c52089fcda
treewide: use radio band option to determine frequency band
The 'hwmode' setting has been replaced with 'band' in OpenWrt to add
support for newer bands outside of 2.4G and 5G. Adjust Gluon accordingly.

[Matthias Schiffer: rebased, extended commit message]
2021-12-19 16:43:12 +01:00
Matthias Schiffer
5f1f960753
gluon-core: introduce device_uses_wlan() helper 2021-09-13 17:47:04 +02:00
Matthias Schiffer
7a2cd66cb9
gluon-core: move a few WLAN-specific functions from gluon.platform to gluon.wireless
Avoid requiring gluon.wireless from gluon.platform, and requiring
gluon.platform from various other scripts.
2021-09-13 17:41:15 +02:00
Tom Herbers
5a034be6b3
ath79-generic: add support for TP-Link EAP225-Outdoor v1 2021-08-28 18:52:52 +02:00
citronalco
34fc9544b8
ath79-generic: add support for TP-Link WBS210 v2 (#2299) 2021-08-27 23:15:04 +02:00
micw
a1b961994a
Add support for tp-link CPE510 V2 (#2287)
Co-authored-by: Michael Wyraz <michael.wyraz@evermind.de>
2021-08-12 17:14:38 +02:00
micw
6b699f376c
Add support for tp-link CPE510 V3 (#2283) 2021-08-11 19:15:37 +02:00
David Bauer
14b1224f97
ipq40xx: add support for Aruba AP-365 / InstantOn AP17 (#2290) 2021-08-11 01:14:30 +02:00
David Bauer
f01c62e594
gluon-core: wireless: support PHY lookup for multi-PHY devices (#2267)
The PHY lookup helper "find_phy_by_path" could not lookup the PHY name
for paths from multi-phy devices.

An example for such a path would be:
'1e140000.pcie/pci0000:00/0000:00:01.0/0000:02:00.0+1'

The integer after the plus (+) character determines the PHY index of the
specific device in relation to the PHY with the lowest index of the
device.

For example, if the device provides phy2 and phy3, the above path would
describe phy3. In case the device provides phy0 and phy1, it would
describe phy1.

Rewrite the "find_phy_by_path" function to support those paths as well
as regular device paths in a universal manner.

Signed-off-by: David Bauer <mail@david-bauer.net>
2021-07-17 22:50:02 +02:00
aiyion.prime
e410a9c2e5 gluon-core: implement popen3() in gluon/util.lua
[Matthias Schiffer: simplify close_fds() helper and use in child process]
2021-07-15 17:53:07 +02:00
Matthias Schiffer
09c9b78e30 ramips-rt305x: drop target
VoCores aren't exactly useful mesh nodes except for experimentation.
They certainly aren't worth maintaining a whole target, in particular
one that has a WLAN driver not used by any other target.
2021-07-13 21:37:39 +02:00
David Bauer
ff9f295f7d gluon-core: util: check if file exists prior to reading
The file_contains_line helper function was not testing whether a file
exists or not prior attempting to read from it.

Add this check to circumvent errors on the private WiFi config in
case the hwflags file is missing.

Reported-by: Tom Herbers <freifunk@tomherbers.de>
Tested-by: Tom Herbers <freifunk@tomherbers.de>
Signed-off-by: David Bauer <mail@david-bauer.net>
2021-07-01 03:14:08 +02:00
David Bauer
9fdc57c175 treewide: drop ar71xx platform specific code 2021-06-26 02:17:15 +02:00
David Bauer
a38f2a4cf1 packages: fix missing argument to posix.glob 2021-06-21 16:28:15 +02:00
Sven Eckelmann
17baf0f415 ipq40xx: add support for Plasma Cloud PA1200 2021-01-13 08:28:12 +01:00
David Bauer
db9768310a
Merge pull request #2153 from FreifunkVogtland/pa300
ath79: Add support for Plasma Cloud PA300(E)
2021-01-12 15:22:03 +01:00
Sven Eckelmann
6e2faecb4e ath79: add support for Plasma Cloud PA300E 2021-01-10 09:06:02 +01:00
Sven Eckelmann
a9039229d6 ath79: add support for Plasma Cloud PA300 2021-01-10 09:05:58 +01:00
CodeFetch
50313697c7 packages: introduce syslog function in gluon.util
This commit introduces a simple function for writing to the syslog and
replaces the custom function used by gluon-hoodselector.
2020-12-29 01:33:29 +01:00
Martin Weinelt
b1294472c6
Merge pull request #2065 from freifunk-gluon/early-reconfigure
Domain switch during reboot/gluon-reload
2020-08-22 19:50:55 +02:00
David Bauer
73b830eb32
gluon-web: don't display outdoor mode on preserve_channels (#2074)
This will hide the outdoor mode setting on compatible devices in case
the defined channels should be preserved.

Otherwise a user might be under the impression their device is compliant
with outdoor operation when in reality it still uses prohibited
channels.
2020-07-05 19:05:27 +02:00
Matthias Schiffer
6750aef017 gluon-core: add gluon-switch-domain utility 2020-07-02 22:35:05 +02:00
David Bauer
2611e86438 gluon-core: allow WPA3 features on ramips-mt7620
Backporting the MFP patch allows us to utilize WPA3 features on this
target.

Tested on TP-Link Archer C20i
2020-06-10 22:45:01 +02:00
David Bauer
b1de28bab1 gluon-core: move wireless-related utils to wireless module
Separate wireless-related helper methods from the util module to a
new wireless module. This keeps them separated, as the amount of
wireless helpers increased in the past, justifying a separate module.
2020-05-28 21:46:23 +02:00
Matthias Schiffer
0dd9a3e07c
gluon-core: platform: add 2.4GHz-only outdoor devices 2020-05-10 16:38:41 +02:00
Matthias Schiffer
f4fe58cfd7
gluon-core: ignore is_outdoor_device() value on devices without 5GHz radio 2020-05-10 16:38:41 +02:00
Matthias Schiffer
5ec08d841d
gluon-core: platform: clean up device_supports_mfp()
- Use util.find_phy()
- Stop foreach() as soon as the result is known
2020-05-10 16:38:41 +02:00
Matthias Schiffer
0e681d5c37
gluon-core: util: avoid unintended second return value from gsub()
gsub() returns the number of matches as its second return value. This
was unintendedly passed through by the util functions trim() and
node_id(). It can be presumed that this had no effect in practice, but
it can lead to surprising output when passing values to print() for
debugging.
2020-05-04 23:38:22 +02:00
David Bauer
c5f43add3d gluon-core: add OWE MAC-assignment
Fixes commit 6692095f9d
2020-04-11 15:14:05 +02:00
David Bauer
86b5104790 gluon-core: add WPA3 platorm helper
This adds a helper method, which determines if the current platform
supports WPA3 or not.

WPA3 is supported if
 - the device is not in the featureset category "tiny"
 - the WiFi driver supports 802.11w management frame protection
2020-03-25 02:05:18 +01:00
Matthias Schiffer
59d182fe54
gluon-core: gluon.platform: allow omitting target and subtarget
Allow wildcard matches on all subtargets of a target, or a full wildcard
always returning true when no arguments are passed.
2020-03-12 00:27:05 +01:00
Jan Alexander
5591d3e745 ipq40xx-generic: add support for EnGenius ENS620EXT 2020-03-09 02:15:50 +01:00
Simon Terzenbach
04421f60ac ath79-generic: add support for devolo WiFi pro 1750x 2019-11-26 11:57:31 +01:00
Matthias Schiffer
066158a27b gluon-core: drop IBSS support 2019-11-07 19:48:16 +01:00
Christof Schulze
bd543db86b gluon-core: enhance mac_to_ip() beyond RFC 4291 (#1798)
mac_to_ip() calculates an ipv6 address from a mac address according to
RFC 4291. For wireguard we have to use specially crafted addresses that
must be unique. This allows calculating such unique mac-based addresses
by allowing to optionally specifying the bytes to be inserted into the
address.
2019-08-23 20:42:23 +02:00
Martin Weinelt
cd9f1a0f0c gluon-core: fix and complete list of outdoor board names 2019-06-17 16:27:19 +02:00
bobcanthelpyou
4249d65af7 treewide: fix luacheck warnings 2019-06-16 22:51:53 +02:00
Matthias Schiffer
da45bd5987
treewide: do not use Lua module() 2019-06-16 15:51:43 +02:00
Martin Weinelt
e20d5b0a3e gluon-core: allow presetting the outdoor mode for new installations 2019-04-28 18:19:43 +02:00
David Bauer
c1b9ea2d9c gluon-scheduled-domain-switch: add package (#1555)
This package allows to automatically switch to another domain, either
at a given point in time or after the node was offline long enough.
2019-02-12 11:00:29 +01:00
David Bauer
387a9b4fe4 gluon-core: assert WiFi driver provides 4 MAC-addresses (#1626)
Gluon has multiple ways to obtain unique MAC-addresses. They are either
provided by the WiFi driver or derived from the primary MAC-address.

Quoting the same file:

> It's necessary that the first 45 bits of the MAC address don't
> vary on a single hardware interface, since some chips are using
> a hardware MAC filter. (e.g 'rt305x')

This currently fails in case the rt35xx based chips mac address differs
from the primary MAC. In this case, the MAC address for the client0 radio
(vif 1) comes from the WiFi driver. As there is only a single
MAC-address provided by '/sys/class/ieee80211/phyX/addresses' but the
MAC-address for mesh 0 (vif 2) is derived from the Node-ID, resulting in
different first 45 bits. The WiFi won't come up altogether in this case.

This commit verifies at least 4 MAC-Addresses are provided by the WiFi
driver. If this is not the case, all MAC-addresses are derived from the
primary MAC. This way, affected radios are working correctly.
2019-02-11 21:22:46 +01:00
Christof Schulze
171c293ebe gluon-core, gluon-mesh-babel: move lua functions that generate ll-addresses from a mac into gluon-core 2018-11-21 20:56:35 +01:00
Matthias Schiffer
fd10d7cbb0
gluon-core: replace nixio with luaposix and luabitops 2018-07-17 20:08:15 +02:00
Matthias Schiffer
60a0e78a4a
gluon-core: gluon.util: remove unused function readline() 2018-07-17 20:08:15 +02:00
Matthias Schiffer
f1f2bae94f
gluon-core: remove obsolete gluon.site_config library 2018-07-13 23:16:33 +02:00
Matthias Schiffer
9b937a8c64
gluon-core: remove unused gluon.sysctl Lua module 2018-04-13 14:41:01 +02:00
Matthias Schiffer
9f86bf3155
gluon-core: add default_hostname helper 2018-03-17 11:44:33 +01:00
Matthias Schiffer
83a6847fbd
gluon-web: remove unneeded functions from gluon.web.util
exec() is moved to gluon.util.
2018-02-25 17:13:30 +01:00