benlink icon indicating copy to clipboard operation
benlink copied to clipboard

tcp client / server for remote control

Open khusmann opened this issue 10 months ago • 2 comments

Proposed by @Ylianst here: https://github.com/khusmann/benlink/issues/6#issuecomment-2626275707

This would be pretty easy to do with the current architecture:

  • create a new.TcpCommandLink for tcp connections
  • add RadioController.new_tcp, RadioConnection.new_tcp
  • create a server module for the server part

khusmann avatar Feb 03 '25 06:02 khusmann

@khusmann Exactly. At some point, since the python part is sort of expected to be "always on" while HT Commander would be on when the user needs it, I would like the server to accumulate APRS frames with timestamps and HT Commander would send a command like "Send me all APRS frames you got after time x". The server would then send each frame with the time it was received at. If HT Commander disconnected, server should go back to APRS listening (if radio not setup to do this).

Also, HT Commander could issue a command to start/stop Bluetooth pairing for the server. So, act as a UI for the server's radio paring.

However, just having a TCP connection would be great. I would rather have TLS with self-signed cert if possible. HT Commander will show a warning box to accept the cert.

Ylianst avatar Feb 03 '25 06:02 Ylianst

In v0.8 of HT Commander, I added a built-in web server with websocket support. It's not HTTPS (yet) but it seems to work ok. For now, it displays debug messages on the web page. You need to activate it in the "Files -> Settings" dialog. I am thinking running remote protocol over websocket instead of TCP.

Image

Ylianst avatar Feb 05 '25 07:02 Ylianst