Search code examples
can-busbitstuffing

Does Vehicle Spy software give visibility to CAN bus stuffed bits? If not, how can easily we see the stuffed bits?


I'm learning about bit stuffing in CAN bus messages. We're using Vehicle Spy software to extract the arbitration ids, data values, etc.

q1: Does Vehicle Spy give a tally of stuffed bits in each message? If so how do I see this?

q2: If not, then what's the easiest way to compute the number of stuffed bits in a message from the Vehicle Spy output? Will simply converting each column from hex to bits and then searching for 5-length strings of 1s/0s work work? Is there a better way?


Solution

  • Vehicle Spy emailed me and said they do not currently have support for this (can't see stuffed bit counts).

    One option I may try is to count the number of bits per message. All of CAN messages are fixed length except (a) the data payload, whose length is recorded in the DLC part of the message, and (b) the IF (ending bits) which are not stuffed, but are 3 bits in error-active mode, 11 in error-passive.

    Assuming you can see the total length of bits the DLC, and know the mode, you can see how many are stuffed.