[Ovmsdev] OBDII vehicle chicken-n-egg issue

Craig Leres leres at xse.com
Mon Oct 3 09:20:48 HKT 2022


On 10/2/22 01:27, Michael Balzer wrote:
> the initial poll state is set by the constructor to 0. Poll state 0 
> enables polling of the VIN (every 999 seconds) and the engine RPM (every 
> 10 seconds) entry of the polls list.
> 
> PollSetState(0) does not disable the polling, it just sets the state to 
> 0. You can currently use up to four states.
> 
> I wrote some documenting comments on the poller in vehicle_poller.cpp 
> and vehicle.h. A developer manual page is still todo.
> 
> You can also hook into the CAN error reporting or query the error state 
> from PollerStateTicker() to detect when the bus goes offline. See the 
> Hyundai code for an example on this.

Thanks, that got me aimed in a useful direction.

I spent some too-long-postponed time reverse engineering the PIDs the 
Corvette spontaneously transmits; it was easy to pick out the vin and 
something that may or may not be rpm but definitely tells me when the 
engine is running.

Engine off:

     1664745342.332392 1R11 308 00 e8 00 00 20 00 ff
                                      ^^ ^^  ^

Engine on, about 2000 RPM:

     1664745361.231876 1R11 308 00 e8 8b 00 21 00 ff
                                      ^^ ^^  ^

Engine on, idling at about 650 RPM:

     1664745370.031792 1R11 308 00 e8 6a 00 21 00 ff
                                      ^^ ^^  ^

Now that I'm not polling for rpm every 10 seconds when the car is off, 
can1 Tx ovrflw/Tx fails are both staying at zero; I started to worry 
that filling up the transmit queue while the car was parked/off was 
causing me to lose the ability to transmit anything once it was on 
again. Now it's no longer a potential issue.

		Craig

OVMS# can can1 status
CAN:       can1
Mode:      Active
Speed:     500000
DBC:       none

Interrupts:               21116
Rx pkt:                   21113
Rx ovrflw:                    0
Tx pkt:                       8
Tx delays:                    0
Tx ovrflw:                    0
Tx fails:                     0

Err flags: 0x00000000
Rx err:                       0
Tx err:                       0
Rx invalid:                   0
Wdg Resets:                   0
Wdg Timer:                    7 sec(s)
Err Resets:                   0



More information about the OvmsDev mailing list