good morning. I am trying to understand about arduino serial communication with Honda k-line protocol. here I include a link to github link that discusses the communication. here I want to ask if there are any friends who can help me to better understand how to generate checksum value from the code snippet in github. so here is an example of the code:
DESCRIPTION:
Request = 72 AA BB CC CS
72 = Request Header Code
AA = Number of Bytes (including the Checksum)
BB = Query Table
CC = Table
CS = Checksum
CHECKSUM
Usually to make a data table can be started from 00 to FF. With code 72 05 71 ZZ CS
Where ZZ = data table 00 to FF and CS = Checksum
The formula checksum = 100 - (sumbyte and FF)
For example the data request Table 13 = 72 05 71 13 CS Then the checksum value = 100 - ((72 + 05 + 71 + 13) AND FF) , result CS = 05
So the data request table 13 = 72 05 71 13 05
how can i generate the checksum value 05 from the table
Thank you for your response, but here I only quote the code from github. I have included the link above. There is a code snippet to find out the correct checksum value so that serial communication with k-line gets a valid response. However, I don't understand where the value of 0x05/(05) comes from, which is obtained from the formula he explained in his post. What I want to know is how to generate the checksum value from the formula he gave
It is true what you said, sir. It's just that the checksum value in the file is generated/formulated by him. Here I want to understand how the person can generate the checksum value using the formula he provided. This is very important in developing the program code that I am trying to develop, it's just that here I can't understand how to calculate the formula. The person actually has a TEFA SOLUSINDO YouTube channel. It's just that in his videos he never really explains the process clearly. He seems to want his viewers to collect puzzles and find their own solutions to breaking communication with the ECU
as you know the .txt file included in the post is a request for live data on the ecu. to be able to display standard sensor values and engine speed. it is important to understand the formula to handle more requests. for example to clear DTC. to read the ECU id. and also to find out the SMARTKEY ID that can be used for damaged / lost remote vehicles and don't forget the remote id. if you don't know the SMARTKEY id then it will be difficult to register a new remote. automatically have to replace the SCU and ECU One package. and the price is quite high. therefore I want to make an affordable tool to be able to handle the read data procedure on the ECU. for very urgent matters I hope you understand the meaning of what I am trying to explain