Page 1 of 1

esp32 monitor interpreter

Posted: Mon Dec 03, 2018 3:26 am
by peterglen
ESP32 Mon Shell

A simple monitor shell for the esp32. Type help to see a list of commands. This is meant to be a template for
your command additions. See 'reboot' command for an example on how to extend this interpreter.

This code is placed in the PD.

Code can be found at:

https://github.com/pglen/esp_inter

// The interpreter is simple to drive.

initparser();
printf("Type help for list of commands. Dumb terminal, no arrows etc.\n");

char tmp[64];
while (true)
{
printf("ESP32>> "); fflush(stdout);
get_term_str(tmp, sizeof(tmp));
printf("\n");

interpret(tmp);
vTaskDelay(50 / portTICK_RATE_MS);
}
// EOF

Sample Session:

I (193) wifi: mode : sta (30:ae:a4:20:80:98)
Type help for list of commands. Dumb terminal, no arrows etc.
ESP32>> help

Available functions:
echo noop mem reboot stat dump ? help
ESP32>> echo kkkk
kkkk
ESP32>> noop

ESP32>> reboot
reboot in 2 seconds.
I (659948) wifi: flush txq
.......

Peter Glen

Re: esp32 monitor interpreter

Posted: Mon Dec 03, 2018 3:33 am
by WiFive
Thanks for sharing. You didn't like console component?

Re: esp32 monitor interpreter

Posted: Mon Dec 03, 2018 3:42 am
by peterglen
WiFive wrote:
Mon Dec 03, 2018 3:33 am
Thanks for sharing. You didn't like console component?
Needed a really simple one. Plus, the console sample is incomplete.