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: 9

Inputs:

Sources:

sdk-nrf: PR head: 913980c1be51b1b4d0d3a5aa53659f6f90020bf4

more details

sdk-nrf:

PR head: 913980c1be51b1b4d0d3a5aa53659f6f90020bf4
merge base: 886f69183aa56f501eba5acc0ccaf4aa9e07221f
target head (main): 886f69183aa56f501eba5acc0ccaf4aa9e07221f
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
    • sdk-nrf test count: 595
  • ❌ Integration tests
    • ❌ test_ble_nrf_config
    • ❌ test-fw-nrfconnect-ble_samples
    • ❌ test-fw-nrfconnect-rpc
    • ❌ test-fw-nrfconnect-rs
    • ❌ test-fw-nrfconnect-fem
    • ❌ test-sdk-dfu
    • ❌ test-fw-nrfconnect-ps
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_libmodem-nrf
    • 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 :).

subsys/nrf_rpc/dev_info/client/dev_info_client.c Outdated Show resolved Hide resolved
subsys/nrf_rpc/dev_info/client/dev_info_client.c Outdated Show resolved Hide resolved
subsys/nrf_rpc/dev_info/client/dev_info_client.c Outdated Show resolved Hide resolved
@lmaciejonczyk lmaciejonczyk removed the DNM label Jan 24, 2025
@lmaciejonczyk lmaciejonczyk force-pushed the rpc_remote_shell branch 3 times, most recently from b59b401 to aed9af2 Compare January 24, 2025 13:28
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]>
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