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

mitul.parmar
Posts: 2
Joined: Fri Apr 16, 2021 11:09 am

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

Postby mitul.parmar » Tue Apr 20, 2021 12:25 pm

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!!

ESP_Sprite
Posts: 4877
Joined: Thu Nov 26, 2015 4:08 am

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

Postby ESP_Sprite » Wed Apr 21, 2021 1:49 am

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.

louisthetall
Posts: 8
Joined: Thu Jan 04, 2018 8:36 pm

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

Postby louisthetall » Wed Apr 28, 2021 8:51 pm

- 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?

Return to “ESP-IDF”

Who is online

Users browsing this forum: No registered users and 39 guests