Skip to content

[14.5-stable] Implement user-configurable LTE Attach configuration #4857

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 9 commits into from
May 24, 2025

Conversation

milan-zededa
Copy link
Contributor

Description

Users can now configure LTE attach parameters and IP type directly,
eliminating the need for speculative methods previously used to
"guess" this configuration. This should resolve many issues related
to modem registration failures we have been seeing.

Backport of:

Unlike the PR for 13.4-stable, the backporting to 14.5 was straightforward -- no merge conflicts or any other problems.

PR dependencies

How to test and validate this PR

Configure LTE attach settings and then check using ModemManager CLI that they are properly applied.
For example:

mmcli -m 0
...
  -----------------------------------
  3GPP EPS |    ue mode of operation: csps-2
           |     initial bearer path: /org/freedesktop/ModemManager1/Bearer/0
           |      initial bearer apn: ims
           |  initial bearer ip type: ipv4v6
  -----------------------------------
...
mmcli -b 0
  -------------------------
  General    |        path: /org/freedesktop/ModemManager1/Bearer/0
             |        type: default-attach
  -------------------------
  Status     |   connected: yes
             |   suspended: no
             | multiplexed: no
             |  ip timeout: 20
  -------------------------
  Properties |         apn: ims
             |     ip type: ipv4v6

Changelog notes

Added support for user-configurable PDP settings for the LTE attach bearer. If modem profiles or the network do not provide correct APN settings during the attach procedure, users can now specify attach_* fields inside CellularAccessPoint. Defaults to modem/network configuration if unspecified.

PR Backports

Checklist

  • I've provided a proper description
  • I've added the proper documentation (when applicable)
  • I've tested my PR on amd64 device(s)
  • I've tested my PR on arm64 device(s)
  • I've written the test verification instructions
  • I've set the proper labels to this PR
  • I've added a reference link to the original PR
  • PR's title follows the template ([<stable-branch>] Original's PR Title)

This update adds support for LTE attach configuration and related
informational fields.

Signed-off-by: Milan Lenco <[email protected]>
Added LTE attach configuration parameters to CellularAccessPoint,
and extended WwanNetworkStatus to include status information for
all bearers and modem profiles.

Signed-off-by: Milan Lenco <[email protected]>
(cherry picked from commit 89d6fe0)
This update adds support for LTE attach configuration and related
informational fields.

Signed-off-by: Milan Lenco <[email protected]>
Apart from the obvious code parsing of the newly introduced LTE attach
configuration, some improvements were done around wireless config
to make sure that errors are propagated to the controller.

Signed-off-by: Milan Lenco <[email protected]>
(cherry picked from commit 227db11)
When a port is not a wireless network adapter, the controller may either
return nil for the WirelessConfig or provide a WirelessConfig with Type
set to NOOP. These two cases are functionally equivalent.
However, EVE returns an "unsupported wireless type" error when encountering
the NOOP type.

Previously, this wasn’t an issue because errors from parseNetworkWirelessConfig
were simply logged and ignored.
After recent refactoring of this function, those errors are no longer ignored
and will cause EVE to reject the entire network configuration as invalid.

Signed-off-by: Milan Lenco <[email protected]>
(cherry picked from commit f212a80)
Users can now configure LTE attach parameters and IP type directly,
eliminating the need for speculative methods previously used to
"guess" this configuration. This should resolve many issues related
to modem registration failures we have been seeing.

Signed-off-by: Milan Lenco <[email protected]>
(cherry picked from commit 63e930d)
Disabled modems (i.e., those without an attached network
configuration) have their radios turned off and all bearers
disconnected and cleared.
However, due to a bug introduced in recent changes, the bearer
clearing is now triggered on every call to reconcileModem, which
runs both periodically and in response to modem state changes.

This repeated clearing is unnecessary. It should occur only once,
alongside turning off the radio.

Signed-off-by: Milan Lenco <[email protected]>
(cherry picked from commit 7841c10)
Explain in which cases it may be useful for the user to configure LTE
attach settings.

Signed-off-by: Milan Lenco <[email protected]>
(cherry picked from commit c316cc6)
Bearer's ConnectionError is represented in ModemManager DBus API
as a list of two fields: DBus Error Name and Error message.
The method for retreiveing this propery expects generic list
[]interface{}, which will have length 2 and contain 2 strings.

See:
https://www.freedesktop.org/software/ModemManager/doc/latest/ModemManager/gdbus-org.freedesktop.ModemManager1.Bearer.html#gdbus-property-org-freedesktop-ModemManager1-Bearer.ConnectionError

This commit fixes the previous code which assumed that struct
with the two strings is returned.

Signed-off-by: Milan Lenco <[email protected]>
@milan-zededa milan-zededa force-pushed the lte-attach-config-14.5 branch from 7844ade to 559e4ca Compare May 21, 2025 15:55
@OhmSpectator
Copy link
Member

I'm confused again about the report from the OSV scanner... Does it say this PR bring new CVS?

@eriknordmark
Copy link
Contributor

I'm confused again about the report from the OSV scanner... Does it say this PR bring new CVS?

Not new but perhaps old?

It is pointing out that stdlib 1.23.0 has some issues, but those issues seems to be the net/http ones which we have fixed.
What is difficult is that stdlib is never listed in go.mod or go.sum, thus I don't know how to tell which version we actually linked against. Is this an issue in OSV scanner? dependabot doesn't show these issues any more AFAICT.

@OhmSpectator OhmSpectator merged commit 1a76661 into lf-edge:14.5-stable May 24, 2025
42 of 44 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants