Disable print run time

If you are asking a question, please follow this template:

  1. My goal is: [Want to disable the debug print in run time]
  2. My actions are:
    [Using the ESP8266 UART port for communication with another device]
  3. The result I see is:
    [
    Debug message also sending to UART
    << esp_main.c:158 SDK: pm open,type:0 0
    ]
  4. My expectation & question is:
    [Any method to disable & enable the debug print to UART]

You can swap the UART0 flow control and data pins (cts, rts <-> rx, tx) and disable stderr_uart and stdout_uart or move them to UART1 (which is tx only).

Since I am testing a reference project from a company “Fanstel”.
They setup using init.js file only.

Where and how I can change or disable the " stderr_uart and stdout_uart" ?
Any link to a doc would be great. Thanks

stderr_uart and stdout_uart settings.
In mos.yml config_schema section:

  - ["debug.stdout_uart", -1]
  - ["debug.stderr_uart", -1]

You will still see some messages in the console until the configuration is modified.

To swap rx, tx with cts,rts have a look at api_uart.js and api_arch_uart.js for ESP8266

I can disable the debug by changing in mos.yml as suggested.
But why it require to swap data and control pins ??