-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added WebConsole for v2 #1617
base: v2
Are you sure you want to change the base?
Added WebConsole for v2 #1617
Conversation
Interesting but there's already a very nice web-based Serial Terminal, for info go here: Spacehuhn Blog - A web-based Serial Terminal |
I didn’t know that. But the compatibility of spacehuhn web serial monitor with different browsers isn't great. (EG. No mobile browsers are supported). But the console implemented in my code uses serverside command execution. That's why it is compatible with all browsers (both mobile and desktop). And this uses WiFi to connect with the deauther board. No serial communication is needed to use my Implementation of the WebConsole. I hope you will understand the circumstances where a Wireless Web Console on a mobile device may come handy. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
Features
Now you can execute CLI commands using a simple web interface.
You can connect to the AP and got to
deauther.tools/webconsole.html
to start using the web console.There is no hyperlink for
webconsole.html
in theindex.html
or any other web interface files as that can be confusing for beginners. But if you want, you can always go to the page by manually typing the address<ip_of_the_deauther>/webconsole.html
.This feature was requested in Issue #1610
How this works
This
webconsole.html
file makes use of/run
endpoint to execute CLI commands. And saves the CLI output (basically saves the parametersprnt
andprntln
functions were called with) in a local String variable. This variable has been limited to use not more than 4kB of memory. (check functions.h for better understanding). And if the local variable exceeds the 4kB memory usage limit, the variable's value is set to an empty string. This step is important so that the 80kB RAM of esp8266 doesn't get filled up with console outputs.And after running a CLI command the webconsole reads that local String variable and shows it on the webconsole interface.
The webconsole also updates its CLI output every 5 seconds.
Testing
This feature is tested on NodeMCU and it works like a charm.