Skip to content

Conversation

@MarkusLassila
Copy link
Contributor

Previously, it was expected that the modem would immediately disconnect and close the PPP link, when the network was lost
(+CEREG: 4 is received). Failure to do so, would result in modem attempting to chat with dlci2 channel, where as cellular
modem driver would drop to dlci1. This would show as dial script timing out, which would freeze cellular modem driver.

Adding dormant state enables graceful disconnection of PPP-link when the network is lost. This allows the modems which do
not automatically close with network link loss to close based on PPP link closure.

When PPP net_if is changed to dormant, the PPP connection
is terminated asynchronously. This is used so that the driver
can terminate the PPP connection gracefully.

Note: net_if_down() is not used as it would require synchronous
operation which would block the system workqueue thus causing
deadlock.

Signed-off-by: Markus Lassila <markus.lassila@nordicsemi.no>
rerickson1
rerickson1 previously approved these changes May 12, 2025
Copy link
Contributor

@pdgendt pdgendt left a comment

Choose a reason for hiding this comment

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

Couple of indentation nits

Previously, it was expected that the modem would immediately
disconnect and close the PPP link, when the network was lost
(+CEREG: 4 is received). Failure to do so, would result in
modem attempting to chat with dlci2 channel, where as cellular
modem driver would drop to dlci1. This would show as dial
script timing out, which would freeze cellular modem driver.

Adding dormant state enables graceful disconnection of PPP-link
when the network is lost. This allows the modems which do
not automatically close with network link loss to close
based on PPP link closure.

Signed-off-by: Markus Lassila <markus.lassila@nordicsemi.no>
@MarkusLassila MarkusLassila dismissed stale reviews from bjarki-andreasen and rerickson1 via ec6bf18 May 13, 2025 09:41
@MarkusLassila MarkusLassila force-pushed the upstream-zephyr-cellular-modem-fix-network-loss branch from 7dda543 to ec6bf18 Compare May 13, 2025 09:41
@sonarqubecloud
Copy link

@kartben kartben merged commit 5b6a865 into zephyrproject-rtos:main May 14, 2025
27 checks passed
@olalonde
Copy link
Contributor

I think you accidentally removed the body of the modem_cellular_on_carrier_on_state_leave function. Or was it intentional? See this issue: #90084

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants