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

Integrated Zephyr shell with the CHIP lib shell #7848

Merged

Conversation

kkasperczyk-no
Copy link
Contributor

Problem

Currently there was a standalone CHIP shell example using CHIP lib shell and there was a Zephyr shell used only by
nrfconnect platform with some specific commands. The goal is to use for Zephyr based platforms the CHIP lib shell
but with Zephyr shell backend integrated and be able to use it in every example, not only standalone shell app.

Change overview

For nrfconnect:

  • Removed custom Zephyr-based ChipShell.cpp and CONFIG_CHIP_ZEPHYR_SHELL option.
  • Renamed CONFIG_CHIP_STANDALONE_SHELL to the CONFIG_CHIP_LIB_SHELL.
  • Aligned console docs to the new commands.

For all:

  • Extended existing shell commands by ble adv , onboardingcodes <qrcode|qrcodeurl|manualpairingcode>,
    nfc <start|stop|state> and device factoryreset.
  • Added MainLoopZephyr.cpp file for Zephyr-based platforms, that enables Zephyr shell and is kind of integration layer
    between CHIP shell and Zephyr shell.
  • Removed from streamer_zephyr.cpp part not using Zephyr shell.

Testing

Tested manually that commands are handled properly and returns expected values. Test were done only on nrfconnect platform as change affects only that one.

@Damian-Nordic
Copy link
Contributor

Looks like you need to exclude "${chip_root}/src/lib/shell" from the Android build or fix Mdns.cpp so that it doesn't assume the platform layer exists.

Currently there was a standalone CHIP shell example using
CHIP lib shell and there was a Zephyr shell used only by
nrfconnect platform with some specific commands. The goal
is to use for Zephyr based platforms the CHIP lib shell
but with Zephyr shell backend integrated and be able to use it
in every example, not only standalone shell app.

For nrfconnect:
* Removed custom Zephyr-based ChipShell.cpp
and CONFIG_CHIP_ZEPHYR_SHELL option.
* Renamed CONFIG_CHIP_STANDALONE_SHELL to the CONFIG_CHIP_LIB_SHELL.
* Aligned console docs to the new commands.

For all:
* Extended existing shell commands by ble adv <state>,
onboardingcodes <qrcode|qrcodeurl|manualpairingcode>,
nfc <start|stop|state> and device factoryreset.
* Added MainLoopZephyr.cpp file for Zephyr-based platforms,
that enables Zephyr shell and is kind of integration layer
between CHIP shell and Zephyr shell.
* Removed from streamer_zephyr.cpp part not using Zephyr shell.
@kkasperczyk-no
Copy link
Contributor Author

@Damian-Nordic I hope now it should be fine. I removed building lib/shell by default even if it is not enabled and also protected building app/server with platform == none.

@mspang mspang merged commit 2f0c691 into project-chip:master Jun 24, 2021
nikita-s-wrk pushed a commit to nikita-s-wrk/connectedhomeip that referenced this pull request Sep 23, 2021
Currently there was a standalone CHIP shell example using
CHIP lib shell and there was a Zephyr shell used only by
nrfconnect platform with some specific commands. The goal
is to use for Zephyr based platforms the CHIP lib shell
but with Zephyr shell backend integrated and be able to use it
in every example, not only standalone shell app.

For nrfconnect:
* Removed custom Zephyr-based ChipShell.cpp
and CONFIG_CHIP_ZEPHYR_SHELL option.
* Renamed CONFIG_CHIP_STANDALONE_SHELL to the CONFIG_CHIP_LIB_SHELL.
* Aligned console docs to the new commands.

For all:
* Extended existing shell commands by ble adv <state>,
onboardingcodes <qrcode|qrcodeurl|manualpairingcode>,
nfc <start|stop|state> and device factoryreset.
* Added MainLoopZephyr.cpp file for Zephyr-based platforms,
that enables Zephyr shell and is kind of integration layer
between CHIP shell and Zephyr shell.
* Removed from streamer_zephyr.cpp part not using Zephyr shell.
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.

4 participants