67 Commits

Author SHA1 Message Date
Morse Micro
58d752b07c treewide: Morse Micro package release update 1.14.1
Including patch removal and some generaly tidy of package Makefiles
2025-03-04 03:56:35 +11:00
James Haggerty
2183bbaf7a morse-dppd: (APP-3695, PR #917) fix dppd socket for 1.13
The dppd 1.13 release removed the socket auto-finding ability.
For now, let's just put a similar thing in.

Note that this remains broken if you have more than one hostapd_s1g
running (i.e. have more than one morse device attached), as it
was before.

Approved-by: Lyall Beveridge
Approved-by: Milad Mohtashamirad
2025-03-03 21:32:29 +11:00
James Haggerty
2cfb0961cc dpp-key-recovery: (APP-3630, PR #895) remove dpp key check/regenerate logic
I messed this up in a last minute refactor, as it was pointing
at the 'tmp file' which was no longer generated. This was _really bad_,
because it wiped out the stored DPP key.

I think it's best just to remove this logic. Reasoning:

  - messing with persistent storage is dangerous (see bug above)
  - in the normal course of events, we don't expect this to be wrong
    (and if it is wrong, regenerating may not be what you want as
    it will be inconsistent with the printed QRCode)
  - it's the responsibility of dppd to validate whether the provided
    key is sane (we might think it's right here and dppd might still
    complain!)
  - less code = good


Approved-by: Sophronia Koilpillai
Approved-by: Evan Benn
Approved-by: Milad Mohtashamirad
2025-03-03 21:25:54 +11:00
James Haggerty
5f4347ee5b netifd-morse/dpp-key-recovery: (APP-3496, PR #879) clean up DPP qrcode paths
- only attempt to generate qrcode if dpp_key.pem exists
  - reduce number of code paths:
    - only generate private key in dpp-key-recovery
    - only generate qrcode when morse interface is brought up
      and we definitely have a MAC address (this lets us remove a bunch
      of mac address fallback code which is not useful)
  - some refactoring/simplification to reduce amount of code

This means that this script doesn't change this key later in
the bringup, and the logic is simpler.

It also means we don't _regenerate_ if we've failed
to put it in persistent storage (i.e. the persistent
storage write failed).

Approved-by: Evan Benn
Approved-by: Milad Mohtashamirad
2025-03-03 21:25:48 +11:00
James Haggerty
e09effcfbd luci-app-morseconfig: (APP-3764, PR #999) switch default halow ip from 192.168.1.1
This is too likely to clash with other devices. Try 192.168.12.1 for now.


Approved-by: Sophronia Koilpillai
Approved-by: Evan Benn
Approved-by: Lyall Beveridge
2025-03-02 22:42:44 +11:00
James Haggerty
8b452e8825 wizard-config: (APP-3749, PR #970) Fix wizard-config powersave typo
Sometimes testing/copy-pasting is hard.


Approved-by: Sophronia Koilpillai
Approved-by: Lyall Beveridge
2025-03-02 22:42:44 +11:00
Sophronia Koilpillai
11614d3bd1 mesh11sd: (APP-3714, PR #959) Remove mesh interface naming from front end and mesh11sd
Approved-by: James Haggerty
Approved-by: Milad Mohtashamirad
2025-03-02 22:42:43 +11:00
James Haggerty
0feadd39e9 *: (APP-3732, PR #953) use Wi-Fi instead of WiFi
Approved-by: Lyall Beveridge
Approved-by: Evan Benn
2025-03-02 22:42:43 +11:00
Lyall Beveridge
18037fe887 luci-app-morseconfig: (APP-3704, PR #932) add ahwlan to umdns config
Approved-by: Evan Benn
Approved-by: James Haggerty
2025-03-02 22:42:43 +11:00
James Haggerty
b30876a751 wizard-config/morse-modeswitch-button: (APP-3710, PR #926) disable powersave on Artini STAs
Since power is not a concern for Artini (since they're intended as network
extenders, not lower power clients), let's avoid the latency
hit caused by powersave in the default config.


Approved-by: Sophronia Koilpillai
Approved-by: Evan Benn
2025-03-02 22:42:43 +11:00
James Haggerty
5ee0812fe6 wizard-config: (APP-3689) iterate over all server addresses with wizard-config on failure
We were just trying the first address found (or if it was a DHCP client,
preferring the gateway address).

This mostly seemed to work, but it's quite dangerous: umdns advertises _all_ the
available IPs, so it will cheerfully advertise IPs that are not on the
subnet you're connected to. e.g.

	"_wizard-config._tcp": {
		"halowlink1-1a27": {
			"iface": "br-lan",
			"host": "halowlink1-1a27.local",
			"port": 80,
			"txt": [
				"path_v1=/wizard-config.json"
			],
			"ipv4": [
				"192.168.12.1",
				"10.22.121.111",
				"10.11.0.131"
			],
			"ipv6": [
				"fd3c:afb7:5bac::1",
				"fe80::9683:c4ff:fe57:1a28",
				"fe80::9683:c4ff:fe57:1a27"
			]
		}
	}

This is a AP only (no router) situation, but it advertises all of the
management IP, the static IP, and the DHCP client IP.

While I was here, I removed the untested IPv6 support, since it didn't
see to be working for me anyway and I didn't want it to slow down
the logic now we iterate throu…

Approved-by: Lyall Beveridge
Approved-by: Evan Benn
2025-03-02 22:42:43 +11:00
James Haggerty
c64c8b7db5 morse-leds -> morse-led-pwm/morse-led-rgb: (APP-3332, PR #891) split artini/ekh03 LED handling
Although the colours are mostly the same, the method of interaction
is different enough that the simplest thing to do is create
a new package.

* morse-led-pwm-multicolor -> morse-led-artini: (APP-3332) split artini/ekh03 LED handling

Rename morse-led-pwm to morse-led-artini, since it does some
artini specific setup.

Approved-by: Sophronia Koilpillai
Approved-by: Arien Judge
Approved-by: Evan Benn
2025-03-02 22:42:43 +11:00
James Haggerty
9b2a6150b3 morse-button: (APP-3332, PR #892) make button use diag.sh for LEDs
Now that we have the ability to override the base status LED behaviour,
it's cleaner to use this for all LED interactions.

While we're here, copy the behaviour on morse-modeswitch-button
of setting the state on the timeout to help indicate you can
release the button.


Approved-by: Arien Judge
Approved-by: Evan Benn
2025-03-02 22:42:43 +11:00
James Haggerty
b828bedc50 memtester: (APP-3632, PR #896) add memtester package
I've used this a couple of time for Artini, and thought it
may as well sit in morse_feed if we need it. I'm not planning
to put it into any of the board configs.


Approved-by: Sophronia Koilpillai
Approved-by: Arien Judge
Approved-by: Evan Benn
2025-03-02 22:42:43 +11:00
James Haggerty
a045c755a2 morse-boot-prints: (APP-3628, #893) increase boot print delay
This allows more time for slow devices (like EKH03s) to finish
their network setup before we print out the status message,
which means the status message is more likely to be the last
message (easier to see) and we're more likely to have
discovered any addresses.


Approved-by: Sophronia Koilpillai
Approved-by: Arien Judge
Approved-by: Evan Benn
2025-03-02 22:42:43 +11:00
Evan Benn
1a32e32b7a mt76-e2p: APP-3594: (PR #883) Add a tool to rw mt76 factory partition
The `iwpriv ra0 e2p` printed the factory partition data (the eeprom in
mt76 driver language). Create a tool that prints and edits that partition in the same way, for the inspection of the calibration data.

Approved-by: James Haggerty
Approved-by: Sophronia Koilpillai
2025-03-02 22:42:43 +11:00
James Haggerty
33f4f47616 hostapd_s1g/wpa_supplicant_s1g: (APP-3382, PR #811) fix options selection
When an option like CONFIG_EAP was enabled, it was actually selecting
CONFIG_EAP*

This was a problem with CTRL_IFACE, because it ended up selecting
CTRL_IFACE_DBUS_NEW.

The 'good' news is we already have a half decent mechanism
(EDITS) for doing complex multiple changes, so let's remove this footgun.

I've selected things that probably don't make sense to ensure
that the _only_ thing we change here is CTRL_IFACE_DBUS_NEW:

; diff /tmp/hostapd_before /tmp/hostapd_after
; diff /tmp/wpa_supplicant_before /tmp/wpa_supplicant_after
383c383
< CONFIG_CTRL_IFACE_DBUS_NEW=y
---
> #CONFIG_CTRL_IFACE_DBUS_NEW=y


Approved-by: Sophronia Koilpillai
Approved-by: Evan Benn
2025-03-02 22:37:31 +11:00
James Haggerty
0f1d8be588 wpa_supplicant_s1g: (APP-3372, PR #800) make wpa_supplicant dbus optional
The intent here is to make it optional in the Makefile.

If we want to have it always on for ekh01, I'm fine with this, and we
can set it always enabled in the board config (and indeed matter
could have this as a dependency). However, I would prefer NOT to ship
this on Artini; it also blows out our 16mb image.


Approved-by: Sophronia Koilpillai
Approved-by: Evan Benn
2025-03-02 22:37:31 +11:00
James Haggerty
fb738aa690 hostapd_s1g/wpa_supplicant_s1g: (APP-3347, PR #802) fix dpp channel patch typo
I did this exact sequence of stupid last time.

What happened is that I pulled the patch off the top of my hostapd
tree forgetting that I'd had to amend it last time, so duplicated
this error.

Then I initially didn't _see_ the error because when
hostapd_s1g is compiled it doesn't compile any of the wpa_supplicant
stuff, so we only saw it when I actually put the other patch in.


Approved-by: Sophronia Koilpillai
Approved-by: Evan Benn
2025-03-02 22:37:31 +11:00
James Haggerty
0de1362ec4 wpa_supplicant_s1g: (APP-3347, PR #792) fix dpp channels for wpa_supplicant
We really should build both these packages from the same source.


Approved-by: Sophronia Koilpillai
Approved-by: Evan Benn
2025-03-02 22:37:31 +11:00
James Haggerty
80b60561a8 hostapd_s1g: (APP-3347, PR #778) disable channels 1/2 for dpp chirp
This is supposedly not properly supported by MM6108, and recent US BCFs
have them disabled which causes issues.


Approved-by: Sophronia Koilpillai
Approved-by: Arien Judge
Approved-by: Evan Benn
2025-03-02 22:37:31 +11:00
Sophronia Koilpillai
ed06f02ce8 morse-mgmt-iface:(APP-3518, PR #867) Type check the return codes to only fail on false and not on empty string output
Approved-by: James Haggerty
Approved-by: Evan Benn
2025-03-02 22:37:31 +11:00
James Haggerty
0d9791cb5d morse-boot-prints: (APP-3503, PR #857) switch to using ip instead of ifconfig
ifconfig can't show all IPs, which is bad when we assign a management
IP.

cf:

br-lan    Link encap:Ethernet  HWaddr 94:83:C4:55:F4:A2
          inet addr:192.168.12.10  Bcast:192.168.12.255  Mask:255.255.255.0

vs

br-lan: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000
    link/ether 94:83:c4:55:f4:a2 brd ff:ff:ff:ff:ff:ff
    inet 192.168.12.10/24 brd 192.168.12.255 scope global br-lan
    inet 192.168.200.1/24 scope global br-lan


Approved-by: Sophronia Koilpillai
Approved-by: Evan Benn
2025-03-02 22:37:31 +11:00
James Haggerty
f865245e5c wizard-config: (APP-3457, PR #861) don't log exception in this reasonably normal situation
If we're connecting to a normal device (i.e. not Artini) then
the wizard-config service won't be running. Since this is not
really an exceptional situation, don't spew stacktraces
(that end up in syslog).


Approved-by: Sophronia Koilpillai
Approved-by: Evan Benn
2025-03-02 22:37:31 +11:00
Sophronia Koilpillai
25a52fdcfc morse-mgmt-iface:(APP-3438, PR #852) Migrate the mgmt-alias-iface setup to ucode and handle edge cases
Approved-by: James Haggerty
Approved-by: Evan Benn
2025-03-02 22:37:31 +11:00
James Haggerty
839b2c0b03 wpa_event_listener: (APP-3072, PR #849) if hostapd/wpa_supplicant restarts, clear LED
If hostapd/wpa_supplicant restarts, then wpa_event_listener
quits and any timeout is lost. But it doesn't call the action
script, which means the LED is stuck flashing with the wrong colour.

The easy fix here is to call it finished on termination.
This works fine for hostapd (since hostapd will clear the
cached keys, so it's a proper termination and it's fine
to initiate a dpp push button again), but for wpa_supplicant
it's not great since this will let the user start another
DPP session and potentially clash on the hostapd side.
However, I think this is an edge case, and would prefer
to keep the logic simple and make sure wpa_event_listener
properly cleans up when it exits.


Approved-by: Sophronia Koilpillai
Approved-by: Evan Benn
2025-03-02 22:37:31 +11:00
Sophronia Koilpillai
269e9cd3e0 morse-mgmt-iface: (APP-2012, PR #843) Fix spaces in Makefile
Approved-by: Evan Benn
Approved-by: Milad Mohtashamirad
2025-03-02 22:37:31 +11:00
Sophronia Koilpillai
34c827d965 (APP-2012, PR 836) Create a management alias interface
Approved-by: James Haggerty
Approved-by: Evan Benn
2025-03-02 22:37:31 +11:00
James Haggerty
d6e1663203 wpa_event_listener: (APP-3074, PR #826) explain why not catching DPP failures
Approved-by: Sophronia Koilpillai
Approved-by: Evan Benn
2025-03-02 22:37:31 +11:00
James Haggerty
90910e8c2e morse-mode: (APP-3395, PR #819) correctly preference STA in mode
When we have multiple modes, we preference STA/MESH so
we can better identify Extender and Mesh states.
Or at least that was the intent...


Approved-by: Sophronia Koilpillai
Approved-by: Evan Benn
2025-03-02 22:37:31 +11:00
James Haggerty
c1b898cdb0 morse-mode: (APP-3379, PR #810) make matter mode query work properly
The matter PR didn't load the matter config, so this would
always fail.


Approved-by: Sophronia Koilpillai
Approved-by: Evan Benn
2025-03-02 22:37:31 +11:00
Sophronia Koilpillai
305f07f55a utils-wpa_event_listener: (APP-3373, PR #801) Make LED blink until DPP timeout and block DPP button until timeout (120s) to avoid issues
Approved-by: James Haggerty
Approved-by: Evan Benn
2025-03-02 22:37:31 +11:00
Sophronia Koilpillai
60f1883f04 morse-modeswitch-button: (APP-3373, PR #803) Increase the DPP button hold time to 2 sec
Approved-by: James Haggerty
Approved-by: Evan Benn
2025-03-02 22:37:31 +11:00
James Haggerty
7ee5d650de luci-app-morseapwizard/morse-mode: (APP-3341, PR #789) show reset instructions on ap wizard page if in extender mode
If in extender mode, the wizard page didn't make much sense. Encourage users to reset their device instead.

Approved-by: Sophronia Koilpillai
Approved-by: Evan Benn
2025-03-02 22:37:31 +11:00
Kshitij Jain
a254b69485 Merged in SW-12275-add-support-for-releasing-matter-with-openwrt (pull request #731)
SW-12275 add support for releasing matter with openwrt

* luci translation

* fix linter issues

* dbus dependency for wpa_supplicant_s1g

* Merge branch 'main' into SW-12275-add-support-for-releasing-matter-with-openwrt

* review feedback. Update matter qrcode logic. cosmetic changes.

* update pot and po files

* bad globals pipeline err

* pipeline fix

* pipeline fix

* Merge branch 'SW-12275-add-support-for-releasing-matter-with-openwrt' of bitbucket.org:morsemicro/morse_feed into SW-12275-add-support-for-releasing-matter-with-openwrt

* shift luci-app-matter to matter-feed repo

* remove code from sta.js and morseconf.js

* remove new line

* add hasMatter to config.js

* Merged main into SW-12275-add-support-for-releasing-matter-with-openwrt

* add morse-config-diagram matter

* update pot file got luci-mod-home

* keep linter happy

* add uci load to index.js

* Merge branch 'main' into SW-12275-add-support-for-releasing-matter-with-openwrt

* update home.pot

* update ekhwizard pot file

* update morseconf pot file

* Merge branch 'main' into SW-12275-add-support-for-releasing-matter-with-openwrt

* remove boot_prints.sh and debug log

Approved-by: Simon Morris
Approved-by: Arien Judge
Approved-by: James Haggerty
2025-03-02 22:37:31 +11:00
James Haggerty
3d0bde9b0d boot-prints/morse-boot-prints/morse-mode: (APP-2042, PR #774) separate out mode logic from boot prints
Also align modes with planned Artini modes, and
generate/normalise banners.

This will allow us (in subsequent PRs) to discover the mode via ubus.

Approved-by: Sophronia Koilpillai
Approved-by: Arien Judge
Approved-by: Evan Benn
2025-03-02 21:07:41 +11:00
James Haggerty
4fc42100e4 wizard-config: (APP-3330, PR #769) advertise on wlan
umdns by default only interacts with lan, but for us
'wlan' is also a local network.


Approved-by: Sophronia Koilpillai
Approved-by: Milad Mohtashamirad
2025-03-02 21:07:41 +11:00
James Haggerty
8546160928 wizard-config: (APP-3331, PR #770) wizard-config path-v1
Approved-by: Sophronia Koilpillai
Approved-by: Milad Mohtashamirad
2025-03-02 21:07:41 +11:00
James Haggerty
cccf9b1c03 morse-leds: (APP-3333, PR #771) fix artini OpenWrt env partition size
This should align with what we have in the 'normal' setup,
which changed.


Approved-by: Sophronia Koilpillai
Approved-by: Milad Mohtashamirad
2025-03-02 21:07:41 +11:00
James Haggerty
557fc3de18 morse-leds: (APP-3334, PR #772) workaround status LED bug
So we can ship a nice 2.6.7, let's solve this the stupid
way.


Approved-by: Sophronia Koilpillai
Approved-by: Milad Mohtashamirad
2025-03-02 21:07:41 +11:00
James Haggerty
33769b0e13 wizard-config: (APP-3299, PR #751) auto-configure client device
This is like a cut-rate DPP: requires TCP/IP connection, and
no security on the link.

Most of the client/server side is run via a ucode script (wizard-config).
Refer to HELP at the top of this for more info about what is going
on here.

This is to get around the problem of wizards on bridged station devices
which we either don't have access to _or_ the problem of wizards which
change IPs under you.

Client config will only happen on first boot after a reset.

Approved-by: Sophronia Koilpillai
Approved-by: Evan Benn
2025-03-02 21:07:41 +11:00
Evan Benn
eec5432f7c persistent-vars-storage: (PR #752): Add READ -a flag to read all vars
Define all the known vars and a flag that prints them all. This is only
useful for developers who forget the names of vars.

Missing vars are printed like `mm_mode=`, so there is no way to
distinguish empty and missing vars.  Non printable characters are not
escaped, nor are newlines or = signs.  This is only useful for
developers.

This works on EKH01, although it is not very useful. It spews a lot of
text to stderr.

Approved-by: James Haggerty
Approved-by: Sophronia Koilpillai
2025-03-02 21:07:41 +11:00
Evan Benn
4d44171796 morse-leds: APP-3302: (PR #749): Move DPP blink from status to halow LED
Also disable the network leds in reboot and failsafe modes.

Approved-by: James Haggerty
Approved-by: Sophronia Koilpillai
2025-03-02 21:07:41 +11:00
Evan Benn
b392dfc815 morse-leds: APP-3302: (PR #750): Update script to use PWM status LED
The status LED (LED 1) is now a PWM RGB LED. Update the script to
explicitly control the colors of the LEDs. Decrease the intensity of the
blue LED a little.

Approved-by: James Haggerty
Approved-by: Sophronia Koilpillai
2025-03-02 21:07:41 +11:00
Morse Micro
795d6724dd morse-modeswitch-button: add Morse Micro modeswitch button package
This package adds Artini button functionality to OpenWrt.
The Artini button is used for dpp push button, factory reset, and
on longer presses, includes a mode change with that factory reset.

If pressed and release quickly, dpp starts.
If pressed and held until the system LED flashes slowly, move to
AP mode and factory reset.
If pressed and held until the system LED flashes quickly, move to
station mode and factory reset.
2025-03-02 17:24:57 +11:00
Morse Micro
ef3c38a4a1 persistent-vars-storage-ubootenv: handle artini persistent config
Artini stores some configuration values at production time in the
factory partition. When these values aren't found in the uboot-env
partition, we fall back to read the factory partition.
2025-03-02 17:24:36 +11:00
Morse Micro
4f5896414c morse-leds: add Artini LED support
Artini has additional LEDs and utilises full RGB on the system LED
to indicate different device states. Add handling to read the device
mode from persistent storage and indicate the correct LED colour
accordingly.
2025-03-02 17:24:07 +11:00
Morse Micro
0a2fa56251 virtual-wire: add virtual wire package
The Morse Micro virtual wire package allows for configuration of the
device into a virtual wire mode at boot time.
2025-03-02 16:34:29 +11:00
Morse Micro
b25d35f18b dpp-key-recovery: add package to load dpp keys from persistent storage
This package loads the dpp keys from storage and generates qr code on boot
2025-03-02 16:34:29 +11:00
Milad Mohtashamirad
b3f381e42c packages : (APP-1674) add dppd-creds-dummy package. 2025-03-02 16:34:29 +11:00