Page 1 of 1

How do I run CLI console and default log of esp32 on two seperate UARTs?

Posted: Tue Apr 20, 2021 12:25 pm
by mitul.parmar
Hello,

In my project I have to develop CLI console using UART1. for that I used esp-idf/examples/system/console example.
- It works fine I can run it on both the uarts UART0 as well as UART1.
- I can successfully change the default console uart from menuconfig.

Currently, I am getting both the CLI console and debug logs on same UART (Whichever uart we select from the menuconfig).

what I require is:
- How to separate CLI console on UART1 and debug logs on UART0?
- Is it possible to have CLI console on UART1 without setting it as a default UART?
- Is there any way I can switch default UART in run time without using menuconfig?

Thank you for helping out!!

Re: How do I run CLI console and default log of esp32 on two seperate UARTs?

Posted: Wed Apr 21, 2021 1:49 am
by ESP_Sprite
You can probably close stdin/stdout in the console task, and re-open them using the other UART. I'm not exactly sure how that works if any of the console commands try to log an error, though.

Re: How do I run CLI console and default log of esp32 on two seperate UARTs?

Posted: Wed Apr 28, 2021 8:51 pm
by louisthetall
- Is there any way I can switch default UART in run time without using menuconfig?
I would be very interested in know if this is possible. Where you able to learn more?