Skip to content

[nrf noup] Support intermediary SLM optimized modem UART backend #3021

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 1 commit into from
Jul 11, 2025

Conversation

bjarki-andreasen
Copy link
Contributor

@bjarki-andreasen bjarki-andreasen commented Jul 4, 2025

This noup does the following:

  • Adds the modem_backend_uart_slm modem backend which is optimized for UART communication to SLM.

The noup is intended to live until upstream zephyr has proper consistent RTS/CTS flow control support across multiple drivers, and DTR, RTS and CTS support has been added to the upstream modem UART backends, and lastly, SLM has been updated to use DTR, so everything is in sync.

Ask Bjarki Arge Andreasen, Markus Lassila or Seppo Takalo when this noup is to be altered as part of an upmerge for example.

@MarkusLassila
Copy link
Contributor

MarkusLassila commented Jul 7, 2025

Pushed the implementation for the SLM specific modem backend.

Removed the cellular_modem changes at this point. They are to be restored when DTR/DSR is implemented.

@MarkusLassila
Copy link
Contributor

@bjarki-andreasen: Please take a look at the changes. I am looking to combine the changes and remove the WIP.

@bjarki-andreasen
Copy link
Contributor Author

bjarki-andreasen commented Jul 8, 2025

@MarkusLassila many parts of the first commit are missing, like integration with modem_cellular, this PR on its own is not usable without a new cellular driver otherwise. If this change is only neccesary for SLM, and not to be used with the modem_cellular driver, then this can be moved to the SLM application instead :)

@MarkusLassila
Copy link
Contributor

MarkusLassila commented Jul 8, 2025

@MarkusLassila many parts of the first commit are missing, like integration with modem_cellular, this PR on its own is not usable without a new cellular driver otherwise. If this change is only neccesary for SLM, and not to be used with the modem_cellular driver, then this can be moved to the SLM application instead :)

@bjarki-andreasen: I only removed the modem_cellular changes, because they are not currently needed. There is no possibility for AT#XSLEEP=2. See below comment:

Removed the cellular_modem changes at this point. They are to be restored when DTR/DSR is implemented.

While this particular change is necessary only for SLM (or at least that is what I think that this point), further development will affect also modem_cellular and possibly other samples, so I would not want this to be part of SLM at this point.

I can restore modem_cellular parts, if that helps proceeding with this.

@bjarki-andreasen
Copy link
Contributor Author

bjarki-andreasen commented Jul 8, 2025

I can restore modem_cellular parts, if that helps proceeding with this.

No, please don't restore anything not needed :) But the scope of the UART SLM backend must be clear to know if a noup or simply downstream addition is needed. If its just a backend to be used by the SLM application, we can just add the backend to sdk-nrf, no need to touch sdk-zephyr at all.

Removed the cellular_modem changes at this point. They are to be restored when DTR/DSR is implemented.

DTR should be implemented upstream, so when we get there there will be no need for a downstream UART SLM backend to be inserted into modem_cellular anyway right?

@MarkusLassila
Copy link
Contributor

MarkusLassila commented Jul 8, 2025

DTR should be implemented upstream, so when we get there there will be no need for a downstream UART SLM backend to be inserted into modem_cellular anyway right?

Given the timetable, it is almost certain that the DTR will be implemented in downstream first and later upstreamed.

ok, then the commits in this PR can be squashed, and the commit can later be modified to have DTR added.

But the scope of the UART SLM backend must be clear to know...

This is difficult at this point. Having this as a noup allows flexibility to use this in samples, which we will need. It also allows for the Apache license, so it can be used with pure-zephyr, if needed by some customers.

If the scope is unknown, then yeah, noup is the safer option.

@MarkusLassila MarkusLassila force-pushed the modem-backend-uart-slm branch 2 times, most recently from a2a8b70 to 8b643ac Compare July 8, 2025 10:37
@MarkusLassila MarkusLassila marked this pull request as ready for review July 8, 2025 10:39
@MarkusLassila MarkusLassila force-pushed the modem-backend-uart-slm branch 2 times, most recently from ae0152e to af13ea5 Compare July 8, 2025 10:49
@MarkusLassila MarkusLassila requested a review from nordicjm July 8, 2025 12:28
@MarkusLassila
Copy link
Contributor

@bjarki-andreasen, @nordicjm: Could this be merged?

@@ -64,3 +64,26 @@ endif # MODEM_BACKEND_UART_ASYNC_HWFC
endif # MODEM_BACKEND_UART_ASYNC

endif # MODEM_BACKEND_UART

config MODEM_BACKEND_UART_SLM
Copy link
Contributor

Choose a reason for hiding this comment

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

Might be a bit confusing to have MODEM_BACKEND_UART be n when using MODEM_BACKEND_UART_SLM.

Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe instead you could just add a config MODEM_BACKEND_UART_ASYNC_SLM and make use of the existing MODEM_BACKEND_UART_ASYNC as it has all the configs you need? Well, as you want really.

Copy link
Contributor

Choose a reason for hiding this comment

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

This allows for a complete split from the MODEM_BACKEND_UART so that modem_backend_uart.c is not included.

That said, there is going to be further development on this area, which means that this will be reconsidered.

This noup does the following:
- Adds the  modem_backend_uart_slm modem backend which is optimized
  for UART communication to SLM.

The noup is intended to live until upstream zephyr has proper
consistent RTS/CTS flow control support across multiple drivers,
and DTR, RTS and CTS support has been added to the upstream modem
UART backends, and lastly, SLM has been updated to use DTR, so
everything is in sync.

Ask Bjarki Arge Andreasen, Markus Lassila or Seppo Takalo when this
noup is to be altered as part of an upmerge for example.

Signed-off-by: Bjarki Arge Andreasen <[email protected]>
Signed-off-by: Markus Lassila <[email protected]>
@MarkusLassila MarkusLassila force-pushed the modem-backend-uart-slm branch from af13ea5 to b8c2f24 Compare July 10, 2025 11:54
@rlubos rlubos merged commit 964736d into nrfconnect:main Jul 11, 2025
18 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.

5 participants