Skip to content

samples: Add shell sample for PPP modem driver#86

Merged
SeppoTakalo merged 2 commits into
nrfconnect:mainfrom
SeppoTakalo:zephyr_modem_example
Dec 5, 2025
Merged

samples: Add shell sample for PPP modem driver#86
SeppoTakalo merged 2 commits into
nrfconnect:mainfrom
SeppoTakalo:zephyr_modem_example

Conversation

@SeppoTakalo

@SeppoTakalo SeppoTakalo commented Nov 18, 2025

Copy link
Copy Markdown
Contributor

Add Zephyr shell sample that uses PPP modem driver from Zephyr and allows debugging the network connection from shell commands.

Example configurations provided for native_sim and nRF54L15DK.

Commands that can be used:

  • net iface up 1
  • net iface down 1
  • net dns
  • net dns <HOST>
  • net ping <IP>
  • zperf tcp upload <IP> <PORT> <DURATION> <PAYLOAD_SIZE>

Example:
zperf tcp upload 212.237.217.41 5202 1 1K

Jira: SM-178

@SeppoTakalo SeppoTakalo requested review from a team, MarkusLassila and trantanen November 18, 2025 11:10
@SeppoTakalo SeppoTakalo force-pushed the zephyr_modem_example branch 4 times, most recently from 803dc3b to 2a9010c Compare November 18, 2025 12:12

@trantanen trantanen left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Thanks for putting this together. If you don't have time to fix nit-picking, I can handle that too.

Comment thread samples/shell_with_ppp/README.md Outdated
Comment thread samples/shell_with_ppp/README.md Outdated
Comment thread samples/shell_with_ppp/README.md Outdated
Comment thread samples/sm_ppp_shell/CMakeLists.txt

@MarkusLassila MarkusLassila left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Tried out with the native_sim, that complained about missing xterm, but it was not highlighted: sh: 1: xterm: not found

After adding xterm everything worked fine. 👍

Not something to address, but mentioning this in case we get complaints about this not working as it was bit difficult to spot.

Comment thread samples/shell_with_ppp/README.md Outdated
Comment thread samples/shell_with_ppp/README.md Outdated
Comment thread samples/shell_with_ppp/README.md Outdated
Comment thread samples/shell_with_ppp/README.md Outdated
Comment thread samples/shell_with_ppp/README.md Outdated
Comment thread samples/shell_with_ppp/README.md Outdated
Comment thread samples/shell_with_ppp/boards/native_sim.overlay Outdated
Comment thread samples/shell_with_ppp/README.md Outdated
@MarkusLassila

Copy link
Copy Markdown
Contributor

Add Zephyr shell sample that uses PPP modem driver from Zephyr and allows debugging the network connection from shell commands.

Example configurations provided for native_sim and nRF54L15DK.

Commands that can be used:

  • net iface up 1
  • net iface down 1
  • net dns
  • net dns <HOST>
  • net ping <IP>
  • zperf tcp upload <IP> <PORT> <DURATION> <PAYLOAD_SIZE>

Example: zperf tcp upload 212.237.217.41 5202 1 1K

The commands should be mentioned in the documentation.

@SeppoTakalo SeppoTakalo force-pushed the zephyr_modem_example branch 3 times, most recently from e5ec9ab to fbecbef Compare November 20, 2025 12:13
Comment thread doc/samples/ppp_modem_shell.rst Outdated
@SeppoTakalo SeppoTakalo requested review from a team, MarkusLassila and trantanen December 3, 2025 21:27
@SeppoTakalo SeppoTakalo force-pushed the zephyr_modem_example branch 2 times, most recently from bf8a78f to f821dc5 Compare December 3, 2025 22:03

@trantanen trantanen left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Great to have this sample! Especially the native_sim part is nice and also documentation becomes nice with the general samples/README.rst.

Comment thread doc/samples/sm_ppp_shell.rst Outdated
Comment thread doc/samples/sm_ppp_shell.rst
Comment thread doc/images/samples_overview.svg
Comment thread doc/images/samples_overview.svg
Comment thread doc/images/samples_overview.svg
Comment thread doc/samples/sm_ppp_shell.rst Outdated
Comment on lines +52 to +53
CONFIG_MODEM_LOG_LEVEL_DBG=y
CONFIG_MODEM_CMUX_LOG_LEVEL_DBG=y

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Do we want these on by default? Is it a lot of spam?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

True, it spams a bit, but not after the network is up and running.

Without these, it is impossible to see when device enters or exists the sleep mode, or when the modem driver starts up.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I'll leave the decision to you and @MarkusLassila

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I don't mind the CMUX logs in here. This may be the first point people run into CMUX, so showing them in here might even have a positive effect.

Comment thread doc/samples/sm_ppp_shell.rst Outdated
Comment thread doc/samples/sm_ppp_shell.rst Outdated
Comment thread samples/sm_ppp_shell/prj.conf
@SeppoTakalo SeppoTakalo force-pushed the zephyr_modem_example branch 2 times, most recently from 493b0bb to c105d95 Compare December 4, 2025 08:38
@SeppoTakalo SeppoTakalo requested a review from trantanen December 4, 2025 08:38
@trantanen trantanen requested a review from divipillai December 4, 2025 10:22

@MarkusLassila MarkusLassila left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Looks good. Some comments.


west build -b nrf54l15dk/nrf54l15/cpuapp

For the TrustZone-enabled variant:

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Should this refer to Trusted Firmware-M?

Comment thread doc/samples/sm_ppp_shell.rst Outdated
Comment thread doc/samples/sm_ppp_shell.rst Outdated
Comment thread doc/samples/sm_ppp_shell.rst
Comment thread doc/samples/sm_ppp_shell.rst Outdated
Comment thread doc/samples/sm_ppp_shell.rst
Comment on lines +52 to +53
CONFIG_MODEM_LOG_LEVEL_DBG=y
CONFIG_MODEM_CMUX_LOG_LEVEL_DBG=y

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I don't mind the CMUX logs in here. This may be the first point people run into CMUX, so showing them in here might even have a positive effect.

Add Zephyr shell sample that uses PPP modem driver from Zephyr
and allows debugging the network connection from shell commands.

Example configurations provided for native_sim and nRF54L15DK.

Signed-off-by: Seppo Takalo <seppo.takalo@nordicsemi.no>
Add documentation for PPP modem shell sample and move sample
descriptions to own index page.

Signed-off-by: Seppo Takalo <seppo.takalo@nordicsemi.no>
@SeppoTakalo SeppoTakalo merged commit 6cfbb3a into nrfconnect:main Dec 5, 2025
3 checks passed
@SeppoTakalo SeppoTakalo deleted the zephyr_modem_example branch December 5, 2025 08:08

@divipillai divipillai left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I had some comments on the docs and image needs to follow the Nordic guidelines. Since the PR is already merge, I will create a new PR to fix those.

@SeppoTakalo

Copy link
Copy Markdown
Contributor Author

I had some comments on the docs and image needs to follow the Nordic guidelines. Since the PR is already merge, I will create a new PR to fix those.

Sorry.. I might have been too quick on merging this as I have been waiting for few weeks to complete it.
I'll review your PR once you push it.

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.

4 participants