<html><head></head><body>Hi Mark,<br><br>I have my own home automation running at home. I want to push the current values (SoC, odometer, ...) once my car is in the driveway and OVMS is booked into my WiFi. My home automation has a TCP server running were I process the data further. <br><br>I don't want to the OVMS Server functionality as I'm not a Linux guy, don't want the data in the internet and no SIM use on the OVMS. <br><br>So does the canlog_tcpclient.cpp take care of the concurrency etc. correctly? I will do the same in my code. Or should I start a separate task from the vehicle task for every push?<br><br>thx<br>Soko<br><br><div class="gmail_quote">On 23 August 2020 16:37:46 CEST, Mark Webb-Johnson <mark@webb-johnson.net> wrote:<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<pre class="k9mail">What are you trying to do?<br><br>From a design point of view, it seems strange to have an outgoing tcp connection from a vehicle module. Those modules need to be very responsive and realtime.<br><br>Mongoose is the correct approach. But take care, because most of the work is done in the network (not vehicle) task, so you need to deal with mutex and other concurrency issues.<br><br>Regards, Mark<br><br><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #729fcf; padding-left: 1ex;">On 23 Aug 2020, at 7:54 PM, Soko <ovms@soko.cc> wrote:<br><br>Hey everyone,<br><br>I'm trying to send a simple tcp msg to a remote tcp-server. I've looked into the FreeRTOS example (esp-idf\examples\protocols\sockets\tcp_client\) which works (kinda) but OVMS behaves weirdly when I do it like that.<br><br>Thomas pointed me to mongoose...<br><br>So is this the way to go? I would take canlog_tcpclient.cpp as a model...<br><br>Ohh... and is it OK if I send my tcp msg in the vehcile task? Mongoose should take care of unforeseen errors so the task shouldn't block, right?<br><br>thx<br><br>Soko<hr>OvmsDev mailing list<br>OvmsDev@lists.openvehicles.com<br><a href="http://lists.openvehicles.com/mailman/listinfo/ovmsdev">http://lists.openvehicles.com/mailman/listinfo/ovmsdev</a><br></blockquote><hr>OvmsDev mailing list<br>OvmsDev@lists.openvehicles.com<br><a href="http://lists.openvehicles.com/mailman/listinfo/ovmsdev">http://lists.openvehicles.com/mailman/listinfo/ovmsdev</a><br></pre></blockquote></div></body></html>