Skip to content

Commit 8b905ab

Browse files
[nrfconnect] Remove shell initialization from chef app (#33924)
On Zephyr-based platforms, shell commands are initialized automatically on the system boot so they don't have to be manually registered. In fact, initializing OpenThread CLI at this stage replaces the SRP client callback registered by the Matter stack and breaks SRP in chef app.
1 parent ffc5727 commit 8b905ab

File tree

1 file changed

+0
-27
lines changed

1 file changed

+0
-27
lines changed

examples/chef/nrfconnect/main.cpp

-27
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,6 @@
1515
* limitations under the License.
1616
*/
1717

18-
#include <lib/shell/Engine.h>
19-
2018
#include <app/server/Dnssd.h>
2119
#include <lib/core/CHIPCore.h>
2220
#include <lib/support/Base64.h>
@@ -35,10 +33,6 @@
3533

3634
#include <zephyr/logging/log.h>
3735

38-
#if CONFIG_ENABLE_CHIP_SHELL || CONFIG_CHIP_LIB_SHELL
39-
#include <ChipShellCollection.h>
40-
#endif
41-
4236
#ifdef CONFIG_CHIP_PW_RPC
4337
#include "Rpc.h"
4438
#endif
@@ -53,7 +47,6 @@
5347
LOG_MODULE_REGISTER(app, CONFIG_CHIP_APP_LOG_LEVEL);
5448

5549
using namespace chip;
56-
using namespace chip::Shell;
5750
using namespace chip::DeviceLayer;
5851

5952
namespace {
@@ -159,27 +152,7 @@ int main()
159152
ChipLogError(AppServer, "OpenBasicCommissioningWindow() failed");
160153
}
161154

162-
#if CONFIG_CHIP_LIB_SHELL
163-
int rc = Engine::Root().Init();
164-
if (rc != 0)
165-
{
166-
ChipLogError(AppServer, "Streamer initialization failed: %d", rc);
167-
return 1;
168-
}
169-
170-
cmd_misc_init();
171-
cmd_otcli_init();
172-
#endif
173-
174-
#if CHIP_SHELL_ENABLE_CMD_SERVER
175-
cmd_app_server_init();
176-
#endif
177-
178155
chip::DeviceLayer::PlatformMgr().ScheduleWork(InitServer);
179156

180-
#if CONFIG_CHIP_LIB_SHELL
181-
Engine::Root().RunMainLoop();
182-
#endif
183-
184157
return 0;
185158
}

0 commit comments

Comments
 (0)