Commit Graph

305 Commits

Author SHA1 Message Date
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
dman776 8117fcc74f
Lua info gateway (#95)
* api updates: alerts, targettype, api_version

* added filesystem and memory totals

* bugfix: correct error in api ip when there is no gateway
2021-04-23 10:10:40 -05:00
Paul K3PGM 3ddb7a0bb2
feature: runtime-configurable tunnel limits (#84) 2021-04-23 09:46:09 -05:00
Steve AB7PA 6cc379d647
bug: fix nill typo (#88)
* bug: fix nill typo

Fix typo (nill to nil) in pidfile test.

* bug: fix nill typo

Fix typo (nill to nil).
2021-04-06 21:15:50 -05:00
dman776 38b5e01fee
feature: add mesh gateway setting to sysinfo.json (#77) 2021-03-15 09:39:27 -05:00
Eric 2c1bd9ce0e
aredn: enhancement: Nat mode aliases
Aliases in NAT mode allows the node admin to create alias names for hosts on the LAN and then use those for creating port forwarding rules.  The aliases DO NOT effect the rest of the mesh network and are not propagated via OLSR.

NAT Mode aliases are only usable on the local LAN where the IP addresses are known and routable only on the subnet.   Since the NAT hides these IP addresses or the node masquerades, other mesh nodes and devices by definition only know about the node’s hostname.  Thus aliases on the LAN in NAT mode are not propagated by OLSR across the mesh.  You _CANNOT_ use an alias name in a service listing.

You _will_ be able to set an alternate hostname for any host on the nodes' LAN however.
A host named `CBY45-DELLLAPTOP` can also be known as `wxc-shack-laptop`. It may make remembering which host is which a bit easier.

Since OLSR does not propagate the alias,  the "Do Not Propagate" checkbox while in NAT Mode is hidden.
2020-10-07 16:20:59 -07:00
Eric 5948946de6
aredn: visualize non-propagated and aliased hosts (#569)
* enhancement: show the "non propagated" hosts as a grey color in the mesh list on the localnode.
This allows for the node admin to see, at a glance, which of the hosts are "hidden" or not.

* changed colors a little bit for the black background styles.
also assed in the aliases so now they will show up as a different color too.
this only effects the mesh listing on the localnode to where the aliases and/or non propagated hosts are.
the rest of the network does not see this.

* add a tooltip to the aliased/non propagated hostnames to help explain what they mean
2020-09-10 07:39:55 -05:00
Eric e13dd2cb04
aredn: allow aliased hostnames on the mesh
Allows for aliased hostnames on the mesh. One IP/Host can be assigned to multiple hostnames.
This is useful for many things including virtual hosts, virtual machines, virtual email addresses, etc.
The possibilities are actually _endless_.

Fixes #516
2020-09-08 16:39:49 -05:00
Steve Lewis AB7PA ad578d8944 Add file size tests to arednMsg
Add tests for file content to aredn_message.sh
2020-09-02 20:38:12 -05:00
Steve Lewis AB7PA afb18b3a52 Tweak aredn_message display
Tweak the node id on the AREDN message display.
2020-08-30 13:35:37 -05:00
Eric 8810e0eaaf Stop certain hostname/IP's from propagating over the mesh
Allows for the node admin to choose to have DHCP leased hostnames/IP's propagated over the rest of the mesh network or not.
Defaults to allowing the hostname/IP to propagate.

The hostname/IP will *still* be resolvable from the localnode and will show up in the list of hosts on the localnode only.
This allows for selected local mesh devices to be not available over the rest of the mesh network.
ie: switches, routers, cameras, etc.

This will work immediately for *new* DHCP leases when the checkbox is selected.
For *existing* DHCP leases, it may take a while for the network to update, if ever.
To speed up the process of full network OLSR "DNS" updating, reboot all the nearest neighbor device(s) to the node you made these changes to.
That seems to get the changes "out" to the rest of the network faster than normal.

Fixes #508
2020-08-29 09:06:21 -05:00
dman776 8ec57de248
bugfix: correct lower-case translation for hostname (#555) 2020-08-22 09:50:58 -05:00
dman776 5e572ff66a
aredn: add aredn local alerts capability (#552) 2020-08-18 16:17:03 -05:00
Joe Ayers cecca6854d aredn: add Mode ether to tunnel interfaces
This reduces message forwarding by OLSR. Without this mode
olsr will forward a message backout the same interface it
was received on, presumably due to hidden 802.11n nodes.
2020-05-28 23:06:42 -05:00
dman776 c3f94bd0d5
feature: add "aredn alerts" feature in header (#505)
* feature: add "aredn alerts" feature in header

* optimize conditional logic

* additional fixes

* improve presentation display
2020-04-08 21:31:01 -05:00
Joe Ayers d9cbccdb41 bugfix: aredn: Port Forward not working over dtdlink in LAN NAT mode
Tested-by: Timm Schunck <dl4fly@darc.de>
fixes #449
2020-02-23 21:31:00 -06:00
Joe Ayers ae593838bb aredn: upgrade to Openwrt 19.07.0 release
Co-authored-by: Andrew KK4ZUZ <apcameron@softhome.net>

This commit begins the process to migrate from ar71xx to
ath79 target images.
2020-01-29 07:39:05 -08:00
Joe Ayers 3a4d92add2 aredn: switch from active to passive wifi scan
Password protection is no longer necessary with
a passive scan.  results are same or very similiar,
both options do not always show all devices.
2019-08-24 20:48:52 -07:00
Joe Ayers f81c129dae aredn: enable wan wifi client to connect to an open AP 2019-06-20 13:27:51 -07:00
Joe Ayers 9967d0f978 bugfix: wan interface fails to function on UBNT NS XM devices
The WAN network fails to be configured correctly on
UBNT NS XM devices.
2019-06-19 09:48:19 -07:00
Joe Ayers 74ca6f5a17 aredn: add wan wifi client capability 2019-06-17 20:45:02 -07:00
Joe Ayers d8f9320021 aredn: add GL-iNet AR750 definitions 2019-05-26 16:24:39 -07:00
Joe Ayers 239156084f aredn: check less frequently to update Mesh link LED
OLSR has rare symptoms of live lock and stops
updating routing and host information.  Suspect cause is
single threaded implementation with plugins continually
called from mutiple sources.  Prior fixes to ensure
read/write calls are properly written may not have
fully resolved the causes.  This change will reduce calls
to retrieve olsr data.
2019-05-19 02:47:31 -07:00
Joe Ayers fc2235377a aredn: add support for GL-AR300M16 2019-05-17 21:39:38 -07:00
dman776 10f3426e38
feature: add "MESH" led for GL USB150 (#417) 2019-05-14 20:38:41 -05:00
dman776 b0bc20b392
api: add first_boot field to indicate if this node has been configured or not (#416) 2019-05-11 12:08:37 -05:00
Darryl Quinn 6469c58fbf bugfix: fix index error in aredn_info lib [0] not [1] 2019-05-05 17:14:21 -05:00
Joe Ayers f134465edb aredn: add auto distance setting option
contributing author lua code: dman776 <dman776@gmail.com>
2019-05-03 19:17:14 -07:00
ZL2WRW 1a43b07293 Add experimental support for the GL.iNet GL-AR150 (#407)
* Add experimental support for the GL.iNet GL-AR150 - https://openwrt.org/toh/gl.inet/gl-ar150
Mesh networking and tunneling have been confirmed working.
This device has been confirmed capable of operating on channel -1, but /etc/config/wireless has to be manually edited to select this channel.

* www/cgi-bin/perlfunc.pm patched to add UI support for the GL.iNet GL-AR150

* www/cgi-bin/perlfunc.pm patched to add UI support for the GL.iNet GL-AR150 - seems like only 18 dBm TX power is possible

* Remove Experimental comments and designate as stable

* Configure Ethernet ports & VLANs for GL-AR150, and update README.md

* Fix misunderstanding re README.md

* Patch Upstream OpenWRT GL-AR150 LAN & WAN LED mapping, configure WLAN LED as mesh linked indicator.
2019-04-30 20:55:09 -05:00
dman776 c981a1c451
feature: api - added current dhcp leases (#394)
* feature: api - added current dhcp leases

* move dhcp info to secure page

* changed filename
2019-04-30 20:29:17 -05:00
Eric 0300874d99 New sysinfo json changes (#405)
* sysinfo.json additions
lua library additions

Dependent on #389 and #391
Replaces #387

* additional check for nil needed
tested on a node with several very marginal RF links (IP, no host name) and it is working, so far.
also removed the decimal point on the n/lq values, we didn't need 10 places of accuracy. :)

* a couple more small changes

* changed neighborLinkInfo() function in aredn.info to show *all* links, not just RF.
Adds additional info for each RF link (tx/rx_rate, noise, signal)

* Removed redundant function.
Removed functions no longer needed.
Reworked getCurrentNeighbor function to add in the additional RF link info if requested.
2019-04-29 22:43:37 -05:00
Joe Ayers 9665a8aeee bugfix: ubnt lbe-m5 does not identify boardid
fixes #398
2019-04-13 21:45:37 -05:00
Joe Ayers 9470c6b1ad aredn: add definition for Mikrotik LHG 5HPnD 2019-04-02 17:57:04 -07:00
Ryan McLean e0ea513c5e feature: added localhosts info to api (#390)
* mesh endpoint can return localhosts

* mesh endpoint can return localhosts

* added localhosts info to api
2019-03-27 22:21:23 -05:00
dman776 1c81085986
feature: add OLSR current neighbor info to API (#389)
* feature: add OLSR current neighbor info to API

* bugfix: correct quote issue
2019-03-26 01:04:33 -05:00
Joe Ayers a399623140 Revert "aredn: enable ath9k auto distance capability (#367)"
This reverts commit d5be7814b3.
Auto Distance is not ready for a release and will be
reintroduced afterwards. Added logic to reset '0' distance
to 60km so tower nodes will continue to respond after
upgrade if running the experimental auto distance
2019-03-21 21:30:48 -07:00
Joe Ayers 07aa305e29 aredn: olsrd: add olsrd watchdog
Adding native olsrd watchdog on top of procd
ensures mesh nodes are always accessable.

closes #338
2019-01-27 14:12:37 -08:00
Raymond Suelzer 664f2ee629 Some LUA Code Clean Up, API (#327)
* Refactor API

* work in progress

* lua clean up
2019-01-21 15:41:31 -06:00
Joe Ayers 22fe3bdc66 bugfix: olsrd: clean up startup warnings 2018-12-31 15:18:58 -08:00
Joe Ayers 588b59cf65 aredn: Add definitions for Mikrotik RB-911G-5HPnD 2018-12-18 20:40:58 -08:00
Joe Ayers 1c6d2286cc aredn: hap ac lite add 2G/5G lan ap options
Add option for hap ac lite to select which band to
use for LAN AP option, 2GHz or 5GHz.  Also, ensure
all wireless cards are defined when disabled to
prevent default wireless config options.
2018-12-17 20:13:37 -08:00
Joe AE6XE f777e914f9 aredn: Mesh RF enable/disable (#307)
add feature to turn off Mesh RF if not in use.  When off,
section to re-purpose wireless card to LAN bridged Access
Point becomes visable.
Closes #155
2018-12-12 15:16:07 -06:00
Joe Ayers 7486a179c7 aredn: add support for Mikrotik LDF-5nD 2018-12-07 21:36:03 -08:00
Joe AE6XE 123949de9e
aredn: Standardize Ethernet Port vlans for UBNT XM devices (#297)
The secondary port on Ubnt XM devices was non-functional.
Enabled bridge type in network config to utilize both ports.
2018-12-02 17:52:48 -08:00
Joe AE6XE 303c50904c
aredn: harden hAP ac lite 5Ghz Lan Access Point (#293)
enable passwords with virtually any character,  enable SSIDs
with virtually any character.  ensure ap is always
encrypted to give operator control of client access and
license compliance.  Remove (week) WEP encryption option.
2018-11-30 08:32:38 -08:00
Joe AE6XE a62fe95b26
aredn: hAP ac lite enable 5GHz LAN Access Point (#287)
* aredn: hAP ac lite enable 5GHz LAN Access Point

enable ability to bridge LAN physical ports with wireless
LAN Access Point capability. On dual band hAP ac lite,
used in parallel with mesh RF on 2GHz.  Enables future
features on single band devices to turn off mesh RF and
repurposed for mesh LAN Access Point.

closes: #215
2018-11-27 21:37:59 -08:00
Joe Ayers cae6886dca aredn: stop cron prior to starting sysupgrade 2018-11-27 20:38:26 -08:00
Joe Ayers 264c32a61d bugfix: POE passthough fails on NS XM devices
the Nanostation XM devices require setting the gpio
port direction unlike some other devices
2018-11-27 18:26:02 -08:00
dman776 a59fe2524a
bugfix: usb_passthrough script missing execute bit (+x) (#283) 2018-11-26 13:53:10 -06:00
Joe AE6XE 355e34080f aredn: Add definitions for Mikrotik LHG-5HPnD-XL 2018-11-17 10:40:33 -08:00
Joe AE6XE c8e13ae797 aredn: Add definitions for Mikrotik LHG5 2018-11-10 13:53:45 -08:00
dman776 861de150ea
feature: add USB passthrough support to advancedconfig page (#255)
* feature: add POE passthrough support to advancedconfig page

* correct shellcheck warnings
2018-11-06 16:00:26 -06:00
dman776 9a47ff800a
bugfix: correct poe functions in adv cfg (#250)
* bugfix: correct poe functions in adv cfg

cleanup shellcheck errors

* avoid unnecessary shell
2018-10-27 11:37:45 -05:00
dman776 8716fd42be Add PoE passthrough option to advanced config (#243)
* minor changes

* handle null value (change to 0)

* add poe_passthrough script

* change key location

* change key name

* add default info into aredn uci file

* add conditional functions
2018-10-26 19:34:16 -07:00
dman776 4c79a5c755
remove aimer script (#236) 2018-10-23 10:16:47 -05:00
W. Kyle Hamilton a038ce84b6 Typos (#234)
* typo

* typo in code commits

* Capitalization
2018-10-22 17:04:11 -05:00
W. Kyle Hamilton 6f9a8327cb bugfix: Fixed README and comment typos (#220)
* typos

* Update README.md

* Update aimer
2018-10-08 07:44:13 -07:00
Joe AE6XE b432be987f bugfix: aredn: correct test script warnings and errors 2018-09-17 21:42:52 -07:00
Joe AE6XE 3938f33afe aredn: harden cron maintenance scripts
ensure maintenance scripts execute one at
a time and never in duplication
2018-09-13 16:20:18 -07:00
dman776 c2894f8df9
rework sysinfo.json to improve structure (#185)
* rework sysinfo.json to improve structure
re-organize "info" functions into their own lib

* change egrep to grep -E to eliminate shellcheck warning
2018-09-10 13:37:50 -05:00
Joe AE6XE 0bd057ed40 aredn: phase 1 support for Mikrotik rb952Ui-5ac2nD
Add support for the hAP lite model rb952UI-5ac2nD equivilent to
the UBNT AirRouter.  The 5Ghz interface will be configured in a
2nd phase.  This hAP lite model has double the RAM and Flash
of the AR.  the 2Ghz is MIMO (5Ghz is single antenna).
2018-09-03 23:26:56 -07:00
Joe AE6XE 5abeb8f7ac bugfix: aredn slugbug mitigation
with low memory conditions, typically on 32Mb RAM, the
device would become unresponsive in hours to days. The
symptoms only occured when no RF links. iw processes
would hang in Zombie state.  Updates to use iwinfo where
possible and avoid using both iw and iwinfo.  crontab
script is implemented to detect Zombie processes and free
up resources in the reduced chance the symptoms are still
occuring.
2018-08-22 07:23:53 -07:00
Jason 30069e5ade Format code 2018-07-20 20:34:44 -08:00
dman776 da089acb68
bugfix: use new nslookup format (fixes #48) (#74) 2018-07-16 20:54:38 -05:00
Joe AE6XE 287a995089 bugfix: update wscan to nslookup parsing in opewrt 18.06 2018-07-15 16:06:30 -07:00