From 8318adb448b56d79713e77e57fcfc4080f8c6927 Mon Sep 17 00:00:00 2001 From: Peter Dragun Date: Tue, 29 Oct 2024 13:51:31 +0100 Subject: [PATCH] fix: recommend using Windows Terminal in case of issues with escape sequences Closes https://github.com/espressif/esp-idf-monitor/issues/17 --- components/console/esp_console_common.c | 2 +- examples/system/console/advanced/README.md | 6 +++++- .../system/console/advanced/main/console_example_main.c | 2 +- examples/system/console/basic/README.md | 6 +++++- 4 files changed, 12 insertions(+), 4 deletions(-) diff --git a/components/console/esp_console_common.c b/components/console/esp_console_common.c index 416976dccb..395aa272f7 100644 --- a/components/console/esp_console_common.c +++ b/components/console/esp_console_common.c @@ -154,7 +154,7 @@ void esp_console_repl_task(void *args) printf("\r\n" "Your terminal application does not support escape sequences.\n\n" "Line editing and history features are disabled.\n\n" - "On Windows, try using Putty instead.\r\n"); + "On Windows, try using Windows Terminal or Putty instead.\r\n"); } linenoiseSetMaxLineLen(repl_com->max_cmdline_length); diff --git a/examples/system/console/advanced/README.md b/examples/system/console/advanced/README.md index 6a520e850d..412ba5c0bf 100644 --- a/examples/system/console/advanced/README.md +++ b/examples/system/console/advanced/README.md @@ -160,10 +160,14 @@ Use UP/DOWN arrows to navigate through command history. Press TAB when typing command name to auto-complete. Your terminal application does not support escape sequences. Line editing and history features are disabled. -On Windows, try using Putty instead. +On Windows, try using Windows Terminal or Putty instead. esp32> ``` +### Escape Sequences on Windows 10 + +When using the default command line or PowerShell on Windows 10, you may see a message indicating that the console does not support escape sequences, as shown in the above output. To avoid such issues, it is recommended to run the serial monitor under [Windows Terminal](https://en.wikipedia.org/wiki/Windows_Terminal), which supports all required escape sequences for the app, unlike the default terminal. The main escape sequence of concern is the Device Status Report (`0x1b[5n`), which is used to check terminal capabilities. Any response to this sequence indicates support. This should not be an issue on Windows 11, where Windows Terminal is the default. + ### No USB port appears On Windows 10, macOS, Linux, USB CDC devices do not require additional drivers to be installed. diff --git a/examples/system/console/advanced/main/console_example_main.c b/examples/system/console/advanced/main/console_example_main.c index 1ca7aee2e8..b02fc8fb7b 100644 --- a/examples/system/console/advanced/main/console_example_main.c +++ b/examples/system/console/advanced/main/console_example_main.c @@ -118,7 +118,7 @@ void app_main(void) printf("\n" "Your terminal application does not support escape sequences.\n" "Line editing and history features are disabled.\n" - "On Windows, try using Putty instead.\n"); + "On Windows, try using Windows Terminal or Putty instead.\n"); } /* Main loop */ diff --git a/examples/system/console/basic/README.md b/examples/system/console/basic/README.md index 42387e5c62..cd17e6af15 100644 --- a/examples/system/console/basic/README.md +++ b/examples/system/console/basic/README.md @@ -147,6 +147,10 @@ Use UP/DOWN arrows to navigate through command history. Press TAB when typing command name to auto-complete. Your terminal application does not support escape sequences. Line editing and history features are disabled. -On Windows, try using Putty instead. +On Windows, try using Windows Terminal or Putty instead. esp32> ``` + +### Escape Sequences on Windows 10 + +When using the default command line or PowerShell on Windows 10, you may see a message indicating that the console does not support escape sequences, as shown in the above output. To avoid such issues, it is recommended to run the serial monitor under [Windows Terminal](https://en.wikipedia.org/wiki/Windows_Terminal), which supports all required escape sequences for the app, unlike the default terminal. The main escape sequence of concern is the Device Status Report (`0x1b[5n`), which is used to check terminal capabilities. Any response to this sequence indicates support. This should not be an issue on Windows 11, where Windows Terminal is the default.