wwand: add cellular connection manager - #30185
Conversation
BKPepe
left a comment
There was a problem hiding this comment.
Thanks for working on this. I can see the motivation behind having a lightweight, event-driven WWAN manager tightly integrated with netifd, and some of the functionality here is certainly interesting.
However, I don't think this is ready to be merged into the OpenWrt packages feed in its current form.
My main concern is the scope and the amount of functionality being reimplemented. This is not merely another frontend or connection manager using the existing OpenWrt WWAN stack. wwand implements QMI, MBIM and NCM/AT itself and the corresponding packages explicitly conflict with and replace uqmi, umbim and comgt-ncm.
That effectively introduces a second implementation of a significant part of the OpenWrt WWAN stack which we would then need to maintain and review in parallel with the existing implementations.
The scope is also very large for a newly introduced project: QMI, MBIM, NCM/AT, QMAP/multiple PDP contexts, SIM/APDU handling, eSIM, SMS, telemetry, recovery, board profiles, netifd integration and automatic migration of existing configurations are all being introduced at once.
Host-side tests are useful, but they cannot replace real-world modem interoperability testing for protocols such as QMI and MBIM. The PR currently mentions production testing on four devices/modems. Considering the number of modem vendors, firmware versions, protocol quirks and failure/recovery scenarios encountered in the OpenWrt ecosystem, I don't think this provides enough coverage yet to justify replacing the established handlers.
Another concern is project maturity. This is a relatively new implementation of protocol parsers and fairly complex asynchronous state machines, and a substantial part of the implementation was AI-generated. I don't consider the use of AI itself a reason to reject code, but for this kind of low-level protocol and state-machine implementation it makes independent review and real-world validation especially important. At the moment there does not appear to be enough independent review or deployment history to establish that confidence.
There is also a broader architectural question here.
Since this project is specifically designed around OpenWrt (ucode, uloop, ubus, UCI and netifd) and aims to replace several existing OpenWrt WWAN components, I think the architecture should first be discussed with the maintainers of the existing WWAN/netifd components. In particular, it should be considered whether the missing functionality could be implemented by improving the existing stack instead of introducing another complete QMI/MBIM/NCM implementation.
Features such as better recovery, persistent context handling, QMAP support or improved netifd integration may indeed solve real shortcomings. If so, contributing those improvements to the existing components could benefit all existing users without creating two competing OpenWrt-specific WWAN stacks.
I would therefore prefer to see wwand mature as an external feed first, gain broader hardware coverage and users, accumulate real-world bug reports and fixes, and receive independent review of the protocol/state-machine implementation.
Once that has happened, and if there is consensus that maintaining a separate WWAN implementation is preferable to improving the existing stack, inclusion in the official packages feed could be reconsidered.
So for now, I would be against merging this PR. This is not because the project has no value, but because replacing several established OpenWrt WWAN components with a young and very broad implementation creates a substantial long-term maintenance and review burden that I don't think has been justified yet.
|
Thanks for taking a deep look. This code is based on my personal QMI dial-in handler which I developed since 2014. All of my knowledge about quirks with modems is in this project. I can understand you to not support inclusion, but is not the package feed exactly for this? Optional packages, which the user selects if he want's it. The user may use old style stack with all of it's stability problems or may use wwand instead. So this is not about replacing, it is about giving a stable alternative with features which are needed in the field (plmn lock i.e.), that nothing else provides. André |
Shouldn't that only be a showstopper if wwand is set to the default install for wwan interfaces? Since there are already so much packages for manageing WWAN stuff, why is this section important for adding another package? The options you get with wwand are mostly missing on ALL other packages... Cheers, 4920441 |
openwrt-ai
left a comment
There was a problem hiding this comment.
Packaging-level review of net/wwand/Makefile only — the inclusion/scope discussion in the existing review is a maintainer call and I'm not restating it.
Nothing here blocks a merge on its own. The two worth acting on regardless of how the scope question lands are the unresolvable CONFLICTS entry and the glob-then-rm split in Package/wwand/install, which can silently produce two packages owning the same path. The rest are small.
Metadata otherwise checks out: PKG_RELEASE:=1 is correct for a new package, PKG_MAINTAINER is set, the define blocks follow the 2-spaces-for-metadata / tabs-for-recipes convention, all ucode-mod-* and kmod-* dependencies resolve against openwrt main, lpac in this feed is at 2.3.0 so the >= 2.3.0 note holds, and the codeload.github.com/.../refs/tags/ source URL matches what 243 other Makefiles in this feed do. I could not verify PKG_HASH or the v1.0.0 tag — this session's GitHub access is scoped to openwrt/packages.
Generated by Claude Code
|
Thanks for the very thorough and fair review — the scope and maintenance-burden concerns are legitimate, and I've reworked the most load-bearing part in response. The biggest change: wwand no longer replaces the stock WWAN stack. I've removed all
So it's no longer "a second implementation that replaces the existing handlers" — it's additive and opt-in per interface. That directly targets the "two competing OpenWrt-specific WWAN stacks" and "replacing established handlers" concerns: nothing is replaced unless the operator explicitly opts in, and the stock stack keeps owning On maturity and independent review — I fully agree these matter for low-level protocol/state-machine code. It's being maintained and shipped from an external feed (github.com/ddimension/openwrt-repo), runs on production hardware here (QMI/MBIM/NCM across several modems), and I'm actively hardening it. I'd like to keep improving it in the open rather than sit on it. Given the coexistence rework removes the "replaces the existing stack" objection, would you be open to leaving this open for another ~2 weeks while I continue to mature it — broaden hardware coverage, gather field bug reports, and address review feedback? I'll keep the PR updated regularly as that happens. If after that you still feel the scope is too broad for the feed, I completely understand keeping it external for now. |
openwrt-ai
left a comment
There was a problem hiding this comment.
Re-review of the one new commit since my last pass (d802b81, "wwand: 1.1.0 — coexist with the stock WWAN stack"). Packaging-level only; the inclusion/scope discussion is a maintainer call and I'm not restating it.
The three packaging points from the previous round are all addressed: ucode-mod-wwand-io now depends on +ucode, wwand-esim gained SUBMENU:=WWAN, and the install step uses $(CMAKE_BINARY_DIR) — which expands to $(PKG_BUILD_DIR)/build given CMAKE_BINARY_SUBDIR:=build, so the path is unchanged and now tracks L29. The dead qmi-advanced CONFLICTS entry went away with the rest of the CONFLICTS lines. The version bump keeps PKG_RELEASE:=1, which is correct for a PKG_VERSION change. Commit message matches the diff.
Nothing new blocks a merge. The one worth an answer before this lands is device ownership under the new coexistence model: CONFLICTS is what previously guaranteed only one stack could touch a given /dev/cdc-wdmX, and the replacement guarantee is a runtime property of the daemon that the packaging can't show. The takeover / proto qmi alias question is the same theme from the netifd side. The other two are nits.
Two earlier threads are still open and I haven't repeated them: the glob-then-rm split in Package/wwand/install, and the missing test-version.sh for the generic CI version check. Only the FormalityCheck jobs have reported on this head (all green), so the build/test CI hasn't exercised the latter yet.
I still can't verify PKG_HASH or the v1.1.0 tag — this session's GitHub access is scoped to openwrt/packages, so ddimension/wwand is unreachable to both the API and a plain fetch. Treat those as unchecked rather than checked-and-fine.
Generated by Claude Code
Package-G artefacts for the openwrt/packages#30185 + openwrt/luci#8917 push: - upstream/dossier-packages-30185.md — maturity/coexistence dossier to post as a PR comment (ModemManager precedent, independent-verification story, HW/test matrix, audit changelog, device-ownership answer, re-review request). - upstream/rfc-openwrt-devel.md — the architecture RFC (improve-existing-stack vs. a separate opt-in proto) for openwrt-devel. - upstream/checklist.md — the push/tag/PR/feed action sequence. Drafts for author review; sending/posting is manual. Co-Authored-By: Claude Opus 4.8 <[email protected]>
|
Updated to wwand 1.2.0 (tag Since 1.1.0:
LuCI side is updated in openwrt/luci#8917. |
openwrt-ai
left a comment
There was a problem hiding this comment.
Re-review of the one new commit since my last pass (345c8b1, "wwand: 1.2.0"). Packaging-level only; the inclusion/scope discussion in the maintainer review above is a maintainer call and I'm not restating it.
The bump itself is clean: PKG_RELEASE stays at 1, which is correct for a PKG_VERSION change, and the new /usr/bin/wwandctl install is properly paired with a wwandctl.uc entry in the base package's strip list, so it doesn't also leak into $(UCDIR). The commit message matches the diff. I confirmed the v1.2.0 tag exists in ddimension/wwand (resolves to commit 1d75ae8); PKG_HASH I still can't verify — codeload.github.com is not reachable from this session — so treat that one as unchecked rather than checked-and-fine.
One finding is worth acting on before merge: 1.2.0 also adds files/wwand.hotplug.wwan, a fourth hotplug script that this Makefile never installs, which leaves the "PCIe/MHI (kernel wwan subsystem) discovery" listed in the commit message working only for modems already present when the daemon starts. The other two comments are nits.
Earlier threads are still open and I haven't repeated them: the glob-then-rm split in Package/wwand/install, the missing test-version.sh (one new comment does extend that one, since 1.2.0 adds a second executable that definitely fails the generic check), the proto qmi alias ownership question under takeover, the cdc-wdm device-ownership question, and the PR body still describing the pre-1.1.0 CONFLICTS / auto-migrate model. Only the three FormalityCheck jobs have reported on this head, all green, so the build/test CI still hasn't exercised any of this.
Generated by Claude Code
openwrt-ai
left a comment
There was a problem hiding this comment.
Re-review of the one new commit since my last pass. 345c8b1 was amended into fc0388e (same subject, wwand: 1.2.0); the only delta against what I reviewed last time is the four-line wwan hotplug hunk in Package/wwand/install. Packaging-level only; the inclusion/scope discussion in the maintainer review above is a maintainer call and I'm not restating it.
That hunk resolves the one finding I flagged as worth acting on last round: files/wwand.hotplug.wwan is now installed to /etc/hotplug.d/wwan/20-wwand, and the paired $(INSTALL_DIR) is what arms the dispatch — procd only calls hotplug-call for a subsystem whose directory exists (hotplug.json:83-86). INSTALL_DATA matches the three sibling hotplug installs above it and the in-tree precedent for this same subsystem (modemmanager Makefile:158-160), and the filename doesn't collide with modemmanager's 25-modemmanager-wwan, so both can be installed. Commit message matches the diff, PKG_RELEASE stays at 1, which is correct for the PKG_VERSION change.
Nothing new to flag on this head. Earlier threads are still open and I haven't repeated them: the glob-then-rm split in Package/wwand/install, the missing test-version.sh (three installed executables now), the proto qmi alias ownership question under takeover, the cdc-wdm device-ownership question, the MHI kmod hint in Package/wwand-qmi/description, the bare wwand: 1.2.0 commit subject, and the PR body still describing the pre-1.1.0 CONFLICTS / auto-migrate model.
Two things I could verify last round but cannot on this one: PKG_HASH and the v1.2.0 tag. This session's GitHub access is scoped to openwrt/packages, and codeload.github.com is unreachable, so ddimension/wwand is out of reach to both the API and a plain fetch. PKG_HASH is unchanged by this amend, so nothing new rests on it — but treat it as unchecked here rather than checked-and-fine.
Only the three FormalityCheck jobs have reported on this head, all green, so the build/test CI still hasn't exercised any of this.
Generated by Claude Code
|
Pushed a squashed head (
Answering the two open questions, since they're the ones that can't be read off the packaging:
cdc-wdm device ownership. wwand opens a control device only when a glob-then- |
openwrt-ai
left a comment
There was a problem hiding this comment.
Re-review against the new head. The branch was squashed since my last pass — the four commits I had reviewed (fc0388e and its ancestors) are now the single commit 8ffb9e3, "wwand: add cellular connection manager". Diffing fc0388e..8ffb9e3 on net/wwand/, the only content delta is two things, both closing threads from earlier rounds:
net/wwand/test-version.sh(new) — opts all six binary packages out of the generic version check. It follows the in-tree$PKG_NAMEcase/*)-fallback shape (e.g.libs/expat/test-version.sh), has nogrep -q, and lists every package the Makefile builds, so the*)branch can't fire.Package/wwand-qmi/description(L130-134) — the MHI kmod hint. All three names check out against openwrt main:kmod-mhi-wwan-ctrl,kmod-mhi-net,kmod-mhi-pci-generic.
The squash also resolved the bare-wwand: 1.2.0 subject nit on its own. The single commit's message matches its diff, and PKG_RELEASE:=1 is correct for a new package. Nothing new blocks a merge; the one comment below is a nit.
Worth noting because it changes what is actually verified: the full build CI has now run on this head and is green on all ten architectures, so test-version.sh is confirmed working rather than assumed — the x86_64 runtime job logs wwand-qmi: Version test override script found and [pass] Version check override for each package, then All tests passed. (The * Failed to connect to ubus lines around the wwand post-install/pre-deinstall in that log are just default_postinst's "$i" start on a procd init script in a container with no ubus — not a defect here.) lpac in this feed is still at 2.3.0, so the >= 2.3.0 note in Package/wwand-esim/description continues to hold.
Earlier threads are still open and I'm not repeating them: the glob-then-rm split in Package/wwand/install, the proto qmi alias ownership question under takeover, the cdc-wdm device-ownership question, the qmi-advanced mention that survives in the L121 prose, the ucode-mod-io reuse question, and the PR body still describing the pre-1.1.0 CONFLICTS / auto-migrate model. The scope and inclusion discussion in the maintainer review above is a maintainer call and I'm not restating it.
PKG_HASH and the v1.2.0 tag I still cannot check — this session's GitHub access is scoped to openwrt/packages, so ddimension/wwand is unreachable to both the API and a plain fetch. Neither changed in this delta, but treat them as unchecked rather than checked-and-fine.
Generated by Claude Code
|
Updated to wwand 1.3.0 (tag
New in 1.3.0 as well: the ucode tree ships precompiled to bytecode by default (repo-root CMakeLists, built next to On the broader architecture question: I'd still welcome a discussion with the WWAN/netifd maintainers. wwand is deliberately additive here (opt-in per interface, nothing replaced by default), and I'm happy to feed back any of the recovery / persistent-context / QMAP / netifd-integration work into the existing stack where that's the better home. |
|
I very much welcome and look forward to this component, because the existing proto_qmi, proto_mbim, and proto_ncm only implement basic connection functionality, lacking a GUI interface and advanced features such as band locking, SMS reading, signal strength, etc. This component can provide unified management and reduce the learning cost for users. As for the possibility that the author might stop maintaining it in the future, we can simply remove this package then. |
openwrt-ai
left a comment
There was a problem hiding this comment.
Re-review against the new head. The branch was squashed again — 8ffb9e3 is now the single commit 8e33265 with the same subject, so I diffed 8ffb9e3..8e33265. The delta is the 1.3.0 bump plus four structural changes: the ucode tree is now precompiled to bytecode by a repo-root cmake build (PKG_BUILD_DEPENDS:=ucode/host, UCODE_COMPILER/UCODE_PRECOMPILE, the new CONFIG_WWAND_UCODE_SOURCE opt-out), the base install switched from glob-then-rm to explicit WWAND_BASE_UC/_CODEC/_SCHEMA lists, ucode-mod-wwand-io was folded into the base package (PROVIDES:=ucode-mod-wwand-io) and replaced in the package set by the new wwand-mhi transport bundle, which is also where the wwan hotplug now lives. Packaging-level only; the inclusion/scope discussion in the maintainer review above is a maintainer call and I'm not restating it.
Three earlier threads close with this head, and the replacements check out: the base package no longer installs anything a backend owns; wwand-mhi's DEPENDS names four kmods that all exist in openwrt main, including kmod-mhi-wwan-mbim, which answers the MBIM-over-MHI question I raised last round; and test-version.sh was updated in step with the package set (wwand-mhi in, ucode-mod-wwand-io out), so the *) fallback still cannot fire. The single commit's message matches its diff and PKG_RELEASE:=1 is correct for a new package, so no commit checks.
What is new is that the default build path changed shape. Three of the comments below are questions about that path — bytecode/interpreter skew, whether the SDK's host ucode can compile modules that import ubus/uci/uloop/rtnl, and whether a precompiled main.uc is still directly executable as /usr/sbin/wwand. None is a defect I can demonstrate from the packaging alone, and each has a one-line answer if the upstream build already handles it; I raise them because bytecode is the default while every build and runtime test this PR has accumulated so far exercised the source path, and only the three FormalityCheck jobs have reported on this head. The other two comments are nits.
Earlier threads I'm not repeating: the proto qmi alias ownership under takeover and the cdc-wdm device-ownership question (both answered in the PR conversation but the threads are still open), and the PR body still describing the pre-1.1.0 CONFLICTS / auto-migrate model.
PKG_HASH and the v1.3.0 tag remain unchecked — this session's GitHub access is scoped to openwrt/packages, so ddimension/wwand is unreachable to both the API and a plain fetch. Treat them as unverified rather than verified-fine.
Generated by Claude Code
|
Hi, |
|
root@OpenWrt:~# Thu Aug 27 13:27:04 2026 daemon.warn wwand[4399]: modem wwmodem0: uim read of file 6f60 failed: { "error": "qmi", "result": 1, "code": 48 } |
|
Hi simass, thanks for testing. |
Plese send more logs and used version. Thanks a lot! |
|
Daemon fails to recover after deleting all configuration with multiplexing: |
|
Hi! Thanks for all the detailed reports. I could identify the problems, hopefully mips also.
|
ed35221 to
c96f904
Compare
openwrt-ai
left a comment
There was a problem hiding this comment.
Re-review against the new head. The branch was squashed again — my last pass was f2b7a26 (v1.4.7), and the delta is the single commit c96f904 with the same subject. Diffing f2b7a26..c96f904 on net/wwand/, the whole packaging change is two lines: PKG_VERSION 1.4.7 → 1.5.1 and the matching PKG_HASH. PKG_RELEASE:=1 is correct for a new package and the commit message matches its diff, so no commit checks. Packaging-level only; the scope/inclusion discussion in the maintainer review above is a maintainer call and I'm not restating it.
One finding, and it is precisely the failure mode the explicit-per-file install lists exist to make visible. Every bump I have checked so far added no ucode modules, so the lists never had to move. 1.5.0 does add two — src-ucode/atcmd_mbim.uc and src-ucode/atcmd_mbim_lazy.uc, the AT-over-MBIM transport — and the install lists did not move with them, so those two files ship in no package at all. Because modem_common.uc (base package) require()s the shim unguarded, that is a runtime throw on any modem with no AT tty, not merely a missing feature. Details and a suggestion are inline; the second comment is a question about which package should carry them once they are packaged, given that the modems this transport was written for are wwand-mhi + wwand-qmi installs.
Verified against tag v1.5.1, which exists in ddimension/wwand (annotated tag 28f73a2 → commit fc013f1):
- Ownership check: 80 of the 82
.ucfiles in the release are owned by exactly one package, with no duplicates. The only two orphans are the pair above; nothing named by the Makefile is missing from the release. Upstream'sCMakeLists.txtmodule lists were updated for both files, which is what makes the omission here a packaging-side gap rather than an upstream one. - No new dependency is owed. The tree imports only the native modules
fs,struct,ubus,uci,uloopplusrtnl(viarequire()innetlink.uc) andwwand_io— all covered by the base package'sDEPENDS.v1.4.7..v1.5.1adds no external-binary spawn; thepatches/kernel/directory it adds is documentation for users patching their own kernel, not something the packaging installs. - All eight
$(PKG_BUILD_DIR)/files/...paths resolve, includingfiles/examples/99-wwand-migrate;main.ucandwwandctl.ucstill start with#!/usr/bin/env ucode, so the source-default path installs them directly executable. test-version.shis unchanged and still names all six packages, so the*)branch cannot fire;lpacin this feed is still 2.3.0, so the>= 2.3.0note inPackage/wwand-esim/descriptioncontinues to hold.- The PR body's "Current release: v1.5.1 — the release this Makefile pins" matches this head, so the drift nit from earlier rounds stays closed.
PKG_HASH is the one thing I still cannot check: codeload.github.com returns 403 for this session's egress policy even though the git endpoint for the same repo is reachable, so the tarball itself is out of reach. Treat it as unverified rather than verified-fine.
Only the three FormalityCheck jobs have reported on this head, all green. The full build/runtime CI has not run since 8ffb9e3, so neither the current install lists nor the source-default build path have been exercised by CI — which is why the orphaned modules above went unnoticed by anything but a read of the release tree.
The cdc-wdm device-ownership thread remains open and answered in the conversation rather than closed — a maintainer call; I'm not restating it.
Generated by Claude Code
atcmd_mbim lives in wwand-mbim, because it needs that package's MBIM client and codec — and an MHI box is exactly where it is wanted and may be absent: such a modem installs wwand-qmi + wwand-mhi, and nothing there pulls wwand-mbim in. The require() was bare, so on that combination it threw straight out of open_at instead of reporting a capability we do not have. It now follows the shape daemon.uc already uses for the backend packages (lazy_backend): try once, remember the failure, and treat absence as "no AT over MBIM" with a log line that names the package to install. The loader is injectable for the same reason open_transport and open_mbim_at are — the module is always present in a source tree, so its absence can only be exercised through a seam. Caught by the reviewer on openwrt/packages#30185, who also spotted the other half: the PR's Makefile did not install the two new modules at all.
wwand 2311728 (tagged v1.5.2). One fix, found by the reviewer on openwrt/packages#30185: a missing wwand-mbim threw out of open_at instead of reporting a capability we do not have. atcmd_mbim lives in wwand-mbim because it needs that package's MBIM client and codec, and an MHI modem driven over QMI installs wwand-qmi + wwand-mhi without it — which is exactly where the AT-over-MBIM pipe is wanted, since the generic Qualcomm MHI profile declares no DUN channel and such a modem has no AT port at all. The require now behaves like daemon.uc's lazy_backend: try once, remember the failure, name the package in the log. wwand-mhi's description says why adding wwand-mbim is worthwhile there. PKG_MIRROR_HASH recomputed by the SDK and checked against the previous value (738ef785 -> 43098025).
openwrt-ai
left a comment
There was a problem hiding this comment.
Re-review against the new head. The branch was squashed again — 4e7d45d and the commits that followed it are now the single commit d99277e, same subject — so I diffed 4e7d45d..d99277e. Two files: the 1.3.0 → 1.5.2 bump plus the precompile inversion in net/wwand/Makefile, and a 644 → 755 mode change on test-version.sh. Packaging-level only; the scope and inclusion discussion in the maintainer review above is a maintainer call and I'm not restating it.
Nothing here blocks a merge. Both comments below are questions, and the second is arguably a design preference rather than a defect.
Earlier threads that close on this head
- The gated
ucode/hostbuild dependency now actually arms. The$(if $(CONFIG_...),ucode/host)form I flagged last round was dropped forWWAND_UCODE_PRECOMPILE:ucode/host(L48), and that prefix form is honoured:gen_package_mksplits eachBuild-Dependsentry on:into condition and package (package-metadata.pl:523-531) and feeds the condition toget_conditional_dep, which emits$(if $(CONFIG_WWAND_UCODE_PRECOMPILE),$(curdir)/package/utils/ucode/host/compile)into.packagedeps— evaluated with.configincluded, so the DUMP=1 problem does not apply. In-tree precedent for the same shape:elfutils/Makefile:25(!USE_GLIBC:argp-standalone). The explanatory comment at L43-47 is accurate. - The orphaned AT-over-MBIM modules are packaged.
atcmd_mbim.ucandatcmd_mbim_lazy.ucnow install inwwand-mbim(L249-250). Cross-checking the union ofWWAND_BASE_UC/_CODEC/_SCHEMAand the four backend install lists, no module is claimed by two packages. - The comment blocks that still described bytecode as the default are all rewritten consistently — L15-22, L53-58, L65-66 and L86-88 now agree with each other, with the
$(if ...)at L67 and withdefault nat L95. /etc/uci-defaults/99-wwand-migrateis gone; the script ships inert under/usr/share/wwand/examples/(L158-164), which matches both the commit message and the PR body.- The PR body no longer lags the pin — it says v1.5.2 and L27 pins 1.5.2. That is the fourth round this drifted and the first where it did not.
test-version.sh is unchanged apart from the mode; it still names all six packages the Makefile builds, so the *) fallback cannot fire, and 755 is the majority mode for this file in the feed (71 of 104). PKG_RELEASE:=1 is correct for a new package, and the single commit's message matches its diff — no commit checks.
What I could not verify
PKG_HASH and the v1.5.2 tag remain unchecked. This session's GitHub access is scoped to openwrt/packages; codeload.github.com answers the tarball URL with an access-denied JSON body rather than an archive, so ddimension/wwand is out of reach to both the API and a plain fetch. For the same reason I could not repeat the orphaned-module cross-check against the actual 1.5.2 src-ucode file list — the check above is internal consistency only, not "every shipped module is installed by exactly one package". Same for files/examples/99-wwand-migrate existing at this tag. Treat all of these as unverified rather than verified-fine.
Only the three FormalityCheck jobs have reported on this head, all green. The full build/runtime CI has not run since 8ffb9e3 (the 1.3.0 head), so the build path that is now the default — ucode source, precompile off, no host ucode staged — has never been exercised in this repo's CI. That is the ground for the first comment below.
Earlier threads still open and not repeated here: the cdc-wdm device-ownership question, the ucode-mod-io reuse question, whether the SDK's host ucode (built UBUS_SUPPORT=OFF/UCI_SUPPORT=OFF/ULOOP_SUPPORT=OFF/RTNL_SUPPORT=OFF) can compile the modules that import those, and the bytecode/interpreter-skew question — the last two now apply only to the opt-in path, which lowers their stakes considerably.
Generated by Claude Code
…users The description told MHI users to add wwand-mbim without saying what it costs. It pulls the USB MBIM transport, which that path does not use, and the chain ends at kmod-usb-core (@USB_SUPPORT) — so on a target built without USB support the package cannot be selected at all and the capability is unreachable, even though everything it needs (the ucode side, kmod-mhi-wwan-mbim) is available there. Caught by the reviewer on openwrt/packages#30185. The coupling is not specific to wwand-mbim: all three backends hard-require USB kmods, so a USB-less target can select no backend at all today. Separating the transport-neutral ucode from the USB kmods across all three is the real fix and deserves its own change, not a footnote in a description.
…se a backend All three backends hard-required USB kmods, and that chain ends at kmod-usb-core with DEPENDS:=@USB_SUPPORT. On a target built without USB support no wwand backend was selectable at all — so wwand-mhi alone managed nothing there, even though everything a PCIe/MHI modem needs (the ucode side, kmod-mhi-*) is available. Raised on openwrt/packages#30185 against the wwand-mbim recommendation; it turned out not to be specific to that package. `+USB_SUPPORT:kmod-…` is the OpenWrt idiom for exactly this (bluez uses `+USB_SUPPORT:kmod-bluetooth`). On a USB target nothing changes — verified by building: with CONFIG_USB_SUPPORT=y the resolved dependency list of wwand-qmi still contains kmod-usb-net-qmi-wwan, so no upgrade loses its transport. The negative case was checked at the metadata layer rather than assumed, because reconfiguring a whole target to prove it would cost a rebuild. The generated Kconfig reads: config PACKAGE_wwand-qmi depends on !(USB_SUPPORT && USB_SUPPORT) || (USB_SUPPORT||USB_GADGET_SUPPORT) select PACKAGE_kmod-usb-net-qmi-wwan if USB_SUPPORT With USB_SUPPORT off the first term is true, so the package stays selectable and the kmod is not selected. Same shape for wwand-mbim and wwand-ncm. kmod-rmnet deliberately stays unconditional: it is the QMAP demuxer and is needed on BOTH transports — an MHI modem multiplexes through it too, as the two-context test on a BPi-R4 showed. This is the small half of what the reviewer raised. It fixes availability, not the dead weight on a USB-capable MHI box; separating protocol from transport into their own packages would fix that too, but it cannot be done without either breaking existing installs or spending two releases on a migration.
openwrt-ai
left a comment
There was a problem hiding this comment.
Re-review against the new head. My last pass was d99277e; the branch was squashed again into 881679d9 with the same subject, and diffing d99277e..881679d9 the entire delta is seven lines of prose in Package/wwand-mhi/description — the AT-over-MBIM paragraph moved out of the advisory voice and now names the USB cost, which is what the open thread from last round asked for. No metadata, dependency or install-list change. PKG_RELEASE:=1 is correct for a new package and the commit message matches its diff, so no commit checks. Packaging-level only; the scope and inclusion discussion in the maintainer review above is a maintainer call and I'm not restating it.
Nothing here blocks a merge. The one comment below is a nit on that same paragraph.
Verification I could not do last round, and can now. github.com/ddimension/wwand is reachable over plain git from this session again, so the check that has been "internal consistency only" for the last two rounds is a real one against the pinned release:
- Tag
v1.5.2exists and resolves tod74e999531d747e4e5f34dd6b00d20722b85f879. - Module ownership on
v1.5.2is exact. All 82.ucfiles insrc-ucode/are installed by exactly one package — no orphans, no duplicates, and nothing the Makefile names is missing from the release. That includesatcmd_mbim.uc/atcmd_mbim_lazy.uc, the pair that shipped nowhere atv1.5.1; thewwand-mbimentries added for them (L249-250) close that finding against the actual tree rather than by inspection of the Makefile alone. - All eight
$(PKG_BUILD_DIR)/files/...paths resolve, includingfiles/examples/99-wwand-migrate(#!/bin/sh), so the inert-example install cannot fail. main.ucandwwandctl.ucstill start with#!/usr/bin/env ucode, so the source-default path (WWAND_UCODE=$(PKG_BUILD_DIR)/src-ucode) installs them directly executable as/usr/sbin/wwandand/usr/bin/wwandctl.
PKG_HASH remains the one thing I cannot check: codeload.github.com answers the archive URL with an access-denied JSON body rather than a tarball for this session, even though the git endpoint for the same repo is reachable. Treat it as unverified rather than verified-fine.
Only the three FormalityCheck jobs have reported on this head, all green. The full build/runtime CI has not run since 8ffb9e3 (the 1.3.0 head), so the current default build path — ucode source, precompile off, no host ucode staged — is still unexercised by this repo's CI.
Earlier threads still open and not repeated here: the cdc-wdm device-ownership question, the ucode-mod-io reuse question, the deferred backend/transport split (answered in the thread as a follow-up rather than a change here), and — now only for the opt-in precompile path — the host-ucode capability and bytecode/interpreter-skew questions.
Generated by Claude Code
839bf7b to
a5bacce
Compare
Netifd protocol handler for `proto wwand`, the cellular connection manager proposed in openwrt/packages#30185. It renders the connection options the daemon consumes — APN, PDP type, authentication, MUX id, MTU handling — and resolves the modem an interface is bound to. wwand registers `proto wwand` only; the historical `qmi` proto name stays uqmi's, so this handler never competes with the stock one for an interface. Signed-off-by: André Valentin <[email protected]>
Status and management UI for the wwand cellular connection manager proposed in openwrt/packages#30185: modem overview, per-modem tools (radio technologies, band selection, network selection and scan, cell lock), SIM and eSIM profile management, SMS, and the per-interface migration entry point that converts a stock cellular interface to `proto wwand` in place. Everything is driven over the daemon's ubus API; the ACL file lists exactly the methods the pages call. Signed-off-by: André Valentin <[email protected]>
wwand is an event-driven cellular connection manager written in ucode. It drives netifd over ubus with no_proto_task, so the daemon owns the modem and context lifecycle while netifd keeps ownership of all addressing and routing. Six packages: a backend-neutral base (daemon, netifd shim, codec, the native wwand_io.so) plus wwand-qmi, wwand-mbim, wwand-ncm, wwand-mhi and wwand-esim. A backend is loaded lazily, so a missing backend package surfaces as a status note instead of a failure. It coexists with the stock stack rather than replacing it. There is no CONFLICTS on uqmi/umbim/comgt-ncm, and the shim registers `proto wwand` and nothing else — the `qmi` proto name stays uqmi's, so netifd's handler load order never decides who owns an interface. Handing one over is always an explicit act that rewrites it in place to `proto wwand`: the LuCI modem list, /usr/libexec/wwand/migrate, or the example uci-defaults script shipped inert under /usr/share/wwand/examples/. Nothing is installed under /etc/uci-defaults, so installing or upgrading cannot rewrite an existing configuration. The ucode tree ships as source. Bytecode precompilation is available via CONFIG_WWAND_UCODE_PRECOMPILE but stays opt-in: bytecode carries a format version (UCODE_BYTECODE_VERSION) that an interpreter upgraded past it refuses to load, and that version is independent of libucode's PKG_ABI_VERSION/SONAME, so no package relation expresses the coupling. It is only sound when ucode and wwand are built in the same tree, which a self-built image is and a feed is not. Signed-off-by: André Valentin <[email protected]>
Netifd protocol handler for `proto wwand`, the cellular connection manager proposed in openwrt/packages#30185. It renders the connection options the daemon consumes — APN, PDP type, authentication, MUX id, MTU handling — and resolves the modem an interface is bound to. wwand registers `proto wwand` only; the historical `qmi` proto name stays uqmi's, so this handler never competes with the stock one for an interface. Signed-off-by: André Valentin <[email protected]>
Status and management UI for the wwand cellular connection manager proposed in openwrt/packages#30185: modem overview, per-modem tools (radio technologies, band selection, network selection and scan, cell lock), SIM and eSIM profile management, SMS, and the per-interface migration entry point that converts a stock cellular interface to `proto wwand` in place. Everything is driven over the daemon's ubus API; the ACL file lists exactly the methods the pages call. Signed-off-by: André Valentin <[email protected]>




Adds wwand, an event-driven cellular connection manager written in ucode: native QMI, MBIM and NCM/AT control (no uqmi/qmicli/libqmi/glib), direct netifd integration (the daemon owns the context lifecycle — no per-interface monitor process; transient loss renews in place so IPv6-PD/VRF survive), multi-modem + multi-PDP-context via QMAP multiplexing, SIM/eSIM management (SGP.22 via lpac), SMS (send + receive), telemetry, a recovery ladder, board profiles and zero-config autosetup. A
wwandctlCLI and a LuCI app (openwrt/luci#8917) sit on top.Upstream repo: https://github.com/ddimension/wwand (GPL-2.0-only, 3268 host-side checks run without hardware). Current release: v1.6.0 — the release this Makefile pins.
One source package, six binary packages:
wwand— backend-neutral base (daemon, codec, netifd proto shim, SIM/APDU layer,wwandctlCLI). It also ships the small native C transport modulewwand_io.so(message-oriented cdc-wdm/tty I/O + rmnet netlink helper) — wwand-private and always version-locked to the ucode side, so it lives inside the base package (PROVIDES ucode-mod-wwand-iofor older configs).wwand-qmi/wwand-mbim/wwand-ncm— per-protocol control backends; install only what the modems need (wwand-qmipulls inwwand; a typical QMI router needs just that).wwand-mhi— PCIe/MHI transport bundle (MHI bus/PCI/control/data kmods + the kernel-wwan-subsystem hotplug) for modems whose control port appears under/sys/class/wwaninstead ofusbmisc. Backend-neutral: pair withwwand-qmiorwwand-mbim.wwand-esim— optional SGP.22 profile management + SM-DP+ download (depends onlpac>= 2.3.0).Since v1.6.0 the QMI mux datapath is an interface rather than a hard-coded branch:
rmnet,qmimuxand the MBIM session mux are entries in it, andwwand-qmiadditionally carries two plug-ins for the out-of-tree vendor QMAP drivers (qmi_wwan_q,pcie_mhi). Neither driver exists in the kernel tree, so on an OpenWrt kernel both plug-ins are inert — their probe finds none of the children those drivers would have registered and declines, leaving the built-in datapaths in charge. 1.6.0 also fixes the QMAP data-aggregation constant:QMAPV5was 8, which is libqmi's QMAPv4, so modems declined it and every QMI link silently fell back to plain QMAP.Packaging. The ucode tree is flat; each package installs an explicit per-file list — no glob-then-
rm, so every module is owned by exactly one package and a new backend file can never silently ship in the base too. The ucode tree ships as source. Bytecode precompilation is available viaCONFIG_WWAND_UCODE_PRECOMPILEbut stays opt-in: bytecode carries a format version (UCODE_BYTECODE_VERSION) that an interpreter upgraded past it refuses to load, and that version is independent of libucode'sPKG_ABI_VERSION/SONAME, so no package relation expresses the coupling. It is only sound when ucode and wwand are built in the same tree — which a self-built image is and a feed is not.Good-citizen coexistence (no stock stack replaced). The packages do not
CONFLICTSuqmi/umbim/comgt-ncm — they install alongside them. The netifd shim registersproto wwandand nothing else: theqmiproto name stays uqmi's, so netifd's handler load order never decides who owns an interface, and there is no switch that changes this. wwand manages onlyproto wwandinterfaces and never adopts a bareproto qmi/mbim/ncmone, so exactly one dialer owns a given interface and the control device behind it. Handing one over is always user-triggered and rewrites it in place toproto wwand: a "Migratable interfaces" list in the LuCI modem page, themigrateubus method / CLI, or an example uci-defaults script shipped inert under/usr/share/wwand/examples/. Nothing is installed under/etc/uci-defaults, so installing or upgrading wwand cannot rewrite an existing configuration. Inclusion is additive and opt-in per interface, not a second implementation that displaces the existing handlers.Hardware-tested on MikroTik Chateau 5G R17 ax (Quectel RG650E, 5G NSA), Zyxel NR7101 (RG502Q), Zyxel LTE3301-Plus (EG06) and Cudy LT300 v3 (MeiG SLM770A-R), plus a GL.iNet GL-X3000 (RM520N-GL); the PCIe/MHI path (
wwand-mhi) is under active validation with community testers on Foxconn T99W175 hardware. Maintained and shipped from an external feed (github.com/ddimension/openwrt-repo) while it broadens coverage and gathers field reports.🤖 Generated with Claude Code