Commit Graph

469 Commits

Author SHA1 Message Date
Tim Wilkinson 6834271946
Reworked ARP cache (#707) 2023-02-11 13:45:04 -06:00
Tim Wilkinson 571dbf6251
Disable RTS by default in ath10k devices 02/11/2023 (#706) 2023-02-11 13:44:10 -06:00
Tim Wilkinson c70a23f7a8
Improve LQM distance management 02/11/2023 (#705) 2023-02-11 13:43:36 -06:00
Tim Wilkinson 062ffb3521
Normalize the case of the macs and node names (#700) 2023-02-11 13:42:03 -06:00
Brett T. Warden 8f4e05030e
Use luci's urldecode_params to handle query string (#703) 2023-02-10 11:19:09 -06:00
Tim Wilkinson 2ae6a61630
More consistant way to provide interface mac address in overrides (#698) 2023-02-07 21:57:20 -06:00
Tim Wilkinson 863d098554 Filter even earlier 2023-02-03 09:39:28 -10:00
Tim Wilkinson eefcc888dc Filter out non-routable ARP entries which confuse LQM 2023-02-03 09:39:28 -10:00
Tim Wilkinson 33684d22d2
Gather statistics about RF links (#684) 2023-01-29 21:21:58 -06:00
Tim Wilkinson fdb9270617
Improve firmware failure error recovery (#683) 2023-01-29 21:21:03 -06:00
Tim Wilkinson 8817b70b52 Remove firewall counters except for specific ports 2023-01-24 23:16:42 -08:00
Tim Wilkinson 773c69d171
Fix netmask on br-nomesh device (for when RF mesh is disabled) (#670) 2023-01-24 19:17:35 -06:00
Tim Wilkinson 701b2afa3c Refresh LQM's hostname periodically 2023-01-23 11:30:36 -08:00
Tim Wilkinson aa76c06b6a
Ignore non-routable when calculating hidden nodes (#665)
* Exclude neighbor's neighbors which are non-routable.
If a neighbor node's neighbor is non-routable, then no traffic will
flow from it, so it's not hidden

* Use routable flag for exposed node detection
2023-01-20 21:39:54 -06:00
Tim Wilkinson 78b8578a06
Automatically enable RTS when hidden nodes detected (#659) 2023-01-19 13:11:30 -06:00
Tim Wilkinson 45ac6c583f
Generalize node-setup variable expansion (#653)
* Turn variable expansion into a function so we can reuse it

* Fix not including missing include
2023-01-15 21:50:39 -08:00
Tim Wilkinson fdeda7d0cc
New network configuration code (#650)
* Migrate wired network building into node-setup
* Rework network setup
* Fixes for various alt wireless modes
* Commit to new vlan model
2023-01-14 23:07:22 -08:00
Tim Wilkinson 21c3b80e59 An node with a single RF link cant have exposed nodes 2023-01-14 22:54:00 -08:00
Tim Wilkinson b26017c2d1 Rework DTD blocking detection 2023-01-14 21:22:07 -08:00
Tim Wilkinson e0498ca856 Handle missing ip and more general RF/DTD identification 2023-01-13 14:08:36 -08:00
Tim Wilkinson 252b1dc8b7
Exposed node detection (#644) 2023-01-12 19:58:27 -08:00
Tim Wilkinson d2ac62e775 Bug fixes + distance information 2023-01-12 14:54:35 -08:00
Tim Wilkinson 72cc6c8a06
Hidden node detection (and optional mitigation) (#635)
* Enable RTS/CTS when we detect hidden nodes
* Only change rts setting when we need to
* RTS advanced config option
* Include neighbors blocked neighbors (they still transmit)
* Bump default RTS threashold
* Report list of hidden node rather than yes/no
* Canonical hostnames
* When we enable RTS, enable it for all traffic by default
* Show hidden neighbors in display
* Default RTS threshold to -1 (always off)
2023-01-12 10:31:28 -08:00
Tim Wilkinson 8b3551b539 Add a maximum timeout for service checks.
The connec timeout did not include DNS looksup, and if DNS is broken this can hang forever. Add
a maxmimum timeout so this call will eventually terminate regardless.
2023-01-08 17:03:43 -08:00
Tim Wilkinson fb6060cf3a Fix idle tunnel quality check
When a tunnel is idle, binding to the tun* device fails; so remove it.
As we have a direct tunnel route in the routing table (not OLSR table 30)
created by vtun, we will still correctly route the quality testing traffic.
2023-01-07 20:32:42 -08:00
Tim Wilkinson b082f56fee Remove LQM first run code
This was used during the transition to using LQM and is no longer needed.
2023-01-07 07:43:23 -08:00
Tim Wilkinson 9acdc231dd BAD TYPO - stops firmware being upgraded 2023-01-06 20:42:03 -08:00
Tim Wilkinson 5214d35fcd Provide better error feedback when upgrades fail 2023-01-05 19:13:01 -08:00
Tim Wilkinson fce9629249 Switch from wget to curl for better control of timeouts 2023-01-04 22:43:14 -08:00
Tim Wilkinson bea7fb6723
Fix tunnel quality measurement (#617) 2023-01-04 15:16:13 -06:00
Tim Wilkinson bc77ff8b5b
Enable ac neg channels (#615) 2023-01-03 21:25:22 -08:00
Tim Wilkinson 599819c73c
Dont kill hostapd at start of upgrade process. (#604) 2022-12-28 16:00:29 -06:00
Tim Wilkinson aadb372745
Fix DTD identification (#601) 2022-12-28 10:47:34 -06:00
Tim Wilkinson fa898ccb4f
Fix tonumber parsing when value is actually an error value (#580) 2022-12-23 23:01:07 -06:00
Tim Wilkinson 0992c62755
Terminate monitors when nothing to monitor (#577) 2022-12-22 23:35:01 -06:00
Tim Wilkinson 6950479bf1
Update AREDN to OpenWRT 22.3.2 (Major Upgrade) (#574)
* Update to Openwrt 21.02 and add support for the CPE710 v1
Update scripts to change references to ifname to device due to a change in Openwrt naming
reverse-wpad-basic-wolfssl and disable SSL on Curl

NOTE: The compile host must have python3-distutils installed for gpsd to build

* aredn: initial working upgrade to openwrt 21.02.1

* aredn: update 1 to working upgrade to openwrt 21.02.1

* aredn: add cpe710v1 to build config

* Andrew's patches

* Remove duplicates + display perl

* Temp disable wifi extension patch

* ifname/ports support

* Add spectrum patch back in

* Generic function to extra interfaces

* New api to get wifi ifname

* Disables jails

* Style link

* aredn: partial upgrade to openwrt 22.0.3.0

added AC device images and partial migration to 22.0.3.0
firewall upgrade pending

* aredn:  update mesh-release and revert config.mk

* Unused

* NFT firewall rewrite

* Common-isze configs

* Fix network layout for hap2

* Use local packages dev (new firewall rules)

* Add HAP2

* Add pause after network restart to let bridge reinitialize

* Various lua fixes for new lua version

* Tweak config

* Re-fix networking (lost patch change)

* Add new radio names

* Tolerate missing wifi

* Fix hap-lite switch setup

* More devices

* New radio id

* Build Rocket 5AC lite

* Remove need for luci.sys

* Remove need for luci.sys

* Explicitly name wlan interfaces

* Handle different compatibility verisoning

* Update networking for switches

* ipref version bump

* Extra flag for curl

* Better compat_version fix

* Remove wolfssl

* Fix dns server

* Fix device name

* Unused

* Remove things we dont need

* Remove unused packages

* Generic macaddr overrides

* Fix uci commit

* Fix luci.template.parser to avoid luci.http loading the real thing

* Rocket-M build

* Add search-domain dhcp option

* Turn of ipv6

* No IPV6 in dnsmasq

* Override mac addresses if devices all  the same

* Working from master (for now)

* Put back hostap

* Disable old ethmac fixup

* Tweak configs

* Move back to v22.03.2
Leave ipq4019 builds to master

* Need IPV6 to compile nft firewall

* Rocket-M fixes

* Before we start

* WIP

* Working snapshot

* Cleaned patches

* Merged patch

* Single patch to support HAP2

* Fix typo

* Add nanostation-m

* 5/10Mhz patch

* 5+10MHz patch for ath10k-ct driver

* Extend 2Ghz channel check to include -4 to -1

* Add chanbw setup for ath10k (like ath9k)

* Added TP-Link CPE710 v1

* Override firmwares

* Missing patch

* Dropbear config like 3.22.8.0

* Add Ubiquiti Rocket 5AC Lite

* Fix c6

* Update

* Need more scan channels

* Remove IPV6

* Improve mac fixups

* Put back missing nft app

* IPv6 removed so dont have to disable it

* Fix rocket-m flash bug

* Fix nanostation-m

* Nanobridge is tiny

* Fix wifi order for ar750

* Rocket M5 XW support

* New rates

* Fix firewall4 so we don't need IPv6

* Allow channel width to be restricted

* Move channel list into library

* Fix naming

* Mechanism to block specific channels on specific radios

* Refresh buttons

* routerboard-sxt-5nd

* CPE605 v1.0

* Improve rocket m xw

* tpink

* Update patch

* Update to remove disable

* Remove BW restrictions on cpe710

* Restrict to what has been tested

* Remove test BW restrictions

* sxtsq-5-ac

* Update

* Update

* powerbeam-m5-300 support

* Fix

* Fix hap2

* Tidy unused patches

* Remove limit

* Add ubnt_bullet-m-ar7241

* Added ubnt_nanobeam-ac-gen2

* Fix typo

* Tolerate missing dtd ip

* Explicitly gix hap2 mac addresses

* Fix some broken patches

* Hap2 wont work at 5MHz

* Ubiquiti LiteBeam 5AC Gen2

* Fix compat_version for sxt 5ac

* Update patch

* Unused

* Fix lan configuration for some devices

* Rolling average of noise level

* Unused

* Split out the ath10k rssi monitor (its very simple at the moment)

* Ignore .DS_Store

* Reboot if ethernet doesnt come up (but only once!)

* reboot returns - add exit

* Add some logging info

* Fix ]

* Check all possibly ethernet bridges

* Improve mac fixing

* Remove HostAP on small memory devices

* Reduce dropbear footprint

* Add setsid

* Kill hostap when upgrading to save memory

* Different way to detect hostapd unavailable

* New build steps

* Improve manager logging

* Fix name conflict for the two monitors

* Try to improve test mesh name resolve problem

* Migrate tiny to generic (tiny doesnt work properly)

* Typo

* Another attempt to fix macs for Mikrotik

* Protect against missing trackers

* Fix wpad for ipq40xx

* Remove old tunnel check code

* Enable ZRAM swap to aid low memory devices

* ath10k noise can something be out of range - protect against that

* Updated with current devices and status

* Update firmware which has been tested

* Updated with more builds

* More binary/README

* Fix css error

* Start noise at sensible base level

* Unfix the css so it looks how it use to.

* Save as much memory as we can on lowmem nodes

* Hide some options on low memory devices

* Add "eol" to 32MB devices

* Restart network rather than reboot node if it seems to be broken

* Fixes

* Revert network reset

* Fix ar750 networking

* Continue to trim tiny configs

* More devices

* Dump IW output messages

* Fix Rocket 5AC intermittent ethernet issue

* Ethernet fix for PowerBeam 5AC 500

* More tiny size reduction

* More support data

* Fixed POE and USB power features

* Add Ubiquiti NanoBeam AC (gen1)

* NanoStation (not NanoBeam)

* Add mii-tool package

* Device updates

* Bump update time to 5 minutes

* Fix ethernet negotiation for rocker-5ac and nanobeam

* Fix iplookup

* Config changes based on call feedback

* Radio listing fixes

* Update with more untested builds

* Fallback TxMbps extracted from iw station dump

* Fix tunnel detection for low memory nodes

* Remove unused feed packages

* snapshot build

* Update stability info

* Add powerbeam-5ac-500

* Typo

* Add missing 3.22.1.0

* Add MikroTik LHG 5 AC

* Fix permissions

* Fix permissions

* AirGrid's take Bullet builds

* Mikrotik AC3

* Improve supportdata structure a little to make it easier to find things

* Restore WAN VLAN overrides

* Fix vlan regex for hap2 and hap3

* Support old and new style poe controls

* hap-ac3 is version 1.1

* Handle typo in some openwrt config files

* Fix HAP AC3 install

* Update hap ac3 status

* Support user overrides for network ports (non-swconfig devices)

* LHG 5AC support

* Remove -nand

* Remove non-working platform.sh change

* tunnel weight override

* Omit LinkQualityMult when value is 1

* Add mANTBox 19s and 15s

* Support ath79 mikrotik devices which require ath10k in the initramfs

Co-authored-by: apcameron <apcameron@softhome.net>
Co-authored-by: Joe AE6XE <ae6xe@arrl.net>
Co-authored-by: Joe Ayers <joe@arrl.net>
2022-12-22 14:22:49 -06:00
VA2XJM Jean-Michel 74810d01b4
Fix port range not working (#569)
* Fix for port ranges

Fix port range validation.

* Update CONTRIBUTORS

added myself

* Update files/usr/lib/lua/aredn/utils.lua

Reverting to whitespace protection plus escaping hyppen.

Co-authored-by: Tim Wilkinson <tim.wilkinson@me.com>

* Update ports

added %s* infront of the port range input in case a whitespace has been inserted.

Co-authored-by: Tim Wilkinson <tim.wilkinson@me.com>
2022-12-22 10:31:41 -06:00
Tim Wilkinson 41b5040102
Improve xlink integration (#545) 2022-11-14 22:45:58 -06:00
Tim Wilkinson 580bbc79fe
Fix for when dtd distance hasn't been found (#549) 2022-11-14 21:45:08 -06:00
Steve 4e02cd5044
add warnings to 32mb nodes (#521) 2022-10-14 15:32:22 -05:00
Tim Wilkinson 277610bf27
Fix new mac extraction code in LQM was breaking for tunnels (#525) 2022-10-14 15:29:40 -05:00
Tim Wilkinson 93ad1f5ee7
Strip out as many dependncies from Lua Manager as possible to save memory (#522) 2022-10-13 12:07:36 -05:00
Tim Wilkinson 8fb2869881
Force a GC before the lua manager sleeps (#516) 2022-10-08 15:30:39 -05:00
Tim Wilkinson fe2122eae6 Merge vtun and xlink into one meshrouting hotplug script 2022-10-04 22:06:04 -07:00
Tim Wilkinson 64e4c1e3cd Support adding extra network links to OLSR
This is useful for non-AREDN backbone links, etc.
2022-10-04 22:06:04 -07:00
Steve bf105adf84
fix recoverymode script (#512) 2022-09-27 22:03:55 -05:00
Tim Wilkinson c341bba378
Switch to more active wifi reset (#508) 2022-09-20 18:29:03 -05:00
Tim Wilkinson b8fe2578a3
Add more 3XX redirects + 401 authentication (#506)
* Add more 3XX directs

* Allow pages which require user authentication
2022-09-12 16:09:19 -05:00
Tim Wilkinson 5efd0276fe Add a wifi scan trigger for when the nodes detected becomes zero 2022-09-10 12:39:44 -07:00
Tim Wilkinson 238d0fcd70
Stop node's LQM neighbors including itself (#502) 2022-09-09 08:50:39 -05:00
Tim Wilkinson 6ba17b8e5a
Snapshot hostnames after updates so we have a consistent copy to display (#488) 2022-09-06 09:58:18 -05:00
Tim Wilkinson 0cd4fd3edc
If redirect ends at an https link assume it is valid (we cannot check it) (#491) 2022-08-29 10:31:03 -05:00
Tim Wilkinson 9daf640c85 Optionally include static routes (and preserve them across upgrades) 2022-08-28 08:17:35 -07:00
Tim Wilkinson 1824b945c8 Dont validate hostname in NAT mode.
Hostname is always valid for NAT but not in the valid_hosts table.
2022-08-22 08:04:15 -07:00
Tim Wilkinson 46f48a92f2 Remove 172.16.0.0/12 route 2022-08-15 11:16:24 -07:00
Tim Wilkinson e1ddbabb85 Migrate LAN-to-WAN options to advance configuration 2022-08-15 11:16:24 -07:00
Tim Wilkinson d16e9e4f90 If address ping fails, also try an arping in case local device blocks pings 2022-07-26 23:48:24 -07:00
Tim Wilkinson 12e33e3d21 Layer-3 test (both tcp and udp) of non-http services 2022-07-21 15:16:45 -07:00
Tim Wilkinson 6eb4f64d23 Run an hourly check on the services we publish and disable any that
are not reachable
2022-07-21 15:16:45 -07:00
Tim Wilkinson cf8abafd65
iPerf3 as part of the api (#443) 2022-07-20 14:42:05 -05:00
Tim Wilkinson d166393bb8
Ping tool (to complement the iperf3 tool) (#440)
* Ping tool (to complement the iperf3 tool)

* Make ping-tool part of the api (like traceroute)

* Bump api version
2022-07-19 20:27:44 -05:00
dman776 f55cdee1d2
Initial framework api for read/write 07/13/2022 (#359)
* add login page controller

* update copyright

* initial update

* add options method

* add setup_basic controller

* initial pass of rework of setup_basic

* add stubs for setup_optional and setup_advanced

* setup_basic get mesh_rf functions complete

* add additional properties for setup_basic

* add maxpower for setup_basic

* add error checking for controllers

* cleanup

* add /apriprotected to basic auth list

* change to dot notation style
2022-07-13 16:36:53 -05:00
Tim Wilkinson dd590a6102
Handle dtd bridge device (#431) 2022-07-13 16:19:56 -05:00
Tim Wilkinson 7887497cb3 Allow auto-distance to be overridden when LQM cannot determine the
distance to other nodes
2022-06-27 15:29:39 -07:00
Tim Wilkinson 4b37c6a033
Spectral wifi information (#410)
* Add spectral channel information

* Add spectral graph
2022-06-24 16:50:05 -05:00
Tim Wilkinson f8d71b6552 Never block short DtD links regardless of quality.
Ignore invalid mac from arp table when building lookup table.
 This avoids a problem where a mac can be in the table twice,
 once valid and once invalid with an old ip address.
2022-06-22 11:57:29 -07:00
Tim Wilkinson a65e09e2ad Remove #NOPROP from /etc/ethers where it was being incorectly parsed.
The AREDN code now cross references entries in /etc/ethers with those in
/etc/hosts to determine if an IP is #NOPROP.
2022-06-21 08:32:48 -07:00
Tim Wilkinson bdb46624f0 DtD links have to be close by 2022-06-16 20:34:39 -07:00
Tim Wilkinson 6b1ec622aa DtD links have to be close by 2022-06-16 20:34:39 -07:00
Tim Wilkinson 28f25cf951 Allow user to force certain macs to be accepted 2022-06-16 20:34:39 -07:00
Tim Wilkinson fb2ec36bb6 LQM2 2022-06-16 20:34:39 -07:00
Steve AB7PA c4bd018a5c
restrict msg banner to nonprotected pages (#384)
* restrict aredn messages to non-protected pages

* fix typo
2022-06-07 21:30:27 -05:00
Tim Wilkinson b86213a66f
LQM fixes 6 (#379) 2022-05-31 21:54:02 -05:00
Tim Wilkinson ba94a86ce3 Fix empty initial lqm status.
Limit distance between DtD nodes which are considered at the same site.
Some network setups use non-ham networks to connect nodes over DtD links.
These should not be consider the same site, so we limit how far appart DtDed
nodes can be when optimizing.
2022-05-26 23:32:37 -07:00
Tim Wilkinson 2f96f2bc7a Really old sysinfo.json dont have link_info 2022-05-25 21:55:27 -07:00
Tim Wilkinson 53632d322d
LQM fixes 4 (#370)
* Tidy LQM status
Remove TX Estimate which was duplicating information on the mesh page and
confusing folk.
Sort by name to stop the display jumping around.

* Split out ping and tx qualities and use average of both.

* Improve keeping re-discovered nodes in pending

* Remove .local.mesh from hostname (they're there sometimes)

* Identify why poor quality traffic is blocked
2022-05-24 10:35:36 -05:00
Tim Wilkinson 988c7f251b
Turn LQM off when not enabled!! (#369) 2022-05-23 07:44:37 -05:00
Tim Wilkinson b680d2019e
LQM fixes 3 (#366) 2022-05-22 21:06:02 -05:00
Tim Wilkinson 754ced48b0
Inverted test for different port forward (#368) 2022-05-22 21:05:08 -05:00
Tim Wilkinson 1ceb7b2140
LQM fixes 2 (#365) 2022-05-20 21:23:57 -05:00
Tim Wilkinson a8b7f8a216
LQM improvements (#364) 2022-05-20 08:10:01 -05:00
Tim Wilkinson b23ab5ee8a
Link Quality Management (#360)
* Link Quality Management experiment (built in)

* Protect LQM pages

* Omit "empty" mac addresses

* Integrate LQM v0.2
Includes proposed UI if this were built-in.
When LQM is enabled (advanced settings) the usual distance inputs are
replaced with "min snr' and "max distance" inputs which are the major
ones you might tweak, as well as a link to the LQM status page.
Other controls are now available (so protected) in advanced settings.

* Improve LQM updating

* Use running snr averages

* Merge app changes

* AREDN-ize the UI

* Improve status language

* Improved DtD detection

* Improve quality reporting

* Link Quality category

* Enable by default

* Better intergration

* Link => Neighbor

* Formatting

* Make sure initial page is populated without extra fetch

* Handle empty lqm.info

* Update with latest experiment algorithm changes

* Validate LQM settings before applying them

* Algorithm updates

* Improve quality reporting

* %% -> %

* Default max distance now 50 miles

* Get actual noise if radio will provide it

* low_snr => min_snr

* Dont print node description if we dont have one

* Remove properties duplicated from setup page

* Localize max distance. Miles in GB and US, Kilometers everywhere else.

* Ping link quality testing

* UDP 'ping' for quality check

* Change Active Settings title

* Expand ping test

* Improve messaging

* Add a ping penalty for neighbors which cannot be contacted in a timely manner.

* Remove user_blocks config option. No one needs to use this anymore.

* Localize distances on lqm page

* Improve status reporting

* First run emergency node setup.
When a node first runs LQM, if the default settings fail to connect to
a node we will now adjust them so that at least one node is viable.

* Restore blocking of mac addresses

* LQM now off by default
fixed #47
2022-05-18 12:49:00 -05:00
Tim Wilkinson 276d1411f1 Fix updating of dmz mode in /etc/config/aredn 2022-05-12 05:19:56 -07:00
Tim Wilkinson 15c83780a5
Correct the frequency for 3GHz radio (#345) 2022-04-29 13:25:47 -05:00
Tim Wilkinson 7aff95711e
Improve rss_monitor startup (#346) 04/27/2022
And shut down if we hae no wifi to monitor
2022-04-27 10:38:54 -05:00
Tim Wilkinson 0632a63853
Missing year (in one place) when updating snr log (#341) 2022-04-23 20:37:26 -05:00
Tim Wilkinson c83cef5928
Old version - now in mgr/snrlog.lua (#339) 04/22/2022 2022-04-22 07:38:09 -05:00
Tim Wilkinson 1905d1a514 Stop postupgrade from ditching the vlan info 2022-04-19 17:24:46 -07:00
Tim Wilkinson 7b77f111ce Support changing the VLAN tag on WAN 2022-04-19 17:24:46 -07:00
Tim Wilkinson 2e4b51105c Handle nil links from olsrd 2022-04-19 04:34:41 -07:00
Tim Wilkinson ce05aeb727
Make sure services are published even when no dtd or lan connected. (#327) 04/06/2022
If wifi is disabled, we will be using a "fake" device for the meshrf. However, this requires that the
underlying physical device is attached, and this might not be the case on devices with present
multiple ethernets (e.g. eth0 and eth1). Detect this and add an extra Hna4 config to OLSR to allow it to
keep using the wifi_ip even when no physical ethernet is attached.
2022-04-06 15:57:54 -05:00
Tim Wilkinson b26476f5e2
Fix displaying "Previous neighbors" with empty hostnames (#325)
* Dont display previous neighbors with empty hostnames
* Use IP address when name missing
* Fix bug where missing names became ever growing string of whitespace
2022-04-04 22:16:35 -04:00
Tim Wilkinson fc55e44001
Run NTPD daily to sync time against network clock (#319) 2022-03-27 20:13:18 -05:00
Tim Wilkinson a322c4a113
Add periodic tasks in the style of cron hourly, daily and weekly scripts (#317) 2022-03-24 21:52:32 -05:00
Tim Wilkinson e07836215e
Fix wifi channel type (#314) 2022-03-22 06:33:30 -05:00
Tim Wilkinson a716167fa1
Found some pieces that I forgot to remove (#308) 2022-03-19 09:20:28 -05:00
Tim Wilkinson f9b787c604
Dont truncate aliases on upgrade (#301) 2022-03-17 14:26:52 -05:00
Tim Wilkinson ad78e077f0
Improve the firmware upgrade process (#294)
* Improve the firmware upgrade process

The old firmware upgrade process attempted to free up RAM by reusing
the 'upgrade_kill_prep' script which is later used by '/sbin/sysupgrade'.
Unfortuantely this doesn't work as intented. While the script will go about
killing various services, 'procd' just goes and starts them up again using
quite a bit more memory in the process. Instead this script just kills
the various daemons 'no questions asked' and then runs the associated
'/etc/init.d/xxx stop' script to instruct 'procd' not the start them up again.
This gets us to the place the original script was trying to go.

+ A syntax fix in '007' patch (need spaces around the [ .. ])

* Inline the style for the firmware page to avoid sleep before flash

* Minor reliability improvements

* Clear away services even earlier
2022-03-16 21:45:26 -05:00
Tim Wilkinson 7a4ae6d057
Modify the style sheet URL to let the browser cache (#297)
while still supporting switching the style
2022-03-16 21:43:18 -05:00
Tim Wilkinson 09985d3c57
Completely remove perl from the build DUMP_PERL (#291)
* And finally ... remove perl from the images

* Remove two more than came from the Admin merge

* Remove perl from perm packages
2022-03-15 21:23:39 -05:00
Tim Wilkinson 49300073dc
Remove xinetd (which has little to do) (#292)
Switch olsrd dot_draw plugin to directly accept connections and not pass through xinetd.
2022-03-14 19:23:03 -07:00
Tim Wilkinson 7dde68bbb5
Lua page: Admin (#290)
* Fix scripts to fail gracefully if tunnel software not configured.
* Add 'manager.lua' to restart list
* Admin page in Lua (+associated upgrade script)
* Rename bbhn-postupgrade -> aredn_postupgrade
* Add missing 'uploadctlservices' call before package upload
2022-03-13 20:19:04 -07:00
Tim Wilkinson d9c2bb1bee
Fix noprop flag detection (#284) 2022-03-11 16:01:02 -06:00
Tim Wilkinson afda7e35ca
Fix the pattern used to validate services (#280)
* Fix the pattern used to validate services
* Missing % in nslookup pattern
2022-03-10 18:31:40 -08:00
Tim Wilkinson 93e8d0a53d Cron is only running to poll AREDN messages, so kill it.
And move polling into the Lua Manager
2022-03-09 19:18:19 -08:00
Tim Wilkinson a0e7749b1e
Lua stragglers (#274)
* Final bits of perl replaced by lua

* Use iwinfo during first boot (api I was using fails this early)

* Retry getting phy device (it can fail as the node is booting up)
2022-03-08 21:22:07 -06:00
Tim Wilkinson 922a74d574
Lua userpages: Tunnels (#271)
* Lua vpn server and client pages

* Lua vpn server and client pages

* Fix reporting of daemon restart errors

* Lua olsrd-config

* Fix reversed client/server ip assignments

* Fix patterns for finding active tunnels
2022-03-08 21:07:58 -06:00
Tim Wilkinson 9db60550d1 Fix url format for no-link service names 2022-03-07 21:45:44 -08:00
Tim Wilkinson 6e198fa704 Unused line 2022-03-06 19:10:16 -08:00
Tim Wilkinson 108a3e839e Bridge handling on older devices is more complex 2022-03-06 19:10:16 -08:00
Tim Wilkinson 6d321a119f Not adding multiple devices to bridge in older nodes.
Also known as "listen to Joe". While the last chance to
this fixed the 'ifconfig' problem, it incorrectly only added the first
device to the bridge.
2022-03-06 19:10:16 -08:00
Tim Wilkinson 17d76bed07
Fix wifi power offset calculation. (#265) 2022-03-05 21:50:06 -06:00
Tim Wilkinson 6aa7175026
Fix poor dhcp and alias patterns. (#254) 2022-03-03 17:03:38 -06:00
Tim Wilkinson 7d3f97519d Fix txpower enable comparison
== 1 isn't the same as == "1" in Lua
2022-03-02 17:19:14 -08:00
Tim Wilkinson 7b48dc3200 Only one device name per interface name (some devices have 2) 2022-03-02 07:25:23 -08:00
Tim Wilkinson a3f9e98577 Dont stop linkled service which no longer exists 2022-03-01 16:09:01 -08:00
Joe AE6XE 3e78e64bfc
aredn: add missing ar71xx led definitions (#241) 2022-02-28 21:42:43 -06:00
Tim Wilkinson 01dbc757fa
Missing commas in dhcp options (#237) 2022-02-28 13:04:45 -06:00
Tim Wilkinson 4c3cd854a6
Protect against OLSRD returning nil results (#236) 2022-02-27 21:19:04 -06:00
Tim Wilkinson 301112fb37
Fix dmz_mode handling (#235) 2022-02-27 17:57:51 -06:00
Tim Wilkinson 70f81f5269 Check for various service and port files before opening them 2022-02-26 13:24:43 -08:00
Tim Wilkinson 2bd712cb9f
Add the interface guessing code like there is in perl (#228) 2022-02-24 11:07:36 -06:00
Tim Wilkinson 861db07ad6
Move multi ant detection into main run method (#229)
to avoid startup failures.
2022-02-24 11:06:29 -06:00
Tim Wilkinson 2d3e9a86b3 Fix typo when checking for multiple antennas
This check can fail if the rssi manager is started early but the daemon will
be restarted.
2022-02-23 15:40:32 -08:00
Tim Wilkinson 149b698d31
Lua userpages: setup (#220)
* Lua 'setup' page + backend node-setup
Moved old perl verison to .pl

* Make sure perl code continues to use node-setup.pl
2022-02-22 19:25:01 -06:00
Chris 73d27f4d13
Fix sysinfo link (#216) 2022-02-11 14:32:25 -06:00
Tim Wilkinson 1ddedbb1e6
Link led fixes (#212) 2022-01-28 20:19:34 -06:00
Joe AE6XE ce4f694563
aredn: extend 2G band adding ch -3 and ch -4 (#210) 2022-01-21 21:52:26 -06:00
Tim Wilkinson 160af18978 Ignore empty alerts 2022-01-20 18:28:26 -08:00
Tim Wilkinson 610cde651c
Lua userpages (#190)
* Lua Services

* Lua versions of user page (non-admin)

* Support multiple antenna chains

* Improved led detection

* Fix logging

* Add manager.log files to support tool

* Lua versions of user page (non-admin)

* Dont count default route

* Fix board id for older nodes

* Handle missing node.history

* Check /tmp/snrlog exists

* Per discussion, make the Lua pages the defaults and Perl the backups
2022-01-19 07:42:31 -06:00
Tim Wilkinson fa6c2da4fe
Lua Services (#189)
* Lua Services

* Support multiple antenna chains

* Improved led detection

* Fix logging

* Add manager.log files to support tool
2022-01-17 18:54:44 -06:00
Tim Wilkinson ee2791c621
Dmz mode migrate fix (#169)
* Migrate /etc/config/dmz-mode to /etc/dmz-mode

* Migrate dmz_mode into /etc/config/aredn

* Use cmd append

* Changes should be in /etc/config.mesh

* Add commit
2021-11-19 15:48:45 -06:00
dman776 f0c62fc2a7
enhancement: migrate location info to uci (#168)
* add uci migration script

* removed debug lines

* added newline to end

* include gridsquare values

* migrate lat/lon/gridsquare to uci format

* remove from sysupgrade kept files list
2021-11-09 17:03:20 -06:00
Tim Wilkinson 8ea58e4949 Revert failed olsrd fix 2021-11-08 19:40:47 -08:00
Tim Wilkinson ce296c94d4 Make sure wifi is up before letting OLSRD run 2021-11-07 11:09:34 -08:00
dman776 c179ce40b7
Api add tactical name (#139) 2021-09-09 08:32:24 -05:00
Steve AB7PA 8ff4156d37
fix snrlogging issue (#131)
Add default values to snr variables to avoid fatal errors that prevent 
snr.dat and snrlog/files from being written.
2021-07-10 12:40:28 -05:00
Eric 8f1d23e565
aredn: 20MHz wide channel fix for adjust_rate function in utils.lua (#129) 2021-07-10 12:40:01 -05:00
Steve AB7PA a7ab2c6a46
api: revise localhost function (#128)
* api: revise localhost function

Revise getLocalHosts() so it doesn't report unwanted hosts.  
getLocalCnxType() is no longer needed.

* include new iplookup function too

* incorporate Eric r1de values for getCurrentNeighbors

* use alternative for mac2host()

* get actual wlan interface for arp query

* tested on dualband radio

Tested on dualband radios with active clients on both Mesh RF and Wifi 
AP.

* add more error checking

* fix iplookup match

It is possible to have 2-digit "mid" prefixes. Fixes match to account 
for 2 possible digits.

* tighten up code

* add extra info values for Eric r1de
2021-07-10 12:39:25 -05:00
Steve AB7PA 49017f4cbf
add invalid link handling to api (#115) 2021-06-17 14:49:11 -05:00
Steve AB7PA e93987fe06
api: add RF IP for non-RF links (#124)
* api: add RF IP for non-RF links

Add the RF IP address for non-RF linked devices. This allows the 
services to be displayed for non-RF Current Neighbors.

* remove case manipulation
2021-06-17 14:48:19 -05:00
dman776 d595b9cf3d
add traceroute and remotenodes to api (#114) 2021-06-06 07:33:43 -05:00
dman776 79aa11db40
Api use libiwinfo frequency (#112) 2021-05-26 09:57:47 -05:00
Steve AB7PA 10ff6f512f
Fix regex for current neighbor midxx.hostname (#110) 2021-05-22 23:45:00 -05:00
Steve AB7PA 79a57a0021
Add LocalHost Connection Type (#109)
Add a connection type field to info.lua so the api can provide it to the 
newui Local Hosts display.
2021-05-21 11:12:43 -05:00
Steve AB7PA 1c76248765
Remove local.mesh suffix from Local Hosts hostname in newui (#108) 2021-05-20 20:46:29 -05:00
Steve AB7PA 7633d10382
Remove local.mesh suffix from CurrentNeighbor hostname (#106)
* Remove local.mesh suffix from CurrentNeighbor hostname

* Uppercase hostname for consistency

* Make hostname lowercase for consistency with Local Hosts display in newui
2021-05-20 16:56:50 -05:00
Steve AB7PA 780b696398
fix: Local Alert File Read All (#102)
* fix: Local Alert File Read All

Read the entire local_message file rather than just the first line.

* fix: Local Alert File Read All

Also fix the issue with empty alert files showing empty newui alert 
dialogs.
2021-05-11 21:27:05 -05:00
dman776 232d7bf6b2
api enhancement: convert getFreq to use lib-iwinfo (#101) 2021-05-06 00:05:57 -05:00
Steve AB7PA 8ef6e56925
Format Uptime as String (#100)
* Format Uptime as String

Format uptime as a string with values for days, hours, minutes, and 
seconds.

* Format uptime as String

Change code to use the secondsToClock function in utils.lua
2021-05-05 22:20:29 -05:00