diff --git a/subsys/shell/backends/shell_telnet.c b/subsys/shell/backends/shell_telnet.c index c2bcada140f..947e5fcab44 100644 --- a/subsys/shell/backends/shell_telnet.c +++ b/subsys/shell/backends/shell_telnet.c @@ -248,6 +248,8 @@ static void telnet_accept(struct net_context *client, int error, void *user_data) { + int ret; + if (error) { LOG_ERR("Error %d", error); goto error; @@ -271,6 +273,14 @@ static void telnet_accept(struct net_context *client, sh_telnet->client_ctx = client; + /* Disable echo - if command handling is enabled we reply that we don't + * support echo. + */ + ret = shell_echo_set(sh_telnet->shell_context, false); + if (ret < 0) { + LOG_ERR("Failed to disable echo, err: %d", ret); + } + return; error: net_context_put(client);