![]() ![]() ![]() If you do ever figure out the algorithm, there are a couple of options on how to do this in XNet. After playing around for a little while I couldn't get the CRC byte you provided to match. You can find the typical J1850 CRC calculation online here just set the Predefined to CRC8_SAE_J1850. But in this case the 8th byte wasn't used in the CRC calculation. I have seen times when it is an 8 byte payload, and the 7th byte is the CRC. I've seen several CAN payloads with a message counter, and CRC, and never has there been any meaningful data after the CRC. It adds basically nothing to the already performed 15 bit CRC checking that the CAN protocol does itself one protocol layer lower. As such adding an 8 bit CRC to the data message is likely a misjudgement from the device manufacturer. As far as the pure CAN protocol is concerned, your 8 bytes of the message are the pure data load, and there is some extra CAN framing around those 8 bytes, that you usually never will see on the application level. There could be a CRC in there of course, but that is totally independent of the normal CAN CRC. It would seem that what you are dealing with is a very device specific encoding. This is what the SAE_J1850 fills in on its own and you can't even modify when using that chip. But aside that it is pretty stupid to add the count of the message at the end (very hard to parse a binary message if you don't know the length, but you only know that length if you read exactly the right amount of data), those 70 71, 73 and so on bytes definitely have nothing to do with the count of bytes in your message.īesides what checksum are you really dealing with? A typical CAN frame uses a 15 bit CRC checksum. Something is surely off here: You say that the checksum is in the 7th byte and the count in the 8th. This is kind of not so important now, i need to first identify and validate the checksum, I'm pretty confident with the implementation in LabVIEW.Īny help/leads would be helpful and appreciated. I'm trying to implement this in LabVIEW and im using the XNET API's. One more question I have is, while calculating the checksum (in this case), can I ignore the 7th byte(where checksum is inserted) and use the remaining 7 bytes including the count? I tried that route and used the standard CRC8, CRC8_SAE_J1850, CRC8_SAE_J1850_Zero but none that works. I'm trying to reverse engineer and validate what checksum method and polynomial was used, so that I can play and change the msgs. From the below logs, F9,F0,F6 and EE is the checksum. So I tried using an online CRC calculator to derive the Polynomial but I'm unable to arrive there. Ive added below some sample logs collected from the module. Now in my msg, the checksum is at the 7th byte and the count is in the 8th byte. It looks like the CAN message has a count and a checksum as part of the payload, so every time I change a msg, i need to modify the counter recalculate the checksum. #8 bit checksum calculator online softwareI'm working on a gateway application that will disengage a real ecu and simulate in the software using CAN msgs for automotive. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |