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. )
Paul
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.
Email me: Am happy to donate a board with components, but postage is another thing. If you were willing to contribute with postage then it is possible.
Thanks to Robert and everyone involved with Myfocuserpro and myfocuserpro2.I can confirm the original driver (when modified for WiFi) works for the ESP32.
I followed his suggestion to change from SERIAL to TCP, and changing Firmware version in my clone of the myfocuserpro2 indi driver.
I would have gotten there much sooner but I kept installing the driver's XML file in the wrong place.
My breadboard setup works as expected. I learned so much about drivers and have an appreciation of the effort that goes into all the open source software we have.
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
If it is as simple as adding TCP_CONNECTION, then I can do this, the problem is I have noway of testing this. So if I do it, could somebody check the new code before I do a pull request?
The problem will then be a lot of people who do not understand the first thing about networking, complaining that the driver does not work, when they have not set their devices correctly!