Invzblio / SerialToWifi

Drop-in replacement for the Serial Arduino library that outputs results to a remote server over wifi
Creative Commons Zero v1.0 Universal
15 stars 3 forks source link

Client to server approach #4

Open pberna67 opened 4 months ago

pberna67 commented 4 months ago

Dear Invzblio

Serial redirection is a very good approach because avoid the code change, however it should work as a "telnet server" program. The idea is that remotely a telnet client program should be able to connect to a virtual telnet server in which I will see the equivalent view of Arduino Serial Monitor. If nobody is connected to the server, than the Serial.printf / Serial.println should be ignored, so the program can run quickly. This avoid the need to be connected as is happening in your case.

Regards Paolo

Invzblio commented 4 months ago

Hi Paolo,

Thanks for your comment.

Using an egress model is a design choice for the following reasons:

In the current release, the connection attempt is done only once so if the console is not listening, you have only minimal impact at launch. Using the RECONNECT option forces the esp32 to try reconnecting and might add unwanted delays but that's not the default behavior.

Hope this helps.

Pascal