Skip to content
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

[WIP] lib: lte_link_control: refactor into modules #17266

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

MirkoCovizzi
Copy link
Contributor

@MirkoCovizzi MirkoCovizzi commented Sep 11, 2024

Divides the LTE Link Controller into modules.

Opening for discussion to orient design. It is a work in progress so it is unpolished by design.

Tasks:

  • Modularize: make the architecture modular (rather than monolithic) and easy to understand. Streamline the introduction of new AT commands/functionalities. I have a couple of AT commands I need to add so this is important
  • Modularize tests to align
  • Identify potential configuration problems that might arise from lte_net_if stack, lte_lc API usage within NCS, or custom overlays

Benefits:

  • Improved structure
  • Improved efficiency because of the increased granularity

What has been changed compared to main:

  • Each AT command (or a subset of adjacent AT commands) sits in its own module that can be toggled with a Kconfig option
  • The work queue and the event handler list have been moved to a common folder and are shared between the modules

@MirkoCovizzi MirkoCovizzi self-assigned this Sep 11, 2024
@github-actions github-actions bot added the changelog-entry-required Update changelog before merge. Remove label if entry is not needed or already added. label Sep 11, 2024
@NordicBuilder
Copy link
Contributor

NordicBuilder commented Sep 11, 2024

CI Information

To view the history of this post, clich the 'edited' button above
Build number: 23

Inputs:

Sources:

sdk-nrf: PR head: 356e8d9e928e20d39743096c3b4fc8b95fc85ac0

more details

sdk-nrf:

PR head: 356e8d9e928e20d39743096c3b4fc8b95fc85ac0
merge base: cdbb02a59f05aab6b67cf0cb00b53339d7c290b0
target head (main): d9bf4fb4e36e9dec123f4043b5580e55053c89b5
Diff

Github labels

Enabled Name Description
ci-disabled Disable the ci execution
ci-all-test Run all of ci, no test spec filtering will be done
ci-force-downstream Force execution of downstream even if twister fails
ci-run-twister Force run twister
ci-run-zephyr-twister Force run zephyr twister
List of changed files detected by CI (57)
applications
│  ├── asset_tracker_v2
│  │  │ prj.conf
include
│  ├── modem
│  │  │ lte_lc.h
lib
│  ├── location
│  │  │ Kconfig
│  ├── lte_link_control
│  │  ├── CMakeLists.txt
│  │  ├── Kconfig
│  │  ├── common
│  │  │  ├── CMakeLists.txt
│  │  │  ├── event_handler_list.c
│  │  │  ├── helpers.c
│  │  │  │ work_q.c
│  │  ├── include
│  │  │  ├── common
│  │  │  │  ├── event_handler_list.h
│  │  │  │  ├── helpers.h
│  │  │  │  │ work_q.h
│  │  │  ├── modules
│  │  │  │  ├── cereg.h
│  │  │  │  ├── cfun.h
│  │  │  │  ├── coneval.h
│  │  │  │  ├── cscon.h
│  │  │  │  ├── edrx.h
│  │  │  │  ├── mdmev.h
│  │  │  │  ├── ncellmeas.h
│  │  │  │  ├── periodicsearchconf.h
│  │  │  │  ├── psm.h
│  │  │  │  ├── rai.h
│  │  │  │  ├── redmob.h
│  │  │  │  ├── xfactoryreset.h
│  │  │  │  ├── xmodemsleep.h
│  │  │  │  ├── xsystemmode.h
│  │  │  │  │ xt3412.h
│  │  ├── lte_lc.c
│  │  ├── lte_lc_modem_hooks.c
│  │  ├── modules
│  │  │  ├── CMakeLists.txt
│  │  │  ├── Kconfig
│  │  │  ├── cereg.c
│  │  │  ├── cfun.c
│  │  │  ├── coneval.c
│  │  │  ├── cscon.c
│  │  │  ├── edrx.c
│  │  │  ├── mdmev.c
│  │  │  ├── ncellmeas.c
│  │  │  ├── periodicsearchconf.c
│  │  │  ├── psm.c
│  │  │  ├── rai.c
│  │  │  ├── redmob.c
│  │  │  ├── xfactoryreset.c
│  │  │  ├── xmodemsleep.c
│  │  │  ├── xsystemmode.c
│  │  │  │ xt3412.c
modules
│  ├── memfault-firmware-sdk
│  │  │ Kconfig
samples
│  ├── cellular
│  │  ├── battery
│  │  │  │ prj.conf
│  │  ├── gnss
│  │  │  │ prj.conf
│  │  ├── location
│  │  │  │ prj.conf
│  │  ├── modem_shell
│  │  │  │ prj.conf
│  │  ├── nrf_cloud_multi_service
│  │  │  │ prj.conf
│  │  ├── nrf_cloud_rest_cell_location
│  │  │  │ prj.conf
│  │  ├── udp
│  │  │  │ prj.conf
subsys
│  ├── net
│  │  ├── lib
│  │  │  ├── lwm2m_client_utils
│  │  │  │  │ Kconfig
tests
│  ├── lib
│  │  ├── location
│  │  │  │ prj.conf
│  │  ├── lte_lc_api
│  │  │  │ prj.conf

Outputs:

Toolchain

Version: 9583beca34
Build docker image: docker-dtr.nordicsemi.no/sw-production/ncs-build:9583beca34_81ed5a52d6

Test Spec & Results: ✅ Success; ❌ Failure; 🟠 Queued; 🟡 Progress; ◻️ Skipped; ⚠️ Quarantine

  • ◻️ Toolchain - Skipped: existing toolchain is used
  • ❌ Build twister
    • sdk-nrf test count: 320
  • ❌ Integration tests
    • ❌ test-fw-nrfconnect-nrf-iot_cloud
    • ❌ test-fw-nrfconnect-nrf-iot_zephyr_lwm2m
    • ❌ test-fw-nrfconnect-nrf-iot_samples
    • ❌ test-fw-nrfconnect-nrf-iot_lwm2m
    • ❌ test-fw-nrfconnect-nrf-iot_thingy91
    • ❌ test-fw-nrfconnect-nrf-iot_mosh
    • ❌ test-fw-nrfconnect-nrf-iot_positioning
    • ⚠️ test-fw-nrfconnect-fw-update
Disabled integration tests
    • desktop52_verification
    • doc-internal
    • test_ble_nrf_config
    • test-fw-nrfconnect-apps
    • test-fw-nrfconnect-ble_mesh
    • test-fw-nrfconnect-ble_samples
    • test-fw-nrfconnect-boot
    • test-fw-nrfconnect-chip
    • test-fw-nrfconnect-fem
    • test-fw-nrfconnect-nfc
    • test-fw-nrfconnect-nrf-iot_libmodem-nrf
    • test-fw-nrfconnect-nrf-iot_nrf_provisioning
    • test-fw-nrfconnect-nrf-iot_serial_lte_modem
    • test-fw-nrfconnect-nrf_crypto
    • test-fw-nrfconnect-proprietary_esb
    • test-fw-nrfconnect-ps
    • test-fw-nrfconnect-rpc
    • test-fw-nrfconnect-rs
    • test-fw-nrfconnect-tfm
    • test-fw-nrfconnect-thread
    • test-fw-nrfconnect-zigbee
    • test-low-level
    • test-sdk-audio
    • test-sdk-dfu
    • test-sdk-find-my
    • test-sdk-mcuboot
    • test-sdk-pmic-samples
    • test-sdk-sidewalk
    • test-sdk-wifi

Note: This message is automatically posted and updated by the CI

@NordicBuilder
Copy link
Contributor

You can find the documentation preview for this PR at this link. It will be updated about 10 minutes after the documentation build succeeds.

Note: This comment is automatically posted by the Documentation Publishing GitHub Action.

config LTE_LC_XSYSTEMMODE
bool "Enable LTE XT3412 functionalities"
default y
depends on !LTE_NETWORK_MODE_DEFAULT
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

MOSH doesn't compile with this dependency. Not sure what the intention of this is.

Copy link
Contributor Author

@MirkoCovizzi MirkoCovizzi Sep 12, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was experimenting, targeting https_client sample which uses lte_net_if.

@MirkoCovizzi MirkoCovizzi force-pushed the llc-refactor branch 4 times, most recently from 00fe095 to 62d626e Compare September 13, 2024 14:09
@MirkoCovizzi MirkoCovizzi changed the title [WIP] lib: lte_link_control: divide into modules [WIP] lib: lte_link_control: refactor into modules Sep 13, 2024
@MirkoCovizzi MirkoCovizzi force-pushed the llc-refactor branch 4 times, most recently from ab799b5 to 1a17a8d Compare September 16, 2024 08:29
@MirkoCovizzi MirkoCovizzi marked this pull request as ready for review September 16, 2024 08:33
@MirkoCovizzi MirkoCovizzi requested review from jhn-nordic and simensrostad and removed request for a team September 16, 2024 08:57
@MirkoCovizzi MirkoCovizzi marked this pull request as draft September 16, 2024 10:20
@MirkoCovizzi MirkoCovizzi force-pushed the llc-refactor branch 2 times, most recently from 6c7a95e to 106e820 Compare September 20, 2024 12:43
@MirkoCovizzi MirkoCovizzi force-pushed the llc-refactor branch 4 times, most recently from 034f309 to ed05ed4 Compare September 26, 2024 14:52
@MirkoCovizzi MirkoCovizzi marked this pull request as ready for review September 26, 2024 15:00
@MirkoCovizzi MirkoCovizzi requested review from a team as code owners September 26, 2024 15:00
@MirkoCovizzi MirkoCovizzi force-pushed the llc-refactor branch 5 times, most recently from cba3c5a to 13b4862 Compare September 27, 2024 14:03
@MirkoCovizzi MirkoCovizzi requested a review from a team as a code owner September 27, 2024 14:03
Divides the LTE Link Controller into modules.

Signed-off-by: Mirko Covizzi <mirko.covizzi@nordicsemi.no>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
changelog-entry-required Update changelog before merge. Remove label if entry is not needed or already added.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants