<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
<p>Hi,</p>
<p>Last time I investigated this as I will use the 12V to determine
if the car is running (>13.5V means on. Also true for
charging). So out of curiosity and so we have my tests in one
email combined. In addition I felt I've mixed up some tests &
results so I wanted to do it one more time to make sure...<br>
</p>
<p>I've tried the same source again. Just polling the HV-Battery
voltage. In Pollstate=0 every 30 seconds. Once a Poll gets an
reply I swap to Pollstate=1 with polling every "threshold"
seconds. Tries=X mean how many counts do I wait until I swap the
PollState back to 0. Tries=4 means 4 times the threshold.</p>
<p>The test workflow is:</p>
<ol>
<li>Car is locked and shut down (no fan noise heard)</li>
<li>Wait until I get an CAN error</li>
<li>Unlock car</li>
<li>Wait until I get the first Poll reply</li>
<li>Lock car</li>
</ol>
<p>There are 3 possible outcomes after step 5:</p>
<ol>
<li>The car stays on, fan noise heard, it replies to every poll,
never swap back to PollState=0</li>
<li>The car stays on, fan noise heard, it doesn't reply to the
polls, swap back to PollState=0 happens, but immediately after I
get one reply</li>
<li>The car shuts down, no fan noise, CAN errors happen for polls,
swap back to PollState=0 happens</li>
</ol>
<p>I really don't understand whats going on here, but here is the
table. Columns=tries, Rows=threshold, cell=outcome<br>
</p>
<p> </p>
<table width="443" cellspacing="0" cellpadding="0" border="0">
<colgroup><col
style="mso-width-source:userset;mso-width-alt:3387;width:74pt"
width="98"> <col style="width:51pt" width="69" span="5"> </colgroup><tbody>
<tr style="height:14.6pt" height="19">
<td style="height:14.6pt;width:74pt" width="98" height="19">threshold/tries</td>
<td style="width:51pt" width="69" align="right">3</td>
<td style="width:51pt" width="69" align="right">4</td>
<td style="width:51pt" width="69" align="right">5</td>
<td style="width:51pt" width="69" align="right">6</td>
<td style="width:51pt" width="69" align="right">8</td>
</tr>
<tr style="height:14.6pt" height="19">
<td style="height:14.6pt" height="19" align="right">3</td>
<td><br>
</td>
<td align="right">1</td>
<td><br>
</td>
<td><br>
</td>
<td><br>
</td>
</tr>
<tr style="height:14.6pt" height="19">
<td style="height:14.6pt" height="19" align="right">4</td>
<td><br>
</td>
<td align="right">1</td>
<td><br>
</td>
<td><br>
</td>
<td><br>
</td>
</tr>
<tr style="height:14.6pt" height="19">
<td style="height:14.6pt" height="19" align="right">5</td>
<td align="right">3</td>
<td align="right">2</td>
<td align="right">2</td>
<td align="right">2</td>
<td align="right">2</td>
</tr>
<tr style="height:14.6pt" height="19">
<td style="height:14.6pt" height="19" align="right">6</td>
<td><br>
</td>
<td align="right">3</td>
<td><br>
</td>
<td><br>
</td>
<td><br>
</td>
</tr>
<tr style="height:14.6pt" height="19">
<td style="height:14.6pt" height="19" align="right">7</td>
<td><br>
</td>
<td align="right">3</td>
<td><br>
</td>
<td><br>
</td>
<td><br>
</td>
</tr>
<tr style="height:14.6pt" height="19">
<td style="height:14.6pt" height="19" align="right">10</td>
<td><br>
</td>
<td align="right">3</td>
<td><br>
</td>
<td><br>
</td>
<td><br>
</td>
</tr>
</tbody>
</table>
<p>What I really don't get is why with shorter tries the car shuts
off (as it should) and longer tries keep it awake</p>
<p>so long</p>
<p>Soko<br>
</p>
<div class="moz-cite-prefix">On 08.08.2020 16:58, Michael Balzer
wrote:<br>
</div>
<blockquote type="cite"
cite="mid:f26ac5c1-d7a3-4960-67d9-109477379bce@expeedo.de">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
Soko,<br>
<br>
lines 33 and 34 of your second log are due to the CAN TX buffer,
which seems to have held back the frame until the bus became
available.<br>
<br>
Besides that, I don't see an RX in that log after switching the
polling state. So I assume the RX in your first log also isn't
related to the poll state switch.<br>
<br>
There is an RX buffer, but that's just the internal queue of the
vehicle CAN listener task. There is no delay on the processing
unless you block the task somehow, for example by doing long term
loops / communication in that context (which you shouldn't do).<br>
<br>
You still don't send a session login or tester presence, so maybe
the gateway is simply confused by the requests, runs into some
timeout, then restarts… something like that.<br>
<br>
Regards,<br>
Michael<br>
<br>
<br>
<div class="moz-cite-prefix">Am 08.08.20 um 13:20 schrieb Soko:<br>
</div>
<blockquote type="cite"
cite="mid:c56a0372-6676-fc0c-5276-00789bcb1b53@soko.cc">
<meta http-equiv="Content-Type" content="text/html;
charset=UTF-8">
<p>Soooo....</p>
<p>I've finally found time to test this again.</p>
<p>Basically the same behaviour as described below.</p>
<p><b>VWUP_OFF_TICKER_THRESHOLD 5 with 4 trys.log</b><br>
Car was locked initially. Unlocked the car before line 21
(around time mark 60.000). Locked around time mark 80.000. Car
stayed responsive until line 108 (time mark 100.000).<br>
At line 130 (tm=116.814) I swap back to PollState=0. The poll
for PollState=0 gets an immediate reply (line 131-133) and
therefore I swap back to PollState=1.<br>
The weird thing is that line 132 (which got a reply) is
exactly the same as 126 (or 118 or 110) which didn't get a
reply!?!? So the car has no idea of the poll states as the
data is the same? There must be some issue/bug/behavior inside
OVMS (maybe even in the hardware buffer) which gets triggered
by a PollState change. Or the canlog-monitor uses somehow a
cache and doesn't show the messages immediately.</p>
<p><b>VWUP_OFF_TICKER_THRESHOLD 10 with 4 trys.log</b><br>
Same as below. One thing I've noticed though: Car was locked
until line 32 (tm=63.814). Then I've unlocked it and the lines
33 and 34 showed up immediately. This indicates a
buffer/cache/etc. issue with the canlog-monitor as well
(imho).<br>
</p>
<p>Soko<br>
</p>
<div class="moz-cite-prefix">On 03.08.2020 13:10, Michael Balzer
wrote:<br>
</div>
<blockquote type="cite"
cite="mid:45e39eb9-c5eb-9a77-0d53-df8352c65270@expeedo.de">
<meta http-equiv="Content-Type" content="text/html;
charset=UTF-8">
Soko,<br>
<br>
I don't see any obvious mistakes on a first check.<br>
<br>
Please do the tests again with CAN monitoring, so we can see
what's actually going on on the bus.<br>
<br>
An OBD device normally logs into the device sending a UDS diag
session command (0x10), then keeps that session alive by
sending tester present (0x3E) evers 30-60 seconds. See the UDS
documentation I sent you, or for an overview, see <a
href="https://de.wikipedia.org/wiki/Unified_Diagnostic_Services"
moz-do-not-send="true">https://de.wikipedia.org/wiki/Unified_Diagnostic_Services</a><br>
<br>
You should be able to get the session type and protocol by
logging what your VCDS does on the bus.<br>
<br>
Regards,<br>
Michael<br>
<br>
<br>
<div class="moz-cite-prefix">Am 03.08.20 um 06:19 schrieb
Soko:<br>
</div>
<blockquote type="cite"
cite="mid:ce92b6a4-35ed-83c0-f753-0043fc82dfbe@soko.cc">
<meta http-equiv="Content-Type" content="text/html;
charset=UTF-8">
<p>Mornin,</p>
<p>Source is here: <a class="moz-txt-link-freetext"
href="https://github.com/devmarxx/Open-Vehicle-Monitoring-System-3/tree/master/vehicle/OVMS.V3/components/vehicle_vweup/src"
moz-do-not-send="true">https://github.com/devmarxx/Open-Vehicle-Monitoring-System-3/tree/master/vehicle/OVMS.V3/components/vehicle_vweup/src</a></p>
<p>Attached are two logs. I haven't had the can-monitor
active unfortuantely..</p>
<p><b>VWUP_OFF_TICKER_THRESHOLD 5 with 4 trys.log</b><br>
As the name says it polls every 5 seconds in PollState=1
and swaps back to PollState=0 after 5*4=20 seconds.<br>
Until line 35 you see the CAN errors as the vehicle is
OFF. Then I unlocked the car and in line 38 I get the
first reply.<br>
Around line 90 I locked the car again. It polls, but gets
no reply, <u>but not error either</u> (?!).<br>
Line 118 sets the PollState=0 and suddenly a response
comes in. So in Line 123 I set the PollState=1 again.<br>
The the game starts again: Polls get send, no reply but no
error either. After 21 CarOffTickers I switch to
PollState=0 and suddenly a reply comes in...</p>
<p><b>VWUP_OFF_TICKER_THRESHOLD 10 with 4 trys.log<br>
</b>Here I unlocked at line 57 and locked around line 100.
After that polls get send, no reply, <u>but errors happen</u>.
And the car is finally off.<br>
Although I've tried the same thing later that day and the
car didn't even go to sleep with Threshold=30!?!? So the
behavior is not 100% reproducible (yet)...<br>
</p>
<p>@gateway throttling: In VCDS (which - hopefully - does
only polling too) I have a little number showing me the
refresh rates of the values. It indicates ~8 refreshes per
second. So with 1 second shouldn't be any throttling.</p>
<p>@OBD "tester": I have no clue what this is ;) So if the
polling framework doesn't do it, I don't do it. All I do
is in the obd_eup.* files.</p>
<p>Soko<br>
</p>
<div class="moz-cite-prefix">On 02.08.2020 20:12, Michael
Balzer wrote:<br>
</div>
<blockquote type="cite"
cite="mid:e90a5b00-7b54-e83b-99d7-0725b4f7ad53@expeedo.de">
<meta http-equiv="Content-Type" content="text/html;
charset=UTF-8">
Soko,<br>
<br>
polling may keep the car awake, that's also an issue on
the Kia e-Niro IIRC.<br>
<br>
Changing the PollState can only affect the car indirectly
via the changed polls. Maybe you could add your code &
a log?<br>
<br>
Regarding the poll replies stopping, is that also
reflected in a CAN log? Maybe the OBD gateway throttles if
it sees too many requests? (Hopefully not…)<br>
<br>
If the gateway does throttling: do you login to the OBD as
a "tester" and keep the session active by periodically
sending the "tester present" frame?<br>
<br>
Regards,<br>
Michael<br>
<br>
<br>
<div class="moz-cite-prefix">Am 02.08.20 um 19:30 schrieb
Soko:<br>
</div>
<blockquote type="cite"
cite="mid:e62d94b7-82c2-370f-53cd-fa5e7a60ddaf@soko.cc">
<meta http-equiv="Content-Type" content="text/html;
charset=UTF-8">
<p>Heya again,</p>
<p>I'm trying to develop a detection for when the car is
off/locked but I'm encountering a weird phenomena:</p>
<ul>
<li>Car is shut down and locked</li>
<li>OVMS connected</li>
<li>CAN poll for voltage (only one poll value active)
with 30 secs fails with error (so far nothing weird)</li>
<li>Unlock the car via car-key remote</li>
<li>Poll succeeds and I'm switching from PollState=0
to PollState=1 where I poll every 2 secs</li>
<li>Lock the car via car-key remote</li>
<li><u>After 1 hour the polls still work and the car
is active</u></li>
</ul>
<p>Is something like this known from other vehicles? So
basically my car never shuts down :(</p>
<p>Another secondary weird thing:<br>
When increasing the time to 5 secs for PollState=1 the
polls get no reply and after 20 secs I swap back to
PollState=0.<br>
BUT the second the PollState changes the car replies
again...<br>
Even more weirdness: When PollState=1 time is 10 secs
and I swap back to Pollstate=0 after 40 secs the same
thing happens! Immediately I swap to PollState=0 the
car replies again.<br>
As if the PollState switching somehow wakes the car
up??!</p>
<p>Any ideas?</p>
<p>Soko<br>
</p>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<pre class="moz-quote-pre" wrap="">_______________________________________________
OvmsDev mailing list
<a class="moz-txt-link-abbreviated" href="mailto:OvmsDev@lists.openvehicles.com" moz-do-not-send="true">OvmsDev@lists.openvehicles.com</a>
<a class="moz-txt-link-freetext" href="http://lists.openvehicles.com/mailman/listinfo/ovmsdev" moz-do-not-send="true">http://lists.openvehicles.com/mailman/listinfo/ovmsdev</a>
</pre>
</blockquote>
<br>
<pre class="moz-signature" cols="72">--
Michael Balzer * Helkenberger Weg 9 * D-58256 Ennepetal
Fon 02333 / 833 5735 * Handy 0176 / 206 989 26
</pre>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<pre class="moz-quote-pre" wrap="">_______________________________________________
OvmsDev mailing list
<a class="moz-txt-link-abbreviated" href="mailto:OvmsDev@lists.openvehicles.com" moz-do-not-send="true">OvmsDev@lists.openvehicles.com</a>
<a class="moz-txt-link-freetext" href="http://lists.openvehicles.com/mailman/listinfo/ovmsdev" moz-do-not-send="true">http://lists.openvehicles.com/mailman/listinfo/ovmsdev</a>
</pre>
</blockquote>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<pre class="moz-quote-pre" wrap="">_______________________________________________
OvmsDev mailing list
<a class="moz-txt-link-abbreviated" href="mailto:OvmsDev@lists.openvehicles.com" moz-do-not-send="true">OvmsDev@lists.openvehicles.com</a>
<a class="moz-txt-link-freetext" href="http://lists.openvehicles.com/mailman/listinfo/ovmsdev" moz-do-not-send="true">http://lists.openvehicles.com/mailman/listinfo/ovmsdev</a>
</pre>
</blockquote>
<br>
<pre class="moz-signature" cols="72">--
Michael Balzer * Helkenberger Weg 9 * D-58256 Ennepetal
Fon 02333 / 833 5735 * Handy 0176 / 206 989 26
</pre>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<pre class="moz-quote-pre" wrap="">_______________________________________________
OvmsDev mailing list
<a class="moz-txt-link-abbreviated" href="mailto:OvmsDev@lists.openvehicles.com" moz-do-not-send="true">OvmsDev@lists.openvehicles.com</a>
<a class="moz-txt-link-freetext" href="http://lists.openvehicles.com/mailman/listinfo/ovmsdev" moz-do-not-send="true">http://lists.openvehicles.com/mailman/listinfo/ovmsdev</a>
</pre>
</blockquote>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<pre class="moz-quote-pre" wrap="">_______________________________________________
OvmsDev mailing list
<a class="moz-txt-link-abbreviated" href="mailto:OvmsDev@lists.openvehicles.com" moz-do-not-send="true">OvmsDev@lists.openvehicles.com</a>
<a class="moz-txt-link-freetext" href="http://lists.openvehicles.com/mailman/listinfo/ovmsdev" moz-do-not-send="true">http://lists.openvehicles.com/mailman/listinfo/ovmsdev</a>
</pre>
</blockquote>
<br>
<pre class="moz-signature" cols="72">--
Michael Balzer * Helkenberger Weg 9 * D-58256 Ennepetal
Fon 02333 / 833 5735 * Handy 0176 / 206 989 26
</pre>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<pre class="moz-quote-pre" wrap="">_______________________________________________
OvmsDev mailing list
<a class="moz-txt-link-abbreviated" href="mailto:OvmsDev@lists.openvehicles.com">OvmsDev@lists.openvehicles.com</a>
<a class="moz-txt-link-freetext" href="http://lists.openvehicles.com/mailman/listinfo/ovmsdev">http://lists.openvehicles.com/mailman/listinfo/ovmsdev</a>
</pre>
</blockquote>
</body>
</html>