If the command set is the same for the TCP connection, then it might be easy by changing
setSupportedConnections(CONNECTION_SERIAL) to setSupportedConnections(CONNECTION_SERIAL | CONNECTION_TCP)
That should make it possible to choose in control panel between serial / tcp connection.
And probably a few changes to the sendcommand. (If the driver has been implemented from the skeleton)
Should be easy to emulate by just opening a listener on on the tcp port tho see how the driver sends the command. )
some update: changed that setSupportedConnections(CONNECTION_SERIAL | CONNECTION_TCP) and recompiled
then on linux used nc to do some tcp traffic on port 1026
nc -l -v 1026
from kstars configured myfocuser2 to ip adress and port 1026
Could see the the driver sending the first command (#03) but then got stuck in sending the answer.
I made a windows controller emulator for the esp controller. If you run this on the windows pc it will start an emulator (and tell you the ip address) - you then can connect to it and it behaves just like a esp controller. I use it all the time for testing, running inside its own VM