iDoka / awesome-canbus

:articulated_lorry: Awesome CAN bus tools, hardware and resources for Cyber Security Researchers, Reverse Engineers, and Automotive Electronics Enthusiasts.
Creative Commons Zero v1.0 Universal
2.23k stars 278 forks source link

Decoding ID CAN and Data #9

Closed hicham-vv closed 2 years ago

hicham-vv commented 2 years ago

hello i communicate with a ford cargo truck using MCP2551 (can 29bits , 250kbps) , and i read data successfully from the CAN H and CAN L, my problem that i want to decodate this datas to a r humain readble value like fuel level , distance traveled by the truck, speed rpm .... i was searching if the officiel website of can provide me such informations to help , but i didn't find nothing, if u have some ressources that can help me or advices i will appreciate your help

here an example of data that i got for the can

` 8CF00400 8 20 7E 89 C0 12 0 F3 89

98FE4F0B 8 C4 0 FF FF FF FF FF FF 8CF00400 8 10 7E 89 C4 12 0 F3 89 98FF8503 8 40 0 0 7D 86 7E FF FF 8C000003 8 F0 FF FF FF FF FF FF FF 8CF00400 8 40 7E 89 B8 12 0 F3 89 8CF00400 8 70 7E 88 CC 12 0 F3 88 98FF8503 8 40 0 0 7D 86 7E FF FF 8C000003 8 F0 FF FF FF FF FF FF FF 8CF00400 8 0 7E 89 C8 12 0 F3 89 8CF00400 8 50 7E 89 B4 12 0 F3 89 98F00503 8 7D FF FF 7D FF FF FF FF 98FD1521 8 F1 7D BE 1F CE FF 24 D2 8CF00400 8 10 7E 89 C4 12 0 F3 89 8CFE6CEE 8 3F F CF C0 0 0 0 0 98FE4A03 8 FF DC 33 FF FF FF FF FF 8CF00400 8 10 7E 89 C4 12 0 F3 89 8CF00400 8 30 7E 89 BC 12 0 F3 89 8CF00203 8 CC 0 0 0 FC C7 12 FF 8C000003 8 F0 FF FF FF FF FF FF FF 98D0EE17 8 64 FF FF FF FF FF FF FF 8CF00400 8 30 7E 89 BC 12 0 F3 89 8CF00203 8 CC 0 0 0 FC AD 12 FF 98F00F52 8 FF FF FF FF FF FF FF FF 8CF00400 8 30 7E 89 BC 12 0 F3 89 98F0010B 8 0 0 C3 FF FF 1 FF FF 8CF00203 8 CC 0 0 0 FC B4 12 FF 98FED917 8 17 FD 14 FF FF FF F FF 8CF00203 8 CC 0 0 0 FC CD 12 FF 98FEBF0B 8 0 0 7D 7D 7D 7D FF FF 8C010000 8 FF FF FD FF FF FC FC FF 8CF00203 8 CC 0 0 1 FC B6 12 FF 98F0090B 8 3B 7D 7F 7B 7D 5F 7C 7D 8CF00400 8 40 7E 89 B8 12 0 F3 89 98FE4A03 8 FF DC 33 FF FF FF FF FF 8CF00203 8 CC 0 0 0 FC CB 12 FF 98FEF100 8 F7 0 0 4 0 0 3 C0 8CF00400 8 20 7E 89 C0 12 0 F3 89 98FED917 8 17 FD 14 FF FF FF F FF 8C010021 8 FF FF FF FF 0 0 FF 0 8CF00203 8 CC 0 0 0 FC D0 12 FF 8CF00300 8 D1 0 19 FF FF FF 79 FF 8CF00203 8 CC 0 0 0 FC C8 12 FF 8C010021 8 FF FF FF FF 0 0 FF 0 8CF00400 8 70 7E 88 CC 12 0 F3 88 8C000003 8 F0 FF FF FF FF FF FF FF 8CF00400 8 10 7E 89 C4 12 0 F3 89 8CFE6CEE 8 3F F CF C0 0 0 0 0 98F0010B 8 0 0 C3 FF FF 1 FF FF 98FED917 8 17 FD 14 FF FF FF F FF 98FDC40B 8 1F FC FF FF FF FF FF FF 8CF00400 8 10 7E 89 C4 12 0 F3 89 8CF00300 8 D1 0 19 FF FF FF 79 FF 98FF0A21 8 F1 8C AB 3 C4 1 FF FF 98F0090B 8 3B 7D 7F 77 7D 67 7C 7D 8CF00400 8 20 7E 89 C0 12 0 F3 89 8CF00300 8 D1 0 18 FF FF FF 79 FF 98FEAE17 8 FF FF 7D 7E FF FF FF FF 98FEE421 8 FF FF 0 0 FF FF FF BF 98FEBF0B 8 0 0 7D 7D 7D 7D FF FF 98F0010B 8 0 0 C3 FF FF 1 FF FF
8CF00203 8 CC 0 0 0 FC DD 12 FF 98F00F52 8 FF FF FF FF FF FF FF FF 8CF00400 8 0 7E 89 C8 12 0 F3 89 8CF00203 8 CC 0 0 0 FC BE 12 FF 8CFE6CEE 8 3F F CF C0 0 0 0 0 8CF00400 8 0 7E 89 C4 12 0 F3 89 98FEF200 8 2A 0 0 0 0 0 FF 0 8CF00400 8 0 7E 89 C4 12 0 F3 89 98FED917 8 17 FD 14 FF FF FF F FF 98FEFF00 8 FC 0 0 23 8B 80 FF FE 8CF00203 8 CC 0 0 0 FC BB 12 FF 88FF500B 8 0 0 0 0 0 0 20 9D 8CF00203 8 CC 0 0 0 FC D4 12 FF 8CF00400 8 10 7E 89 C0 12 0 F3 89 8C000003 8 F0 FF FF FF FF FF FF FF 98F00F52 8 FF FF FF FF FF FF FF FF 8CF00400 8 70 7E 88 C8 12 0 F3 88 8CF00400 8 0 7E 89 C4 12 0 F3 89 8CF00203 8 CC 0 0 0 FC B7 12 FF 98F00F52 8 FF FF FF FF FF FF FF FF 8C010021 8 FF FF FF FF 0 0 FF 0 8CF00203 8 CC 0 0 0 FC BE 12 FF 88FF500B 8 0 0 0 0 0 0 C0 5C 98FDA421 8 3F FF FF FF 3F FF FF FF 8CF00400 8 70 7E 88 C8 12 0 F3 88 8CF00203 8 CC 0 0 1 FC B2 12 FF 8CF00203 8 CC 0 0 0 FC BC 12 FF 8CF00400 8 30 7E 89 B8 12 0 F3 89 8CF00203 8 CC 0 0 0 FC C2 12 FF 8C010000 8 FF FF FD FF FF FC FC FF 8CF00400 8 20 7E 89 BC 12 0 F3 89 98F00621 8 FF CF FF 3F FC FF FF FF 8C000003 8 F0 FF FF FF FF FF FF FF 98F0010B 8 0 0 C3 FF FF 1 FF FF 98F0090B 8 3B 7D 7F 7B 7D 5F 7C 7D 98FE7003 8 FF 8C FF FF FF FF FF FF 8CF00203 8 CC 0 0 0 FC C9 12 FF 98FEDF00 8 84 8C 1 B 7E 13 3 50 8CF00400 8 0 7E 89 C4 12 0 F3 89 8C000003 8 F0 FF FF FF FF FF FF FF 8CF00400 8 70 7E 88 C8 12 0 F3 88 8CF00300 8 D1 0 19 FF FF FF 79 FF 98FDA421 8 3F FF FF FF 3F FF FF FF 8C000003 8 F0 FF FF FF FF FF FF FF 8CF00400 8 70 7E 88 C8 12 0 F3 88 98FDA403 8 FF FF F FF FF FF FF FF 8CF00400 8 30 7E 89 B8 12 0 F3 89 8CF00203 8 CC 0 0 0 FC D1 12 FF 98F0010B 8 0 0 C3 FF FF 1 FF FF 8C010000 8 FF FF FD FF FF FC FC FF 98FE4F0B 8 C4 0 FF FF FF FF FF FF 98FEBF0B 8 0 0 7D 7D 7D 7D FF FF 8CF00400 8 10 7E 89 C0 12 0 F3 89 `

bdlightner commented 2 years ago

Off hand those look like J1939 OBD broadcast packets to me. What is the make/model and VIN of the truck? Decoding the CAN packets is straightforward---with access to the SAE J1939 standards documents. Unfortunately, those are not cheap to purchase.

hicham-vv commented 2 years ago

here it's the model of the truck, i am beginner :D ,i read the SAE j1939 document and i find it interesting thing, i just know like if the truck model support already some ID can " PGN" like fuel level, distance....
https://autoline.co.ma/-/vente/camions-chassis/FORD-Trucks-1833-DC--18110720533240961800

bdlightner commented 2 years ago

Let's take this offline. Please email me at lightner@lightner.net

bdlightner commented 2 years ago

@hicham-vv: The J1939 standard defines well over 5000 OBD parameters (SPNs) that can appear on the CAN-bus. Those SPN data fields are grouped into 8-byte PGN CAN-bus packets, each of which contains one or more SPN data fields. Some PGN data packets are broadcast automatically (as often as 100 times per second) but other PGN packets are only sent upon a specific request from a "scan tool". Processing all of the J1939 data flowing over the CAN-bus in real-time is sometimes characterized as "drinking from a fire hose". IMHO without the copyrighted SAE J1939/71 "companion spreadsheet", which defines the location of the 5000+ SPN fields within the 1000s of potential PGN packets, making sense of the CAN-bus data flowing out of the typical J1939 vehicle is virtually impossible.

bdlightner commented 2 years ago

@hicham-vv: Using Google I found this spreadsheet, which probably shows all the J1939/71 vehicle data that you'd be interested in:

https://www.schneider-electric.com/library/SCHNEIDER_ELECTRIC/SE_LOCAL/APS/205363_1726/sae_j_1939_spreadsheet_supported_by_TwidoExtreme.xls

That's a total of 2390 SPNs. Good luck! :-)

iDoka commented 2 years ago

won't fix