Skip to content
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

Open
wants to merge 7 commits into
base: v2
Choose a base branch
from
Open

Added WebConsole for v2 #1617

wants to merge 7 commits into from

Conversation

NurTasin
Copy link

@NurTasin NurTasin commented Jan 3, 2023

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 the index.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 parameters prnt and prntln 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.

@soharddbwarez
Copy link

Interesting but there's already a very nice web-based Serial Terminal, for info go here: Spacehuhn Blog - A web-based Serial Terminal
And to use the web-based Serial Terminal go here: Spacehuhn Serial Terminal
This web-based Serial Terminal works with both v2 and v3 by the way.

@NurTasin
Copy link
Author

NurTasin commented Feb 15, 2023

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.

@stale
Copy link

stale bot commented Sep 16, 2023

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.

@stale stale bot added the stale label Sep 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants