Basic and extendible Wifi CLI manager via serial command line for ESP32
- interactive serial terminal, prompt and backspace support
- extendible: custom user commands and also the help menu
- Wifi multi AP and single AP modes
- preferences persist in flash ROM
- two parsers: Argument into quotes or two parameters without quotes
- debug messages mode off (new silent mode)
- disable auto connect in the boot
- extend the CLI events callbacks (see examples)
- esp8266 support
- esp32c3, esp32s3 support
- launch terminal in setup (example)
- improve VT100 compatibility (some minor issues on some terminals)
#include <Arduino.h>
#include <ESP32WifiCLI.hpp>
void setup() {
Serial.begin(115200); // set here the Serial baudrate or in
wcli.begin(); // the begin method like a parameter
delay(100);
}
void loop() {
wcli.loop();
}
Output
SerialTerm v1.1.2
(C) 2022, MikO - Hpsaturn
available commands:
help show detail usage information
setSSID set the Wifi SSID
setPASW set the WiFi password
connect save and connect to WiFi network
list list saved WiFi networks
select select the default AP (default: last)
mode set the default operation single/multi AP (slow)
scan scan WiFi networks
status WiFi status information
disconnect WiFi disconnect
delete remove saved WiFi network by SSID
st>
You can extend the available commands adding new ones in the setup, like these:
wcli.begin();
wcli.term->add("blink", &blink, "\tLED blink x times each x millis");
wcli.term->add("echo", &echo, "\tEcho the input message");
wcli.term->add("reboot", &reboot, "\tperform a ESP32 reboot");
For more details, please review the M5Atom and Advanced examples.
You able to install this library with pio pkg command:
pio pkg install --library "hpsaturn/ESP32 Wifi CLI@^0.1.0"
Or add it in your ini file. Also you can compile here the examples with a simple pio run
over root of this repo.
This ESP32 CLI is based on the old SerialTerminal of @miko007. Please first download and use my fork that has some improvements: SerialTerminal Library
After that install ESP32 Wifi CLI library from this repo. Download it on releases.
The next projects are using esp32-wifi-cli
library:
Extended from SerialTerminal by @miko007