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

Add Remote Command Over WiFi #255

Open
wants to merge 9 commits into
base: main
Choose a base branch
from
Open

Conversation

nekomona
Copy link
Contributor

This PR add a remote command server running in parallel with the serial command, sharing the same command buffer, command lists, and logger outputs. All the data printed through Logger will be forked to the remote when connected, while the ones using Serial won't be forked.

The remote command server could be accessed through telnet clients. Would be easy to integrate into server since it use a simple TCP socket to transmit the same data as serial commands do.

Currently this remote command mostly benefits for checking TCAL status remotely, as other commands are mostly for debugging instead of functions. This could be used for future function commands which are too minor to occupy a packet type or doesn't fit well in a UDP packet like largely varying data length.

Copy link
Member

@TheDevMinerTV TheDevMinerTV left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great, more network stuff for me to refactor in impl/feature-retrieval

LGTM

src/logging/Logger.h Outdated Show resolved Hide resolved
@TheDevMinerTV
Copy link
Member

It'd be cool if you could rebase this onto #256

@nekomona
Copy link
Contributor Author

nekomona commented Jul 2, 2023

pain^2

Copy link
Member

@TheDevMinerTV TheDevMinerTV left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, would be nice if it were rebased against the network rewrite stuff tho

@nekomona nekomona force-pushed the rcmd_merge branch 2 times, most recently from e3d2e80 to 758f8a1 Compare July 4, 2023 02:50
@ImUrX ImUrX self-requested a review July 4, 2023 08:20
src/logging/RemoteLogHelper.h Outdated Show resolved Hide resolved
src/logging/RemoteLogHelper.cpp Outdated Show resolved Hide resolved
src/network/remotecmd.h Outdated Show resolved Hide resolved
src/network/remotecmd.cpp Outdated Show resolved Hide resolved
@nekomona
Copy link
Contributor Author

IP check is added, so that remote command would only accept connection from the IP of connected SlimeVR Server. When the server is not connected, any IP could connect to the remote command, but will not receive any response, and only accept the SET WIFI command for future SoftAP-based provisioning.

@ImUrX
Copy link
Member

ImUrX commented Jul 30, 2023

commit history is a little broken on this and #262 😓

@Eirenliel
Copy link
Member

We squash it so it doesn't matter..

@nekomona
Copy link
Contributor Author

Rebased to main after v0.4.0 and tested on ESP32-S3, remote commands and server IP checks are looking good.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants