-
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Short answer: Yes. Longer answer: The relevant standards do say that all UDS frames should be 8 bytes in length. But, not all UDS frames need all 8 bytes. So, the remaining bytes are filled out with some "dummy" bytes. Various vehicles will use different values here. 0xAA is common, 0x00 could be used, 0xFF could be used. The actual value ought to be irrelevant as those bytes are past the end of where the initial length byte says the end is. Note that the frames start with 0x04 meaning that 4 bytes follow. Sure enough, after 4 bytes the rest are padded. This is the proper behavior for UDS. Even more info you didn't ask for: I assume the reason that 0xAA is used is because it is repeating 1010 bits. CAN frames are bit stuffed (a bit of opposite polarity is inserted after 5 bits of the same polarity. This 6th bit is thrown away). But, 1010 won't trigger bit stuffing because there will never be 5 bits of the same polarity in a row. So, this padding byte is optimal because it prevents bit stuffing and thus does not add any extra stuffing bits. The other options 00 and FF both cause bit stuffing to occur. So, avoid those. |
Beta Was this translation helpful? Give feedback.
Short answer: Yes.
Longer answer: The relevant standards do say that all UDS frames should be 8 bytes in length. But, not all UDS frames need all 8 bytes. So, the remaining bytes are filled out with some "dummy" bytes. Various vehicles will use different values here. 0xAA is common, 0x00 could be used, 0xFF could be used. The actual value ought to be irrelevant as those bytes are past the end of where the initial length byte says the end is. Note that the frames start with 0x04 meaning that 4 bytes follow. Sure enough, after 4 bytes the rest are padded. This is the proper behavior for UDS.
Even more info you didn't ask for: I assume the reason that 0xAA is used is because it is repeating …