feat(wifi): drive commissioning from device_caps.json - #665
Merged
Conversation
Single gate on 'wifi'; universal udev/BindsTo adapter gating on wpa_supplicant with commissioning riding along; runtime --disable-ble via ExecStartPre + env file. Signed-off-by: Jan Zachmann 50990105+JanZachmann@users.noreply.github.com
Add task-by-task plan; sync spec BT-handling section to the corrected ExecStart-override drop-in mechanism. Signed-off-by: Jan Zachmann 50990105+JanZachmann@users.noreply.github.com
Remove the separate 'wifi-commissioning' feature; 'wifi' is now the single install gate. Delete the opt-in KAS example. Signed-off-by: Jan Zachmann <50990105+JanZachmann@users.noreply.github.com>
Replace static enablement with a wlan* udev rule and BindsTo on the net device, so wpa_supplicant starts only when an adapter is present (incl. hot-plug) and stops when it is removed. Pull the commissioning service in via Wants= (single gate, option A). Signed-off-by: Jan Zachmann <50990105+JanZachmann@users.noreply.github.com>
Ship a drop-in that overrides ExecStart to probe for a BT adapter at start and add --disable-ble when none is present (operator override via WIFI_COMMISSIONING_EXTRA_ARGS). Remove static target.wants symlinks; the service is now pulled by wpa_supplicant and adapter-gated by udev. Signed-off-by: Jan Zachmann <50990105+JanZachmann@users.noreply.github.com>
Signed-off-by: Jan Zachmann <50990105+JanZachmann@users.noreply.github.com>
The runtime probe keys on /sys/class/bluetooth/hci* only, which a kernel can expose without bluez installed. On a bluetooth-off build BLE can never work, so append Environment=WIFI_COMMISSIONING_EXTRA_ARGS=--disable-ble to the drop-in, overriding the runtime probe. Signed-off-by: Jan Zachmann 50990105+JanZachmann@users.noreply.github.com
IMAGE_POSTPROCESS_COMMAND is split on ';'. With buildhistory enabled, the preceding buildhistory_get_imageinfo entry has no trailing separator, so the un-prefixed :append glued them into 'buildhistory_get_imageinfocheck_deploy_keys' (a non-existent function). check_deploy_keys was skipped and sign then failed with 'Unable to sign' on genericx86-64 (efi-secure-boot). Add a leading ';'. Signed-off-by: Jan Zachmann 50990105+JanZachmann@users.noreply.github.com
Fix comment rot/inaccuracy flagged in PR review: - wpa_supplicant@.service: BindsTo owns teardown; start-on-appearance comes from 80-wlan-wpa.rules, not BindsTo. Drop the spec-only '(option A)' reference. - 10-omnect-runtime.conf: note the operator override is pinned to --disable-ble on bluetooth-absent builds, and add a reminder to re-check the ExecStart override against upstream on a SRCREV bump. Comments only; no behavior change. Signed-off-by: Jan Zachmann 50990105+JanZachmann@users.noreply.github.com Signed-off-by: Jan Zachmann <50990105+JanZachmann@users.noreply.github.com>
Maintainer reference (Approach A): one device-independent topic doc (doc/wifi_commissioning.md) with a mermaid diagram + exists-vs-runs principle; per-device docs carry the capability row + a link; WELOTEC (Arrakis) adapted for Mk4 (wifi+BT) vs Pico (neither); README link. Signed-off-by: Jan Zachmann 50990105+JanZachmann@users.noreply.github.com
Signed-off-by: Jan Zachmann 50990105+JanZachmann@users.noreply.github.com
Device-independent maintainer doc: feature->package install chains, udev+BindsTo runtime start gate, runtime vs build-time --disable-ble, the exists-vs-runs principle, a mermaid flow, and a where-to-change map. Signed-off-by: Jan Zachmann <50990105+JanZachmann@users.noreply.github.com>
Per-device capability rows now link the new reference. Welotec/Arrakis reflects its variants (Mk4 wifi+BT vs Pico none). README Features entry added. Signed-off-by: Jan Zachmann <50990105+JanZachmann@users.noreply.github.com>
Start comes from the udev rule; BindsTo only handles stop on adapter removal. Note the per-wlan* fan-out and that --disable-ble is forced (override suppressed) on builds without the bluetooth feature. Signed-off-by: Jan Zachmann 50990105+JanZachmann@users.noreply.github.com
Rename recipe 0.1.0 -> 0.2.0 and regenerate via cargo-bitbake for the wifi-commissioning-service 0.2.0 change (/api/v1/service-info), the dependency refresh (sha3 0.10 -> 0.12 major, plus compatible bumps to actix-web, clap, tokio, uuid, and transitive crates), and the PR review cleanup. Crate list and checksums updated accordingly. SRC_URI/SRCREV point at the janzachmann fork, branch feat/service-info-endpoint (commit 955231e), so the recipe builds the real 0.2.0 code before PR omnect/wifi-commissioning-service#3 is merged. Retarget to omnect/main + the merge commit once the PR lands. The hand-added 'file://10-omnect-runtime.conf' SRC_URI (not emitted by cargo-bitbake) is preserved. Signed-off-by: Jan Zachmann <50990105+JanZachmann@users.noreply.github.com>
Signed-off-by: Jan Zachmann <50990105+JanZachmann@users.noreply.github.com>
…ature The service acquires a BLE adapter once at start and never re-probes, so the runtime hci* probe could not deliver hot-plug and raced the controller coming up at boot. Remove the probe drop-in and enable BLE by default on bluetooth builds; force --disable-ble via ExecStart only when the bluetooth feature is absent (restores the previous sed-append). BLE-absent is handled by the service itself (logs once, keeps serving the Unix socket). Signed-off-by: Jan Zachmann <50990105+JanZachmann@users.noreply.github.com>
Cut comments in wpa_supplicant@.service and 80-wlan-wpa.rules that restated the directives they annotate; keep only the non-obvious rationale. Signed-off-by: Jan Zachmann <50990105+JanZachmann@users.noreply.github.com>
Lead the appended command with ';' by convention and drop the now-superfluous trailing separator; condense the explanatory comment. Signed-off-by: Jan Zachmann <50990105+JanZachmann@users.noreply.github.com>
Drop the flowchart, the internal "where to change what" table and the override paragraph; correct the false hot-plug claim (BLE is evaluated once at start) and the "ARM/x86" wording. Reduce the README entry to a plain description and link. Signed-off-by: Jan Zachmann <50990105+JanZachmann@users.noreply.github.com>
These are working artifacts, not shipped documentation. Signed-off-by: Jan Zachmann <50990105+JanZachmann@users.noreply.github.com>
Point the recipe at the branch tip that makes /service-info ble_enabled report live BLE state (fork janzachmann, branch feat/service-info-endpoint). SRCREV only; crate list unchanged (no dependency changes). Drop the cargo-bitbake PV:append .AUTOINC line — the layer pins exact PV. Retarget to omnect/main + the merge commit once PR omnect/wifi-commissioning-service#3 lands. Signed-off-by: Jan Zachmann <50990105+JanZachmann@users.noreply.github.com>
Follow branch tip after the /service-info comment cleanup. SRCREV only; crate list unchanged (comments only, no dependency changes). Retarget to omnect/main + the merge commit once PR omnect/wifi-commissioning-service#3 lands. Signed-off-by: Jan Zachmann <50990105+JanZachmann@users.noreply.github.com>
Signed-off-by: Jan Zachmann <50990105+JanZachmann@users.noreply.github.com>
The leading ';' convention is self-evident from the value. Signed-off-by: Jan Zachmann <50990105+JanZachmann@users.noreply.github.com>
Signed-off-by: Jan Zachmann <50990105+JanZachmann@users.noreply.github.com>
Signed-off-by: Jan Zachmann <50990105+JanZachmann@users.noreply.github.com>
Signed-off-by: Jan Zachmann <50990105+JanZachmann@users.noreply.github.com>
Signed-off-by: Jan Zachmann <50990105+JanZachmann@users.noreply.github.com>
) Design for making /etc/omnect/device_caps.json the single source of truth for wifi/bluetooth gating at build time (DISTRO_FEATURES derivation, BLE cargo feature) and runtime (oneshot orchestrator, --enable-ble), removing the udev hot-plug path. Signed-off-by: Jan Zachmann <50990105+JanZachmann@users.noreply.github.com>
JanZachmann
commented
Jul 8, 2026
- omnect-device-service: replace 0.43.0 recipe with 0.44.0 (SRCREV 96ec68b) - wifi-commissioning-service: bump SRCREV to 9766877 Signed-off-by: Jan Zachmann <jan.zachmann@conplement.de>
JanZachmann
commented
Jul 8, 2026
JanZachmann
left a comment
Contributor
Author
There was a problem hiding this comment.
Two recipes still source from a personal fork branch. These need repointing to the omnect org (or crates.io) and pinning to a stable SRCREV before this merges.
JanZachmann
marked this pull request as ready for review
July 8, 2026 16:00
Source from omnect/wifi-commissioning-service main (SRCREV 4faf122) instead of the personal fork branch; resolves the fork-branch TODO. Signed-off-by: Jan Zachmann <jan.zachmann@conplement.de>
mlilien
reviewed
Jul 9, 2026
- wifi_commissioning.md: frame wifi/bluetooth as standard OE-core features with upstream effects (meta-omnect only adds wcs + the oneshot on top); drop the vague "this model"/3g aside; retitle the pre-boot section and say it means injecting an overwritten device_caps.json; trim the BLE arg-forwarding and no-udev/hot-plug plumbing; drop undefined Mk4/Pico. - README.md: wifi/bluetooth are standard DISTRO_FEATURES we set/derive, not ones we add, so drop them from the "adds" list; stop referencing the removed wifi-commissioning kas example. - Variables_Glossary.md: document OMNECT_DEVICE_CAP_WIFI/_BLUETOOTH. Signed-off-by: Jan Zachmann 50990105+JanZachmann@users.noreply.github.com
- omnect-wifi-commissioning-start: replace the sed JSON scrape with jq (jq is already unconditionally in release and devel images); under set -eu this now fails loud on a malformed device_caps.json. - Rename the script to *.sh and update SRC_URI, do_install, FILES, the service ExecStart, and the wcs .inc comment reference. - Declare the runtime jq dependency explicitly in RDEPENDS. Signed-off-by: Jan Zachmann 50990105+JanZachmann@users.noreply.github.com
…ostprocess - omnect-os-distro.conf: restore the "DISTRO_FEATURES depending on MACHINE_FEATURES" comment (only 3g remains) instead of the unclear "3g stays MACHINE_FEATURES-driven". - omnect-os-image.bb: scope the MACHINE_FEATURES-mismatch comment to "wifi or bluetooth" instead of "a radio"; append verify_image_tools with a leading ';' separator (IMAGE_POSTPROCESS_COMMAND:append) to match the omnect-initramfs-sign.bbclass convention. Signed-off-by: Jan Zachmann 50990105+JanZachmann@users.noreply.github.com
…fork Point SRC_URI at omnect/omnect-device-service main and pin the SRCREV, replacing the personal fork branch. Drops the fork-branch TODO. Signed-off-by: Jan Zachmann 50990105+JanZachmann@users.noreply.github.com
mlilien
reviewed
Jul 9, 2026
- WELOTEC.md: drop the Mk4/Pico names; the row now says "yes, with a wifi/BT adapter". - wifi_commissioning.md: qualify "oneshot" as "the oneshot service". - omnect-wifi-commissioning.bb: reword DESCRIPTION to "Oneshot service ...". - README.md: drop the kas mention from the device_caps.json note. Signed-off-by: Jan Zachmann 50990105+JanZachmann@users.noreply.github.com
Drop the wifi gate on the bluetooth DISTRO_FEATURE. wifi and bluetooth are now independent; each follows its own device_caps value. wcs install and the runtime oneshot still require wifi, since wcs commissions wifi. Signed-off-by: Jan Zachmann 50990105+JanZachmann@users.noreply.github.com
mlilien
approved these changes
Jul 9, 2026
- wifi_commissioning.md: a bluetooth-only machine still installs the standard OE-core bluetooth stack (usable by a container app); only the wcs ble feature needs wifi. - WELOTEC.md: state that wifi commissioning needs integrated WiFi & BT hardware, not a USB dongle. - omnect-os-image.bb: note why an empty device_caps value is allowed (no file/key -> feature off; machines without the file must build). Signed-off-by: Jan Zachmann 50990105+JanZachmann@users.noreply.github.com
HarryWaschkeit
requested changes
Jul 10, 2026
HarryWaschkeit
left a comment
Contributor
There was a problem hiding this comment.
document how to disable ble in wcs (as override of command line parameter)
Let an operator turn the BLE transport off per device via WCS_DISABLE_BLE in /etc/omnect/wifi-commissioning-service.env, even when device_caps enables bluetooth. The oneshot parses the value and drops --enable-ble when it is truthy. No rebuild needed; document the option and use case. Signed-off-by: Jan Zachmann 50990105+JanZachmann@users.noreply.github.com
HarryWaschkeit
approved these changes
Jul 10, 2026
mlilien
added a commit
to mlilien/meta-omnect
that referenced
this pull request
Jul 23, 2026
Brings in main's 6 commits since omnect#665 (security sanity skip, coredump Storage=none, iot-hub-device-update 1.4.0, image-wide RELRO hardening, adu SIGSEGV fix, wifi-commissioning 0.2.1). Conflict resolution in iot-hub-device-update (1.2.6.bb -> 1.4.0.bb rename): - keep main's version bump to 1.4.0 - re-apply wrynose framework adaptations: UNPACKDIR (not WORKDIR) and the dropped S = "${WORKDIR}/git" - keep the fix-diagnostics-devicename-header-guard.patch (GCC 15 -Wheader-guard) - follow main in dropping the "rm adu-swupdate.sh" step (1.4.0 no longer installs it) Auto-merged conf/distro/include/omnect-os-distro.conf, kas/distro/omnect-os.yaml and systemd_%.bbappend (disjoint hunks; verified). Signed-off-by: Marcel Lilienthal <134974+mlilien@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Make
/etc/omnect/device_caps.jsonthe single source for wifi/bluetooth. At build timewifi: optional|yesinstalls wpa-supplicant + the commissioning service, andbluetooth: optional|yescompiles it with theblefeature.At runtime, the omnect-wifi-commissioning oneshot service reads
device_caps.jsonand acts on two flags:An unknown value in
device_caps.json, or a capability enabled there but absent fromMACHINE_FEATURES, fails the build (seeomnect-os-image.bb).Also bumps
omnect-device-serviceto 0.44.0 (wifi-commissioning-state) andwifi-commissioning-serviceto 0.2.0.