memcardrex icon indicating copy to clipboard operation
memcardrex copied to clipboard

Support for esp link wifi serial bridge

Open lmiori92 opened this issue 3 years ago • 0 comments

This PR implements the feature described here: https://github.com/ShendoXT/memcardrex/issues/26

Major changes:

  • CardLink driver can support the serial port and serial port over TCP via a socket (actually, any raw socket communication can work).
  • Some methods re-organized and created to avoid code duplication and manage the two available transport methods
  • Revised timeout method that did not properly work for the wi-fi connectivity (much higher latency and more random)

Minor changes:

  • added code to check that the received data chunk matches the expected number of bytes, otherwise some failure could go unnoticed.
  • update some UI parts and Settings to accomodate for 2 new parameters, that is the "Hostname" and the "Port" for esp-link (or similar) connection setup

Notes

  • I have no serial port at hand so I cannot currently test the serial port logic for regressions. Best effort to keep it working but not guaranteed :D Someone has to do some read/write/format testing.
  • transfer speed is around 2 minutes per read/write/format operation. Not sure if the serial port is a bit faster, but I immagine it is. I don't know the details implementation of esp-link thus I can just assume the TCP packets are not always carrying a good amount of bytes thus increasing the overhead. Not a problem, really.

Any comment is welcome @ShendoXT !

lmiori92 avatar Dec 30 '21 16:12 lmiori92