esp32 monitor interpreter

peterglen
Posts: 27
Joined: Thu Mar 22, 2018 5:55 pm

esp32 monitor interpreter

Postby peterglen » Mon Dec 03, 2018 3:26 am

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

WiFive
Posts: 3529
Joined: Tue Dec 01, 2015 7:35 am

Re: esp32 monitor interpreter

Postby WiFive » Mon Dec 03, 2018 3:33 am

Thanks for sharing. You didn't like console component?

peterglen
Posts: 27
Joined: Thu Mar 22, 2018 5:55 pm

Re: esp32 monitor interpreter

Postby peterglen » Mon Dec 03, 2018 3:42 am

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.

Who is online

Users browsing this forum: No registered users and 10 guests