I would like to create a manufacturing test program for our ESP-32 embedded irrigation system. To do this, I would like to make programmed RPC calls over Websocket to RPCs that are already written as a part of the embedded code. The manufacturing test program would be written in C, and would operate as a command line invoked program in Windows 10, 64 bit. The operations that would be required are:
Get a file
Put a file
Run our own tested RPCs, like this: mos --port ws://192.168.4.1/rpc call XSeek “{”"“a”"":100,""“b”"":0}"
mos.exe already contains exactly the functionality that we want to achieve.
Is there a linkable Websocket library that can be integrated into a Windows based C program?
Is there any instruction on how to complete calls inside such a program?
We would like to take a minimalist approach to this plan (invoke the program, test the unit, write the results to file). No fancy UI programming is required.
I don’t know how web sockets were implemented in mongoose or the MOS tool, but it really does not matter. The web server used in Mongoose OS, as far as I can tell from my experimenting, uses a pretty standard implementation. Any client side websocket library, and there are many, should work just fine.
In fact, you can do it with Javascript without any library. Pick whatever works for you and use it. If you’re new to front end development and are confused about how it all works, just ask.
I was trying to avoid selecting a library and going through the inevitable frustration of various incompatibilities and difficulties with Windows. Since mos.exe is working really well in Windows, I figured it would be the best starting point.