Page 1 of 1

Monitoring serial output without reset

Posted: Sun May 21, 2017 8:14 pm
by fesp32@joov.de
Is it possible to attach to a running ESP32 DevKitC on Linux, without resetting the ESP32?

Use case:
I use "make flash monitor" and all looks good. I leave the ESP32 running for a day or so and accidentally terminated the monitor. This leaves the ESP32 unaffected which is good. One day later, I would like to see what is currently printed on the serial console (there is continuous logging).

Using 'make monitor' or 'make simple_monitor' does not work: It always resets the ESP32 before getting any log messages. I would like to see the serial output without resetting the ESP32.

This is on Linux. Or is this impossible since RTS is used to reset the device?

Cheers,
Johannes

Re: Monitoring serial output without reset

Posted: Mon May 22, 2017 4:36 am
by kolban
The "make monitor" does appear to perform an ESP32 reset ... however if your ESP32 is running, executing a local serial terminal client such as putty or screen connects to the serial port without resetting and you will start to immediately see your output without a reset.

Re: Monitoring serial output without reset

Posted: Mon May 22, 2017 7:16 am
by fesp32@joov.de
Many thanks! Just attaching screen works! Why di dI not just try this? I should have just tried it. I was confused in thinking that the 'make monitor' and 'make simple_monitor' targets do some other required setup to get to the serial console, but just attaching a serial terminal works just like that. I should have just tried it out! :-)

I am using this command line on Linux in my setup:
screen /dev/ttyUSB0 115200

Anyway, 'make monitor' (and make 'simple_monitor') solve the problem to get the very first messages after a restart, which is otherwise hard to get. I now see the point of them.

Cheers,
Johannes