<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class=""><div class=""><br class=""></div>Very bizarre. The issue was hard to track down. Seems to be strange behaviour in SSL connections with faults, where the SSL error comes in, the connection is torn down, but then a welcome message arrives for the login (after the disconnection). If the welcome login succeeds, then the vehicle App connection is associated with the FD# and causes the issue later on.<div class=""><br class=""></div><div class="">So, the server code sees a login message after the connection was disconnected 😱</div><div class=""><br class=""></div><blockquote style="margin: 0 0 0 40px; border: none; padding: 0px;" class=""><div class=""><div class=""><font face="Andale Mono" class=""><span style="font-style: normal; font-size: 11px;" class="">2020-06-10 20:36:20.271547 +0800 info OVMS::Server::ApiV2: #253 - - new TLS connection from <redacted></span></font></div></div><div class=""><div class=""><font face="Andale Mono" class=""><span style="font-style: normal; font-size: 11px;" class="">2020-06-10 20:36:20.273606 +0800 info OVMS::Server::Core: #253 - - ConnStart</span></font></div></div><div class=""><div class=""><font face="Andale Mono" class=""><span style="font-style: normal; font-size: 11px;" class="">2020-06-10 20:36:28.781028 +0800 error OVMS::Server::ApiV2: #253 C <redacted-car> got error: ssl3_read_bytes: ssl handshake failure</span></font></div></div><div class=""><div class=""><font face="Andale Mono" class=""><span style="font-style: normal; font-size: 11px;" class="">2020-06-10 20:36:28.782356 +0800 info OVMS::Server::Core: #253 C <redacted-car> CarDisconnect</span></font></div></div><div class=""><div class=""><font face="Andale Mono" class=""><span style="font-style: normal; font-size: 11px;" class="">2020-06-10 20:36:28.782821 +0800 info OVMS::Server::Core: #253 - - ConnFinish</span></font></div></div><div class=""><div class=""><font face="Andale Mono" class=""><span style="font-style: normal; font-size: 11px;" class="">Use of uninitialized value in concatenation (.) or string at plugins/system/OVMS/Server/ApiV2.pm line 631.</span></font></div></div><div class=""><div class=""><font face="Andale Mono" class=""><span style="font-style: normal; font-size: 11px;" class="">2020-06-10 20:36:28.783094 +0800 info OVMS::Server::ApiV2: #253 C <redacted-car> got proto #/C login</span></font></div></div><div class=""><div class=""><font face="Andale Mono" class=""><span style="font-style: normal; font-size: 11px;" class="">Use of uninitialized value $clienttype in concatenation (.) or string at plugins/system/OVMS/Server/Core.pm line 237.</span></font></div></div><div class=""><span style="font-size: 11px; font-family: "Andale Mono";" class="">2020-06-10 20:36:28.784261 +0800 info OVMS::Server::Core: #253 <redacted-car> CarConnect</span></div></blockquote><div class=""><br class=""></div><div class="">At that stage, the fd #253 is tagged with an App connection, and never cleared (because the CarDisconnect was before the CarConnect).</div><div class=""><br class="Apple-interchange-newline">Later on, that fd# can get data from the original app/car with connection issues. The source of bad data seems to be almost always the DEMO car.<br class=""><br class="">Workaround is to add connection checks to the io_line and io_welcome routines, to simply return (discard) if the connection is not marked as up.<br class=""><br class="">Will load this live on <a href="http://api.openvehicles.com" class="">api.openvehicles.com</a> now, and monitor for a few days. We now have logging for these mismatched connections (and code to avoid sending out the data in that case), so it should be easy to see if this solves the problem.</div><div class=""><br class=""></div><div class="">Regards, Mark.<br class=""><div><br class=""><blockquote type="cite" class=""><div class="">On 9 Jun 2020, at 1:48 PM, Mark Webb-Johnson <<a href="mailto:mark@webb-johnson.net" class="">mark@webb-johnson.net</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><meta http-equiv="Content-Type" content="text/html; charset=utf-8" class=""><div style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">Steve,<div class=""><br class=""></div><div class="">I wasn’t aware of this issue, but will look into it. I can’t immediately see the cause, but it should be relatively easy to add a clean-up of the channel structures when the connection starts.</div><div class=""><br class=""></div><div class="">I haven’t restarted the <a href="http://api.openvehicles.com/" class="">api.openvehicles.com</a> server recently.</div><div class=""><br class=""></div><div class="">Regards, Mark.<br class=""><div class=""><br class=""><blockquote type="cite" class=""><div class="">On 9 Jun 2020, at 1:39 PM, Stephen Casner <<a href="mailto:casner@acm.org" class="">casner@acm.org</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div class="">That sounds plausible. Since the problem ceased, I wonder if that<br class="">implies that the server was restarted. I'm using Mark's server.<br class=""><br class=""> -- Steve<br class=""><br class="">On Mon, 8 Jun 2020, Michael Balzer wrote:<br class=""><br class=""><blockquote type="cite" class="">That may have been <a href="https://github.com/openvehicles/Open-Vehicle-Server/issues/2" class="">https://github.com/openvehicles/Open-Vehicle-Server/issues/2</a><br class=""><br class="">Regards,<br class="">Michael<br class=""><br class=""><br class="">Am 08.06.20 um 19:02 schrieb Stephen Casner:<br class=""><blockquote type="cite" class="">I'm running 3.2.012. This morning when I went to check the status<br class="">after charging overnight, which had completed, the iPhone app was<br class="">behaving in a very strange manner. I cycled a few times (for as long<br class="">as I watched) through three states at an interval on the order of<br class="">10-20 seconds:<br class=""><br class="">1. 86%, ideal range 191, no charge connector icon. Those range and<br class="">SOC numbers were correct, but the charge cable was connected.<br class=""><br class="">2. 95%, ideal range 177, charge connector icon shown.<br class=""><br class="">3. 48%, don't recall the range, no charge connector icon.<br class=""><br class="">When I checked the Car screen, it too was cycling among showing no<br class="">numbers, showing old gray numbers, and showing some numbers in white.<br class="">I don't recall their accuracy.<br class=""><br class="">Now after I finished my morning walk the display appears stable and<br class="">correct with 86%, ideal range 190, and charge connector icon shown.<br class="">The Car screen shows just old numbers in gray except for the aux<br class="">battery voltage. Sorry I didn't have the presence of mind to grab<br class="">screenshots.<br class=""><br class=""> -- Steve<br class="">_______________________________________________<br class="">OvmsDev mailing list<br class=""><a href="mailto:OvmsDev@lists.openvehicles.com" class="">OvmsDev@lists.openvehicles.com</a><br class=""><a href="http://lists.openvehicles.com/mailman/listinfo/ovmsdev" class="">http://lists.openvehicles.com/mailman/listinfo/ovmsdev</a><br class=""></blockquote><br class="">--<br class="">Michael Balzer * Helkenberger Weg 9 * D-58256 Ennepetal<br class="">Fon 02333 / 833 5735 * Handy 0176 / 206 989 26<br class=""><br class="">_______________________________________________<br class="">OvmsDev mailing list<br class=""><a href="mailto:OvmsDev@lists.openvehicles.com" class="">OvmsDev@lists.openvehicles.com</a><br class=""><a href="http://lists.openvehicles.com/mailman/listinfo/ovmsdev" class="">http://lists.openvehicles.com/mailman/listinfo/ovmsdev</a><br class=""><br class=""><br class=""></blockquote>_______________________________________________<br class="">OvmsDev mailing list<br class=""><a href="mailto:OvmsDev@lists.openvehicles.com" class="">OvmsDev@lists.openvehicles.com</a><br class=""><a href="http://lists.openvehicles.com/mailman/listinfo/ovmsdev" class="">http://lists.openvehicles.com/mailman/listinfo/ovmsdev</a><br class=""></div></div></blockquote></div><br class=""></div></div>_______________________________________________<br class="">OvmsDev mailing list<br class=""><a href="mailto:OvmsDev@lists.openvehicles.com" class="">OvmsDev@lists.openvehicles.com</a><br class="">http://lists.openvehicles.com/mailman/listinfo/ovmsdev<br class=""></div></blockquote></div><br class=""></div></body></html>