ESP8266 interactive serial command processor via Arduino core.
It is implemented several APIs provided by ESP8266 Arduino core so that they can be executed with interactive commands. You can control ESP8266 interactively with the command via serial interface. With ESPShaker you can investigate the behavior of ESP8266, without having to write program code every time. Since ESPShaker does not use the AT SDK provided by Espressif Systems, it can examine the pure behavior by ESP8266 Arduino core.
- Implemented a commonly used basic WiFi API to the command
- Supports WIFI_AP, WIFI_STA, WIFI_AP_STA mode
- Supports SmartConfig with ESP-TOUCH
- GPIO port I/O
- SPIFFS file system handling
- Built in Web server with http GET/PUT handling and DNS server, mDNS service
- It can build simple web pages interactively for http response
- Batch execution for a series of commands
It has tested on NodeMCU v1.0 module (ESP-12E). Other ESP8266 modules will also work, but its sketch size exceeds 370KB. It may not work on prior modules such as ESP-01. Required Arduino IDE is current upstream at the 1.8 level or later, and also ESP8266 Arduino core 2.3.0.
InstallationDownload ESPShaker file as a zip from this repository, and extract the resulting folder into your Arduino sketch folder and build it with Arduino IDE. In addition to this file, two external libraries are required as PseudoPWM for LED blinking and PageBuilder for html page dynamic creation. Then open the serial monitor and reset the ESP8266 module. If ESPShaker is working properly the current WiFi status will be displayed on the serial monitor. The serial monitor's baudrate is 115200 bps.
UsageWhat you need to recognize is that the API sequence is important for proper communication with ESP8266. In other words, you can explore the error caused by the wrong sequence of the owned code. It will also be useful for analysis of unexpected return codes. Usage is simple. Connect ESP8266 module to PC and start the serial monitor. Then enter the following command. A specific API is called and its response is displayed on the serial monitor. ESPShaker also works with other serial terminal utilities. Local echo setting is needed.
General commands sequence- AP
mode ap
apconfig 192.168.4.1 192.168.4.1 255.255.225.0
softap myssid mypassword
...here, you will connect the access point named myssid from your wi-fi client device.
http on /hello Hello, world!
start web
...here, you can access the web server in ESPShaker at http://192.168.4.1/hello
start mdns mywebserver http tcp
...here, you can access the web server in ESPShaker at http://mywebserver.local/hello
- STA
mode sta
begin anyssid password
-> some connection status response
http get http://some.where.url/
-> some response from server
- AP_STA
mode apsta
begin anyssid password
-> WiFi.Status(WL_CONNECTED)
apconfig 192.168.4.1 192.168.4.1 255.255.225.0
softap myssid mypassword
http on /hello Hello, world!
start web
start mdns mywebserver http tcp
...
Command summaryappconfig Set IP addresses of AP mode
autoconnect Set auto connect validity
begin Begin WiFi communication
delay Delay milliseconds delay
discon Disconnect WiFi
event Notify WiFi event occurrence
fs SPIFFS file system handling
gpio GPIO access deigitalRead, digitalWrite
http Issues HTTP GET method or Register web page
mode Set Wi-Fi working mode
persistent Set whether to store WiFi working mode in flash memory
reset Reset esp8266 module
scan Scan all available APs
show Display the current IPs
sleep Set sleep type or enter deep sleep
smartconfig Configure new SSID with ESP-TOUCH
softap Start SoftAP operation
start Start embedded Web server or DNS server
station Display number of stations
status Display current connection status
stop Stop embedded server
wps Begin WPS configuration
For more informationVisit this project page: https://github.com/Hieromon/ESPShaker
Comments