Open openshwprojects opened 1 year ago
It's alive: Of course without MQTT, but it runs. Basic OBK now runs on Windows.
May be I will create similar port on LINUX.
@valeklubomir feel free to do this, it would be great, but let's keep it well organized. Also, there is currently one issue with Windows port - even the LittleFS is working (I added a 'fake' flash memory access), but the issue is with Tasmota Control. I have totally no idea, why Tasmota Control (doing HTTP communication with a device) is not working while OBK is ran on Windows, but it works on Beken. Tasmota Control basically does: http://192.168.0.118/cm?cmnd=status%200 and parses reply JSON, but in case of Windows machine, the OBK receives the packet, but Tasmota Control says "Timed out". I suspect that I am somehow closing the socket prematurely on Windows but no sleeps and waits solves the issue. Here is sockets code on Windows: https://github.com/openshwprojects/OpenBK7231T_App/blob/main/src/httpserver/http_tcp_server_nonblocking.c (I altered the server to work without any threading)
LFS REST interface testing:
Scripting testing:
Automatic tests can now spoof MQTT publishes.
TLDR: Developers, what do you think about doing automatic tests on Windows for OBK in Windows OBK Build?
OBK started as a project supporting also a Windows build. It was possible to run OBK on windows (with MQTT disabled) for some amount of time. Unfortunatelly, due to large amount of changes, the Windows support for lost in translation. Recently I have readded the Windows support, but only for Scripting part: https://github.com/openshwprojects/OpenBK7231T_App/blob/main/src/win_main_scriptOnly.c I would like to extend it and create some kind of sandbox Windows environment, where you can:
Here are some more technical concepts and ideas that I would like to implement. SCRIPT TESTING will look like somewhat like this (it's an early draft):
Channels testing will be more generic and will work by plugging into the channels system and first doing commands like "led_enableAll 1", "led_baseColor_rgb FF00FF", and then checking channel values to see if they match exceptations.
Everything will happen on Windows.
I will do that myself, except there is only single problem - the MQTT support. So now, I have two questions.
I will most likely do all porting myself, I am just not sure about MQTT part
Thoughts?
UPDATE: I did some work on the porting and now it really seems that the mqtt.c is the major problem and first windows port will be without MQTT.