Logging serial port receive data

CharlesSeartech
Posts: 19
Joined: Fri Oct 06, 2017 10:27 am

Logging serial port receive data

Postby CharlesSeartech » Fri Oct 06, 2017 10:36 am

Hello,

I would like to know if it's possible to receive the serial data from the logging serial port (UART0)?
I would like to use the logging until I need to communicate with the ESP32 then I'll use:
esp_log_level_set("*", ESP_LOG_ERROR);
to disable the logging until I have completed my serial setup. I can then re-enable the logging.

Would if be advisable to use a printf() to send data to the serial port or should I use another option?

Regards,
Charles

User avatar
kolban
Posts: 1683
Joined: Mon Nov 16, 2015 4:43 pm
Location: Texas, USA

Re: Logging serial port receive data

Postby kolban » Sun Nov 19, 2017 4:03 am

To switch off all error logging, you might try "esp_log_level_set("*", ESP_LOG_NONE);"

You can also intercept logging by supplying your own function to be called to log. This is performed via the function esp_log_set_vprintf() ... however I don't know how to set it back. I'll raise a feature request to have the old function returned when we set a new one.
Free book on ESP32 available here: https://leanpub.com/kolban-ESP32

Who is online

Users browsing this forum: No registered users and 95 guests