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
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
- 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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
umdns by default only interacts with lan, but for us
'wlan' is also a local network.
Approved-by: Sophronia Koilpillai
Approved-by: Milad Mohtashamirad
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
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
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
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.
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.
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.