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

nrf_rpc: Add functionality for invoking remote shell cmd via rpc #20060

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

Conversation

lmaciejonczyk
Copy link
Contributor

The functionality allows the nrf_rpc client to invoke nrf_rpc server shell command and obtain the command's output.

This commit adds the new nrf_rpc client shell subcommand: 'remote_shell'.

Example of use:

rpc remote_shell device list

devices:

  • clock@10e000 (READY)
  • gpio@10a000 (READY)
  • gpio@d8200 (READY)
  • gpio@50400 (READY)
  • psa-rng (READY)
  • uart@c7000 (READY)
  • uart@c6000 (READY)
  • spi@4a000 (READY)
  • rram-controller@5004b000 (READY)
  • mx25r6435f@0 (READY)
  • ieee802154 (READY)
  • temp@d7000 (READY)

@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 Jan 24, 2025
@NordicBuilder
Copy link
Contributor

NordicBuilder commented Jan 24, 2025

CI Information

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

Inputs:

Sources:

sdk-nrf: PR head: dc94e0c854a25c3c94ea827527b3e5001476822c

more details

sdk-nrf:

PR head: dc94e0c854a25c3c94ea827527b3e5001476822c
merge base: 115359d6f2e3970e2bf5a17fefb2608c86a3917e
target head (main): 115359d6f2e3970e2bf5a17fefb2608c86a3917e
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 (7)
include
│  ├── nrf_rpc
│  │  │ nrf_rpc_dev_info.h
samples
│  ├── nrf_rpc
│  │  ├── protocols_serialization
│  │  │  ├── client
│  │  │  │  ├── src
│  │  │  │  │  │ dev_info_shell.c
│  │  │  ├── server
│  │  │  │  │ Kconfig
subsys
│  ├── nrf_rpc
│  │  ├── dev_info
│  │  │  ├── Kconfig
│  │  │  ├── client
│  │  │  │  │ dev_info_client.c
│  │  │  ├── common
│  │  │  │  │ dev_info_rpc_ids.h
│  │  │  ├── server
│  │  │  │  │ dev_info_server.c

Outputs:

Toolchain

Version: 342151af73
Build docker image: docker-dtr.nordicsemi.no/sw-production/ncs-build:342151af73_912848a074

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

  • ◻️ Toolchain - Skipped: existing toolchain is used
  • ✅ Build twister - Skipped: Skipping Build & Test as it succeeded in a previous run: 10
  • ✅ Integration tests
    • ✅ test_ble_nrf_config
    • ✅ test-fw-nrfconnect-ble_samples - Skipped: Job was skipped as it succeeded in a previous run
    • ✅ test-fw-nrfconnect-rpc - Skipped: Job was skipped as it succeeded in a previous run
    • ✅ test-fw-nrfconnect-rs - Skipped: Job was skipped as it succeeded in a previous run
    • ✅ test-fw-nrfconnect-fem - Skipped: Job was skipped as it succeeded in a previous run
    • ✅ test-sdk-dfu - Skipped: Job was skipped as it succeeded in a previous run
    • ✅ test-fw-nrfconnect-ps - Skipped: Job was skipped as it succeeded in a previous run
Disabled integration tests
    • desktop52_verification
    • doc-internal
    • test-fw-nrfconnect-apps
    • test-fw-nrfconnect-ble_mesh
    • test-fw-nrfconnect-boot
    • test-fw-nrfconnect-chip
    • test-fw-nrfconnect-nfc
    • test-fw-nrfconnect-nrf-iot_lwm2m
    • test-fw-nrfconnect-nrf-iot_mosh
    • test-fw-nrfconnect-nrf-iot_positioning
    • test-fw-nrfconnect-nrf-iot_samples
    • test-fw-nrfconnect-nrf-iot_serial_lte_modem
    • test-fw-nrfconnect-nrf-iot_thingy91
    • test-fw-nrfconnect-nrf-iot_zephyr_lwm2m
    • test-fw-nrfconnect-nrf_crypto
    • test-fw-nrfconnect-tfm
    • test-fw-nrfconnect-thread
    • test-fw-nrfconnect-zigbee
    • test-low-level
    • test-sdk-audio
    • test-sdk-find-my
    • test-sdk-mcuboot
    • test-sdk-pmic-samples
    • test-sdk-sidewalk
    • test-sdk-wifi
    • test-secdom-samples-public

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

@lmaciejonczyk lmaciejonczyk marked this pull request as ready for review January 24, 2025 08:31
@lmaciejonczyk lmaciejonczyk requested review from a team as code owners January 24, 2025 08:31
@NordicBuilder
Copy link
Contributor

You can find the documentation preview for this PR at this link.

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

Copy link
Contributor

@Damian-Nordic Damian-Nordic left a comment

Choose a reason for hiding this comment

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

Looks neat, just a couple of nits found. I just wonder if this should belong to the "device information" group. This group was meant to be used for retrieving information about the device, such as hardware/software versions while running a shell command seems to be a more general/functionality. It won't block this if it's just me but I would move this to a separate group :).

@lmaciejonczyk lmaciejonczyk removed the DNM label Jan 24, 2025
@lmaciejonczyk lmaciejonczyk force-pushed the rpc_remote_shell branch 4 times, most recently from aed9af2 to 913980c Compare January 24, 2025 14:58
The functionality allows the nrf_rpc client to invoke nrf_rpc server
shell command and obtain the command's output.

This commit adds the new nrf_rpc client shell subcommand: 'remote_shell'

Example of use:

rpc remote_shell device list

devices:
- clock@10e000 (READY)
- gpio@10a000 (READY)
- gpio@d8200 (READY)
- gpio@50400 (READY)
- psa-rng (READY)
- uart@c7000 (READY)
- uart@c6000 (READY)
- spi@4a000 (READY)
- rram-controller@5004b000 (READY)
- mx25r6435f@0 (READY)
- ieee802154 (READY)
- temp@d7000 (READY)

Signed-off-by: Lukasz Maciejonczyk <[email protected]>
@lmaciejonczyk
Copy link
Contributor Author

@nrfconnect/ncs-si-muffin @nrfconnect/ncs-co-drivers any comments?

@lmaciejonczyk
Copy link
Contributor Author

@pdunaj @anangl Could you take a look?

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.

5 participants