0

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?

travelingbones
  • 7,919
  • 6
  • 36
  • 43
  • 1
    I have no experience with Vehicle Spy but packet sniffers tend to have limited support for rendering raw low-level bit-streams. If you are lucky there may be high-resolution time-stamps for both the start and end of the packet from which amount of stuffing may be roughly inferred. Given the payload, identifier, DLC and other flags (RTR, IDE, etc) you _do_ have sufficient information to compute bit-stuffing overhead. However you will essentially need to replace the work of the transmitter, concatenating and bit-packing all of the fields and computing the CRC before scanning for constant runs. – doynax Jul 19 '17 at 14:58

1 Answers1

0

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.

travelingbones
  • 7,919
  • 6
  • 36
  • 43