![]() |
![]() |
#16 |
Membre habitué T-E
Date d'inscription: mai 2015
Localisation: Grenoble
Messages: 110
Thanks: 36
Thanked 104 Times in 26 Posts
Pouvoir de réputation: 11 ![]() ![]() |
![]()
Je pense qu'en se servant du P1621 (DSM_CDKDfp_WdCom_C) qui se trouve (toujours) à la fin des tables code_path (4 x uword) et code_fault (uword), on doit pouvoir arriver à trouver les adresses et le nombre de DTC. Ça marche sur ma carto en 1037386127/C45452B.
Apparemment la class_map se termine (toujours) juste avant un 0x2D qui est le début de la table d’environnement des défauts (DSM_EnvDfp_ACCDPresAna_C). Les toujours sont à confirmer et à tester sur d'autres dumps. |
![]() |
![]() |
![]() |
#17 |
Membre habitué T-E
Date d'inscription: mai 2015
Localisation: Grenoble
Messages: 110
Thanks: 36
Thanked 104 Times in 26 Posts
Pouvoir de réputation: 11 ![]() ![]() |
![]()
Salut,
Voila un bout de code java qui trouve les adresses. J'ai essayé sur quelques dump et ça a l'air d'être bon. Mais comme dit dans les commentaires, j'ai bien peur que ça foire sur les véhicules sans clim. J'essayerai de dumper le berlingo 1.6 HDI 90cv de ma belle mère qui n'a pas la clim. Si des âmes charitable ont des dumps (pas forcement full) de véhicule sans clim,ce serait sympa de les poster. Merci Code:
package DTCController; import java.io.IOException; import java.nio.file.Files; import java.nio.file.Path; import java.nio.file.Paths; /** * Class to read, write and find DTC info from a dump */ public class Dump { public static int DUMP_SIZE = 2048*1024; // 2MBytes public static final int A2L_REF = 0x1C001A; public static final int SWT_REF = 0x1C0010; public static final int MAX_DTC = 0xFFFF; byte[] memory; String software; String project; class DTCInfo { int nbDTC; // Number of DTC int faultPathAddr; // Fault path (list of 4 UWORD) int codeAddr; // Fault code (list of UWORD) int classAddr; // Fault class (list of UBYTE), The class defines the default behavior @Override public String toString() { return "DTCInfo{" + "nbDTC=" + nbDTC + ", faultPathAddr=" + String.format("%06X",faultPathAddr) + ", codeAddr=" + String.format("%06X",codeAddr) + ", classAddr="+ String.format("%06X",classAddr) + '}'; } } public Dump(String fileName) throws IOException { Path p = Paths.get(fileName); memory = Files.readAllBytes(p); StringBuffer sft = new StringBuffer(); for(int i=0;i<10;i++) sft.append((char)memory[SWT_REF+i]); software = sft.toString(); StringBuffer a2l = new StringBuffer(); for(int i=0;i<8;i++) a2l.append((char)memory[A2L_REF+i]); project = a2l.toString(); System.out.println(fileName + ":" + software + "/" + project); } public void write(String fileName) throws IOException { Path p = Paths.get(fileName); Files.write(p,memory); } public DTCInfo findDTCInfo() throws IOException { DTCInfo ret = new DTCInfo(); // Known software // Please add kwonw projects there if (project.equals("C35374A_")) { // 206 1.6 HDI 110cv FAP ret.nbDTC = 195; ret.faultPathAddr = 0x1C5F96; ret.codeAddr = 0x1C65AE; ret.classAddr = 0x1C6734; } else if (project.startsWith("C")) { // PSA strategy, we assume that: // Last code of the codeTable is P1162 // This code corresponds to DSM_CDKDfp_WdCom_C (ECU failure) sorted by alphabetic order when damos is generated // All vehicle should have this default (even if disabled) // PSA defines 30 classes for default // Try to find an occurrence of 0x16210D // 0x0D is the first class of the AirConditioningComponentDriver Pressure default (ACCDPresAna_C) // Then we parse the classTable containing value in [0..30] up the 0x2D // 0x2D correspond to the first byte of the code environment table that defines how code path are triggered // This might fail if the vehicle has no Air Conditioning ret.classAddr = search(new byte[]{0x16,0x21,0x0D}) + 2; if(ret.classAddr<0) throw new IOException("Cannot find DTC Table, please contribute to this project to add new platform."); ret.nbDTC = 0; while(ret.nbDTC<MAX_DTC && memory[ret.classAddr+ret.nbDTC]<=30) { ret.nbDTC++; } if(ret.nbDTC>=MAX_DTC) throw new IOException("Cannot find DTC Table, please contribute to this project to add new platform."); ret.codeAddr = ret.classAddr - ret.nbDTC*2; ret.faultPathAddr = ret.codeAddr - ret.nbDTC*8; } else { throw new IOException("Cannot find DTC Table, please contribute to this project to add new platform."); } return ret; } @Override public String toString() { return "Dump{" + "memory=" + memory.length + ", software='" + software + '\'' + ", project='" + project + '\'' + '}'; } private boolean match(int add, byte[] pattern) { boolean equal = true; int i = 0; while(equal && i<pattern.length) { equal = pattern[i] == memory[add + i]; i++; } return equal; } private int search(byte[] pattern) { int add = 0x1C0000; boolean found = false; while(!found && add<DUMP_SIZE-pattern.length) { found = match(add, pattern); if (!found) add++; } if(!found) return -1; else return add; } } |
![]() |
![]() |
![]() |
#18 |
Membre habitué T-E
Date d'inscription: mai 2015
Localisation: Grenoble
Messages: 110
Thanks: 36
Thanked 104 Times in 26 Posts
Pouvoir de réputation: 11 ![]() ![]() |
![]()
Résultat du prog sur ma 207 1.6 HDI 110 (2008)
Désolé pas bcp de temps ce weekend. J'améliore l'algo de finding pour être indépendant de clim ou pas clim. Je vais aussi gérer les classes de défaut et les environnements. Normalement, j'espère pouvoir être en mesure de pouvoir décider si: - Un défaut déclenche ou non le voyant moteur - Il est reporté on non à l'OBD standard (visible par le contrôle technique ou pas, Dans ce cas, il faudra impérativement diagbox pour le voir) - Si il affecte ou non les compteurs d'usures (à voir) - Gérer les d'autres project que PSA (pas le même nombre de classe) Le code sera full OpenSource et disponible sur GitHub (Par contre tout en anglais pour donner l'accès au plus grand nombre) Code:
Dump{memory=2097152, software='1037386127', project='C45452B_'} DTCInfo{nbDTC=236, faultPathAddr=1C9C2A, codeAddr=1CA38A, classAddr=1CA562} Code Path Class 000 P0530 => P0533 P0532 P0000 P0000 13 001 P1506 => P0000 P0000 P1506 P1506 16 002 P0610 => P1667 P1667 P1667 P1667 23 003 P0102 => P0000 P0000 P0000 P0000 0 004 P0103 => P0000 P0000 P0000 P0000 0 005 P0111 => P0113 P0112 P0000 P0000 6 006 P0000 => P0000 P0000 P0000 P0000 0 007 P0104 => P0000 P0000 P0000 P0000 0 008 P0101 => P3007 P0000 P0000 P0000 2 009 P0109 => P0000 P3008 P0000 P0000 2 010 P0111 => P0000 P0000 P0000 P0000 0 011 P0100 => P0000 P0000 P0000 P0000 0 012 P0105 => P1590 P1589 P0000 P0000 2 013 P0106 => P0000 P0000 P0000 P0000 0 014 P0107 => P0103 P0102 P0104 P0000 2 015 P0108 => P0000 P0000 P0000 P0000 0 016 P1483 => P2420 P2419 P2419 P2418 26 017 P1403 => P1403 P1403 P1403 P1403 16 018 P1404 => P1404 P1404 P1404 P1404 16 019 P1484 => P0000 P0000 P0000 P0000 13 020 P0000 => P2603 P0000 P2601 P0000 26 021 P0220 => P0223 P0222 P0000 P2137 23 022 P0225 => P0228 P0227 P0000 P2137 23 023 P1614 => P1644 P1643 P1614 P1645 13 024 P1101 => P0108 P0107 P0000 P0069 6 025 P0224 => P0220 P0000 P0000 P0224 0 026 P1628 => P0000 P0000 P0000 P2299 13 027 P1444 => P1444 P0000 P0000 P0000 0 028 P1443 => P0000 P1443 P0000 P0000 0 029 P1434 => P0000 P0000 P1434 P1434 0 030 P1435 => P2408 P0000 P0000 P0000 12 031 P1436 => P1435 P1433 P1434 P0000 12 032 P1437 => P0000 P0000 P0000 P0000 0 033 P1445 => P0000 P0000 P0000 P1445 16 034 P1442 => P0000 P0000 P0000 P1446 16 035 P1446 => P0000 P0000 P0000 P1446 16 036 P2413 => P2413 P0000 P0000 P0000 0 037 P0401 => P0402 P0000 P0000 P0000 7 038 P0402 => P0000 P0401 P0000 P0000 11 039 P0404 => P0000 P0000 P0000 P0100 15 040 P1505 => P1505 P0000 P0000 P0000 13 041 P0000 => P1528 P1527 P0000 P1526 13 042 P0246 => P0246 P0000 P0000 P0000 18 043 P0245 => P0000 P0245 P0000 P0000 19 044 P0243 => P0000 P0000 P0243 P0243 18 045 P2562 => P2562 P2562 P0000 P0000 0 046 P2564 => P2565 P2564 P0000 P0000 0 047 P2565 => P0000 P0000 P0000 P2566 0 048 P2563 => P2566 P0000 P0000 P0000 0 049 P2566 => P2566 P0000 P0000 P0000 0 050 P2263 => P2563 P0000 P2563 P0000 0 051 P0235 => P0238 P0237 P0000 P0069 10 052 P0560 => P0563 P0562 P0000 P0000 6 053 P0571 => P0571 P0000 P0571 P1536 13 054 P1151 => P2123 P0000 P0000 P0000 14 055 P1154 => P0000 P2122 P0000 P0000 5 056 P1150 => P0000 P0000 P2124 P2124 14 057 P1156 => P2128 P2127 P0000 P0000 22 058 P1466 => P0000 P0000 P0000 P1470 26 059 P1465 => P2125 P0000 P0000 P0000 14 060 P1109 => P2126 P0000 P0000 P0000 14 061 P1152 => P2120 P2121 P0000 P0000 14 062 P1159 => P1152 P0000 P0000 P0000 26 063 P0115 => P0118 P0117 P0119 P0000 6 064 P0000 => P0000 P0000 P0000 P0000 0 065 P0116 => P0000 P0000 P0000 P0115 4 066 P0301 => P0000 P0000 P0000 P0000 0 067 P0302 => P0000 P0000 P0000 P0000 0 068 P0303 => P0000 P0000 P0000 P0000 0 069 P0304 => P0000 P0000 P0000 P0000 0 070 P0305 => P0000 P0000 P0000 P0000 0 071 P0306 => P0000 P0000 P0000 P0000 0 072 P0300 => P0000 P0000 P0000 P0000 0 073 P0000 => P16A0 P0000 P0000 P0000 0 074 P1199 => P1199 P0000 P0000 P0000 0 075 P1625 => P1625 P0000 P0000 P0000 16 076 P0704 => P0000 P0704 P0704 P0704 13 077 P0705 => P0000 P0000 P0000 P0000 0 078 P1671 => P0568 P0568 P0565 P0569 13 079 P0114 => P0111 P0000 P0000 P0000 0 080 P1615 => P1615 P0000 P0000 P0000 13 081 P1613 => P0000 P0000 P0000 P1613 23 082 P0407 => P2413 P2413 P2413 P2413 11 083 P1410 => P0000 P0000 P0000 P0000 0 084 P1409 => P0000 P0000 P0000 P0000 0 085 P0408 => P2145 P2144 P2143 P0000 11 086 P0406 => P2145 P2144 P2143 P0000 11 087 P0403 => P0000 P0000 P2144 P0000 0 088 P0403 => P0000 P0000 P0000 P0000 0 089 P0405 => P0406 P0405 P0000 P0000 2 090 P1462 => P0000 P0000 P0000 P0409 26 091 P1461 => P1461 P0000 P0000 P0000 11 092 P1100 => P1462 P0000 P0000 P0000 11 093 P1162 => P0490 P0000 P0000 P0000 11 094 P1162 => P0000 P0489 P0000 P0000 7 095 P1163 => P1162 P0000 P0000 P0000 26 096 P0000 => P119F P0000 P0000 P0000 0 097 P0011 => P0000 P0000 P0000 P0000 0 098 P0012 => P0000 P0000 P0000 P0000 0 099 P0013 => P0000 P0000 P0000 P0000 0 100 P0014 => P0000 P0000 P0000 P0000 0 101 P0015 => P0000 P0000 P0000 P0000 0 102 P0016 => P0000 P0000 P0000 P0000 0 103 P0021 => P0000 P0000 P0000 P0000 0 104 P0022 => P0000 P0000 P0000 P0000 0 105 P0023 => P0000 P0000 P0000 P0000 0 106 P0024 => P0000 P0000 P0000 P0000 0 107 P0025 => P0000 P0000 P0000 P0000 0 108 P0026 => P0000 P0000 P0000 P0000 0 109 P0340 => P0341 P0344 P0000 P0000 14 110 P0335 => P0335 P0339 P0000 P0000 14 111 P0000 => P0016 P0000 P0000 P0000 14 112 P1727 => P0000 P0000 P0000 P0000 0 113 P0180 => P0183 P0182 P0000 P0000 12 114 P0483 => P0494 P0495 P0483 P0483 13 115 P0480 => P0691 P0691 P0692 P0691 13 116 P0481 => P0693 P0693 P0694 P0693 13 117 P1482 => P0000 P0000 P0000 P0000 0 118 P0000 => P0000 P0000 P0000 P0000 0 119 P0226 => P0000 P0000 P0000 P0221 0 120 P0000 => P0000 P0000 P0000 P0000 0 121 P1515 => P1393 P0000 P0000 P0000 0 122 PC028 => P0000 PC019 PC046 P0000 6 123 PC028 => PC055 P0000 P0000 PC028 5 124 P1800 => P1670 P0000 P0000 P0000 16 125 P1801 => P1670 P0000 P0000 P0000 16 126 P1802 => PD213 PD213 P0000 P0000 16 127 P1803 => PD213 P0000 P0000 P0000 16 128 P1804 => P1670 P0000 P0000 P0000 16 129 P0656 => P0463 P0462 P0000 P0461 18 130 PD209 => PC103 P0000 P0000 PC103 0 131 PD210 => PC103 P0000 P0000 PC103 0 132 P0700 => P0700 P0000 P0000 P0000 0 133 PD309 => P0000 P1394 P0000 P0000 0 134 P0000 => P0000 P0000 P0000 PC304 0 135 P1728 => P1728 P1728 P0000 P0000 16 136 P0000 => P0000 P0000 P0000 P0000 0 137 P1300 => P1349 P1350 P1350 P1349 14 138 P0000 => P0000 P0000 P0000 P0000 0 139 P0382 => P1352 P0000 P0000 P0000 10 140 P0380 => P0000 P1351 P0000 P0000 14 141 P0611 => P1641 P0000 P0000 P0000 16 142 P0603 => P0603 P0603 P0603 P0603 6 143 P0604 => P0000 P0000 P0000 P0606 16 144 P0605 => P0000 P0000 P0000 P0000 0 145 P0606 => P0000 P0000 P0000 P0606 16 146 P0620 => P1634 P0000 P0000 P0000 16 147 P0621 => P0000 P1633 P0000 P0000 16 148 P0110 => P0098 P0097 P0000 P0000 6 149 P1612 => P1612 P0000 P0000 P0000 13 150 P0001 => P0000 P0000 P0000 P0000 0 151 P0200 => P2148 P2148 P0000 P2148 9 152 P0210 => P0000 P0000 P2146 P0000 27 153 P0211 => P2151 P2150 P0000 P2150 0 154 P0212 => P0000 P0000 P2149 P0000 0 155 P1169 => P1197 P1197 P1197 P1197 9 156 P1170 => P1197 P1197 P1197 P1197 9 157 P0201 => P0262 P0000 P1366 P1366 9 158 P0263 => P0000 P0000 P0201 P0000 9 159 P0202 => P0265 P1367 P1367 P1367 9 160 P0266 => P0000 P0000 P0202 P0000 9 161 P0203 => P0268 P1368 P1368 P1368 9 162 P0269 => P0000 P0000 P0203 P0000 9 163 P0204 => P0271 P1369 P1369 P1369 9 164 P0272 => P0000 P0000 P0204 P0000 9 165 P0000 => P0000 P0000 P0000 P0000 0 166 P0000 => P0000 P0000 P0000 P0000 0 167 P0000 => P0000 P0000 P0000 P0000 0 168 P0000 => P0000 P0000 P0000 P0000 0 169 P0000 => P0650 P0650 P1642 P0650 0 170 P0215 => P0215 P0215 P0000 P0000 13 171 P1210 => P0000 P0000 P0001 P0001 9 172 P1209 => P0004 P0000 P0000 P0000 9 173 P1208 => P0000 P0003 P0000 P0000 9 174 P1207 => P0002 P0002 P0002 P0000 12 175 P1700 => P0000 P0000 P0000 P1700 16 176 PD113 => PC121 P0000 P0000 P0000 22 177 P0000 => P0000 P0000 P0000 P0000 0 178 PD118 => PD118 P0000 P0000 P0000 22 179 PD109 => PC103 P0000 P0000 P0000 0 180 PD003 => PD003 P0000 P0000 P0000 22 181 PD213 => PC122 P0000 P0000 P0000 22 182 PD000 => PD000 P0000 P0000 P0000 22 183 P0195 => P0000 P0000 P0000 P0000 0 184 P1631 => P1631 P0000 P0000 P0000 16 185 P1634 => P1631 P0000 P0000 P0000 16 186 P1411 => P9004 P9004 P9004 P9004 0 187 P0247 => P0299 P0000 P0000 P0000 26 188 P0248 => P0000 P0234 P0000 P0000 27 189 P1416 => P2033 P2032 P2031 P0000 6 190 P1429 => P0473 P0472 P0000 P0470 6 191 P1475 => P0470 P0000 P0000 P0000 19 192 P1457 => P1457 P0000 P0000 P0000 6 193 P1447 => P1447 P0000 P0000 P0000 19 194 P0420 => P0420 P0000 P0000 P0000 13 195 P1448 => P1490 P0000 P0000 P0000 16 196 P1639 => P0687 P0686 P1639 P1640 13 197 P0565 => P1607 P1607 P1607 P1607 13 198 P1600 => P0000 P1600 P0000 P1600 23 199 P0190 => P0193 P0192 P0000 P0000 9 200 P1164 => P0000 P0000 P0000 P0000 0 201 P0230 => P0087 P0000 P0000 P0000 9 202 P0231 => P0093 P0000 P0000 P0000 27 203 P0232 => P0088 P0000 P0000 P0000 9 204 P1113 => P1113 P0000 P0000 P0000 9 205 P1166 => P1166 P0000 P0000 P0000 9 206 P0173 => P0000 P0000 P0000 P0000 0 207 P1186 => P0000 P1199 P1199 P1199 20 208 P1186 => P1199 P0000 P0000 P0000 20 209 P1632 => P0000 P0606 P0606 P0606 23 210 P0608 => P0659 P0658 P0000 P0000 5 211 P0609 => P2671 P2670 P0000 P0000 5 212 P1710 => P1587 P1586 P0000 P0000 5 213 P1694 => P1694 P1695 P0000 P0000 0 214 P1693 => P1693 P1693 P1693 P1696 0 215 P0615 => P0617 P0000 P0615 P0615 13 216 P0000 => P0000 P0000 P0000 P0000 0 217 P1511 => P0000 P0000 P2530 P0000 13 218 PE000 => PE000 P0000 PE000 PE003 0 219 PE118 => PE118 P0000 P0000 P0000 0 220 P1635 => P0000 P0000 P0000 P0000 0 221 P0123 => P2142 P0000 P0000 P0000 11 222 P0122 => P0000 P2141 P0000 P0000 7 223 P0120 => P0000 P0000 P1471 P1471 11 224 P0121 => P0123 P0122 P0000 P0000 2 225 P1464 => P0000 P0000 P0000 P2111 26 226 P1463 => P0120 P0000 P0000 P0000 11 227 P1153 => P0121 P0000 P0000 P0000 11 228 P1161 => P0487 P0488 P0000 P0000 2 229 P1155 => P1161 P0000 P0000 P0000 26 230 P0000 => P0000 P0000 P0000 P0000 0 231 P1107 => P0000 P0000 P0000 P0000 0 232 P0501 => P0500 P0000 P0503 P0501 0 233 P1504 => P0500 P0000 P0500 P0000 6 234 P0500 => P0000 P0000 P0000 P0000 0 235 P1621 => P0000 P0000 P0000 P0000 0 |
![]() |
![]() |
![]() |
#19 |
Membre habitué T-E
Date d'inscription: mai 2015
Localisation: Grenoble
Messages: 110
Thanks: 36
Thanked 104 Times in 26 Posts
Pouvoir de réputation: 11 ![]() ![]() |
![]()
Salut,
Je jette un oeil sur les classes de DTC. Est-ce que quelqu'un aurait une idée de ce qu'est le SysLamp ? Le voyant moteur, c'est le MIL (Malfunction Indication Lamp). Merci ![]() |
![]() |
![]() |
![]() |
#20 |
Membre habitué T-E
Date d'inscription: mai 2015
Localisation: Grenoble
Messages: 110
Thanks: 36
Thanked 104 Times in 26 Posts
Pouvoir de réputation: 11 ![]() ![]() |
![]()
Hello,
Un aperçu de l'interface: Bientôt dispo. ![]() |
![]() |
![]() |
Sponsored Link |
![]() |
Liens sociaux |
|
|
![]() |
||||
Discussion | Auteur | Forum | Réponses | Dernier message |
Table BDM Maison | Adrien13 | Pinout calculateurs et bootmode | 7 | 24/11/2015 10h40 |
lire une bsi 307 2.0 sur table | soustourou | Flasheur de calculateur | 2 | 20/05/2015 00h31 |
edc15 c2 sur table | Actif-Car | Flasheur de calculateur | 4 | 23/02/2014 20h52 |
diagnostiques sur table ?? | sebdepierrechat | Réparation & Programmation des calculateurs | 3 | 23/02/2014 17h52 |
recuperer ori edc15c2 PSA sur table | CED300482 | Fichiers d'origine, carto, dump, fullbackup | 7 | 19/12/2013 00h45 |