Page 28 of 39
Re: Open source GM OBD2 flash tool using a ELM327 device
Posted: Thu Apr 05, 2018 2:02 am
by Thaniel
Well sorry for slow reply. Other projects and family life keep me busy. Did try the Schotky diodes and also built the listener circuit of the all pro and another send circuit using a comparator of our own design. Not enough time to build all the circuits yet. But have learned quite a bit about what is going on. Which I find interesting but doubt many here will. So won't clutter up this thread. Long story short is that my issue reading before changing diodes appears to have more to do with the ECU expecting certain times between certain message responses. And since the data was coming out 4x faster my program was responding sooner than expected. Or in other words it was reading my messages but it just didn't like when I sent them. The 1N4002 and the BAT46 diodes functioned good enough to work at 4x mode. let's see what else.
Oh we updated our code to get the VPW CRC on the very long messages to work. And nailed down the data CRC formula. Need to do some more testing on that But the data CRC appears to be a "Checksum-16 = Sum_of_all_bytes(file) mod 2^16". So a very simple formula.
cjcalhoun85 wrote:Would a blocking diode arrangement with pull ups on the mega work? I have a ds1054z oscilloscope and a mega with components. I also have a bench harness, 2 spare 1mb pcm's and hptuners. I am currently using the blocking diode arrangement for the crank and cam sensor inputs from a ls to a Arduino mega and it works great for that. I have visual studio on my laptop also. I am pretty much lost at coding but if I could be any help with testing anything just let me know.
Lots of different circuits would work. At least as long as the program being used is setup for the circuit it has. If you want to play with ardunio stuff drop me an e-mail (think there is a way to do that through this forum).
Thaniel
Re: Open source GM OBD2 flash tool using a ELM327 device
Posted: Thu Apr 05, 2018 9:15 am
by antus
Im glad you got the 16 bit sum sorted. I believe 160baud passed on the link after I released that part of my work so you were able to adapt it for the arduino. Your welcome. You dont need the mod 2^16 if you just use a 16 bit variable and let it overflow. That part of the filter is the nature of the size of the storage, rather than part of the function explicitly.
https://github.com/LegacyNsfw/PcmHacks/ ... ry.cs#L178
Re: Open source GM OBD2 flash tool using a ELM327 device
Posted: Sat Apr 07, 2018 8:28 am
by cjcalhoun85
Pm sent thaniel
Re: Open source GM OBD2 flash tool using a ELM327 device
Posted: Sat Apr 07, 2018 9:37 pm
by Thaniel
cjcalhoun85 wrote:Pm sent thaniel
Got it. I'll drop you an email
antus wrote:Im glad you got the 16 bit sum sorted. I believe 160baud passed on the link after I released that part of my work so you were able to adapt it for the arduino. Your welcome. You dont need the mod 2^16 if you just use a 16 bit variable and let it overflow. That part of the filter is the nature of the size of the storage, rather than part of the function explicitly.
https://github.com/LegacyNsfw/PcmHacks/ ... ry.cs#L178
Thanks for sharing. But no we didn't extract the checksum calculation from the 300 lines of code you posted. You may have guessed this since we posted the checksum formula with the modulus function. Letting it overflow is interesting to know.
Finding that checksum was like number 30 on the to do list. But one day when looking at a bin read in a hex editor my son noticed a menu selection for "calculate checksum". After picking through a few choices one matched. Looked up the formula for that style checksum and voila.
Re: Open source GM OBD2 flash tool using a ELM327 device
Posted: Sat Apr 07, 2018 10:31 pm
by antus
Oh, ok thats cool. 160baud asked on your behalf and I gave him the snippet and explained it believing he was passing it back to you (as well as describing it a few times in this thread on earlier pages). Im actually glad that you and your son figured it out independently, you can learn so much more on the same journey that way.
Re: Open source GM OBD2 flash tool using a ELM327 device
Posted: Thu Apr 12, 2018 4:50 am
by turbo_v6
This is amazing work, please keep it up.
I'm working on building a bench setup so that I can have most of the engine sensors so I can test tuning changes in a controlled environment. I modified my JimStim to output the low resolution 3 tooth crank trigger and 50/50 cam wheel that runs on my 4.3L truck. My truck runs a P59 PCM, but the OS is specific to the V6 so there isn't a ton of information available.
I'd be interested in doing testing once you guys get a cable to flash that is less than $100 because I've already spent too much on this hobby as it is.
Re: Open source GM OBD2 flash tool using a ELM327 device
Posted: Thu Apr 12, 2018 4:57 am
by antus
The odbdiag.net allpro
http://www.obddiag.net/allpro.html is working at 4x with 128 byte packets now, which is sufficient. The USB variant is recmmended. Alex (obddiag.net) has said he will accept a merge. Ive got a different RX led pin configured in my branch because ive got an older hardware board. Im also not sure of the upper packet size limit and want to make sure that is sain before sending the merge request. If you want to try it, see
https://github.com/antuspcm/allpro/tree/4xj1850 . The code should end up in master soon, then all allpros should have the support needed out of the box.
The app is looking decent too. The AVT support is behind, and the J2534 doesnt have 4x, but the foundations are starting to look pretty solid.

- Image2.png (82.56 KiB) Viewed 6278 times
Code: Select all
[04:26:54:417] Initializing ObdLink or AllPro on COM5
[04:26:54:464] TX: AT Z
[04:26:54:542] ELM327 v2.1-ant1
[04:26:54:542] TX: AT E0
[04:26:54:558] AT E0 OK
[04:26:54:558] TX: AT S0
[04:26:54:573] OK
[04:26:54:573] TX: AT I
[04:26:54:620] TX: ST I
[04:26:54:636] TX: AT #1
[04:26:54:683] Elm ID: ELM327 v2.1-ant1
[04:26:54:698] All Pro ID: Copyright (c) 2009-2018 ObdDiag.Net, PcmHacking.net This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
[04:26:54:698] TX: AT #3
[04:26:54:730] All Pro self test result: PWM wiring is OK VPW wiring is OK ISO9141/14230 wiring is OK CAN wiring is OK
[04:26:54:730] TX: AT RV
[04:26:54:745] Voltage: 13.5V
[04:26:54:745] TX: AT AL
[04:26:54:761] OK
[04:26:54:761] TX: AT SP2
[04:26:54:777] OK
[04:26:54:777] TX: AT DP
[04:26:54:792] SAE J1850 VPW
[04:26:54:792] TX: AT AR
[04:26:54:808] OK
[04:26:54:808] TX: AT SR F0
[04:26:54:823] OK
[04:26:59:042] TX: AT SH 6C 10 F0
[04:26:59:058] TX: 3C 01
[04:26:59:308] RX: 6C F0 10 7C 01 00 36 48 38 56 54
[04:26:59:308] TX: AT SH 6C 10 F0
[04:26:59:324] TX: 3C 02
[04:26:59:558] RX: 6C F0 10 7C 02 4B 36 39 46 58 4C
[04:26:59:574] TX: AT SH 6C 10 F0
[04:26:59:574] TX: 3C 03
[04:26:59:824] RX: 6C F0 10 7C 03 34 37 38 37 35 37
[04:26:59:824] VIN: 6H8VTK69FXL478757
[04:26:59:824] TX: AT SH 6C 10 F0
[04:26:59:839] TX: 3C 0A
[04:26:59:918] RX: 6C F0 10 7C 0A 00 BA 8A 32
[04:26:59:918] OS ID: 12225074
[04:26:59:933] TX: AT SH 6C 10 F0
[04:26:59:949] TX: 3C 08
[04:27:00:027] RX: 6C F0 10 7C 08 05 7D 2A 69
[04:27:00:027] Calibration ID: 92088937
[04:27:00:043] TX: AT SH 6C 10 F0
[04:27:00:043] TX: 3C 04
[04:27:00:136] RX: 6C F0 10 7C 04 00 F7 81 C2
[04:27:00:136] Hardware ID: 16220610
[04:27:00:152] TX: AT SH 6C 10 F0
[04:27:00:168] TX: 3C 05
[04:27:00:246] RX: 6C F0 10 7C 05 32 44 47 30
[04:27:00:261] TX: AT SH 6C 10 F0
[04:27:00:261] TX: 3C 06
[04:27:00:339] RX: 6C F0 10 7C 06 48 30 4C 36
[04:27:00:355] TX: AT SH 6C 10 F0
[04:27:00:355] TX: 3C 07
[04:27:00:433] RX: 6C F0 10 7C 07 39 31 36 39
[04:27:00:449] Serial Number: 2DG0H0L69169
[04:27:00:449] TX: AT SH 6C 10 F0
[04:27:00:464] TX: 3C 14
[04:27:00:543] RX: 6C F0 10 7C 14 43 52 55 4D
[04:27:00:543] Broad Cast Code: CRUM
[04:27:00:543] TX: AT SH 6C 10 F0
[04:27:00:558] TX: 3C A0
[04:27:00:652] RX: 6C F0 10 7C A0 00
[04:27:00:652] MEC: 0
[04:27:01:589] TX: AT SH 6C 10 F0
[04:27:01:605] TX: 27 01
[04:27:01:683] RX: 6C F0 10 67 01 4F 99
[04:27:01:683] TX: AT SH 6C 10 F0
[04:27:01:699] TX: 27 02 F9 FE
[04:27:01:777] RX: 6C F0 10 67 02 34
[04:27:01:777] PCM Unlocked
[04:27:01:793] Unlock succeeded.
[04:27:01:793] This interface does support VPW 4x
[04:27:01:793] TX: AT SH 6C FE F0
[04:27:01:808] TX: A0
[04:27:01:886] RX: 6C F0 FE E0 AA
[04:27:01:886] PCM is allowing a switch to VPW 4x
[04:27:01:902] Asking PCM to swtich to VPW 4x
[04:27:01:902] TX: AT SH 6C FE F0
[04:27:01:918] TX: A1
[04:27:01:980] SendMessage produced NO DATA
[04:27:01:996] AllPro setting VPW 4X
[04:27:01:996] TX: AT VPW4
[04:27:01:996] OK
[04:27:02:027] Loaded kernel.bin
[04:27:02:043] Going to load a 919 byte payload to 0xFF9150
[04:27:02:043] TX: AT SH 6C 10 F0
[04:27:02:058] TX: 34 00 00 8A FF 94 5D
[04:27:02:152] RX: 6C F0 10 74 00 44
[04:27:02:152] TX: AT SH 6D 10 F0
[04:27:02:168] TX: 36 00 00 8A FF 94 5D 10 00 01 67 00 00 0A 0C 28 00 FE 00 01 66 88 4E 75 13 FC 00 55 00 FF FA 27 13 FC 00 AA 00 FF FA 27 08 B9 00 07 00 FF D0 06 08 F9 00 07 00 FF D0 06 4E 75 61 00 FF DC 14 39 00 FF F6 0E 02 02 00 03 0C 02 00 03 67 EC 4E 75 28 63 29 32 30 31 33 20 41 6E 74 75 73 2F 50 43 4D 48 61 63 6B 69 6E 67 2E 6E 65 74 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 6C F0 10 60 6C F0 10 75 01 54 6C F0 10 36 00 00 00 00 00 00 28 B7
[04:27:02:308] RX: 6D F0 10 76 00 73
[04:27:02:308] TX: AT SH 6C 10 F0
[04:27:02:324] TX: 34 00 00 8A FF 93 C7
[04:27:02:386] RX: 6C F0 10 74 00 44
[04:27:02:386] TX: AT SH 6D 10 F0
[04:27:02:402] TX: 36 00 00 8A FF 93 C7 82 14 39 00 FF 94 E2 D2 82 14 39 00 FF 94 E3 D2 82 14 39 00 FF 94 E4 D2 82 14 39 00 FF 94 E5 D2 82 14 39 00 FF 94 E6 D2 82 4E 75 42 86 61 00 00 78 10 39 00 FF F6 0E 02 00 00 E0 0C 00 00 40 67 00 00 10 52 86 0C 86 00 30 00 00 67 00 FD E0 60 DC 20 7C 00 FF 94 C2 10 F9 00 FF F6 0F 61 00 00 48 10 39 00 FF F6 0E 02 00 00 E0 0C 00 00 40 66 00 00 10 52 86 0C 86 00 30 00 00 67 00 FD B0 60 D6 10 F9 00 FF F6 0F 20 7C 00 36 70
[04:27:02:543] RX: 6D F0 10 76 00 73
[04:27:02:543] TX: AT SH 6C 10 F0
[04:27:02:558] TX: 34 00 00 8A FF 93 31
[04:27:02:621] RX: 6C F0 10 74 00 44
[04:27:02:621] TX: AT SH 6D 10 F0
[04:27:02:636] TX: 36 00 00 8A FF 93 31 83 60 3A 61 00 01 38 13 FC 00 01 00 FF 94 E1 32 00 13 C1 00 FF 94 E3 E0 89 13 C1 00 FF 94 E2 4E BA 00 46 4E BA 01 3A 13 FC 00 04 00 FF F6 0C 13 D0 00 FF F6 0D 14 18 D2 42 51 C8 FF E8 20 01 E0 88 4E BA 01 1C 13 FC 00 04 00 FF F6 0C 13 C0 00 FF F6 0D 4E BA 01 0A 13 FC 00 0C 00 FF F6 0C 13 C1 00 FF F6 0D 4E 75 72 09 22 7C 00 FF 94 DD 13 FC 00 14 00 FF F6 0C 61 00 00 C4 13 D9 00 FF F6 0D 51 C9 FF F4 61 00 00 B6 53 3C 16
[04:27:02:777] RX: 6D F0 10 76 00 73
[04:27:02:793] TX: AT SH 6C 10 F0
[04:27:02:793] TX: 34 00 00 8A FF 92 9B
[04:27:02:855] RX: 6C F0 10 74 00 44
[04:27:02:871] TX: AT SH 6D 10 F0
[04:27:02:871] TX: 36 00 00 8A FF 92 9B E0 66 E8 10 39 00 FF F6 0F 4E 75 61 00 01 C6 22 08 2A 08 13 C1 00 FF 94 E6 E0 89 13 C1 00 FF 94 E5 E0 89 13 C1 00 FF 94 E4 42 83 42 84 22 48 16 18 42 82 61 00 01 9E 52 42 B5 FC 00 08 00 00 67 1A B5 FC 00 10 00 00 67 12 0C 82 00 00 FF FF 67 0A 18 18 B6 44 66 04 60 00 FF DA 20 49 0C 82 00 00 0A 00 65 00 00 34 13 FC 00 02 00 FF 94 E1 32 02 13 C1 00 FF 94 E3 E0 89 13 C1 00 FF 94 E2 4E BA 00 7C 4E BA 01 70 13 FC 00 37 42
[04:27:03:027] RX: 6D F0 10 76 00 73
[04:27:03:027] TX: AT SH 6C 10 F0
[04:27:03:043] TX: 34 00 00 8A FF 92 05
[04:27:03:105] RX: 6C F0 10 74 00 44
[04:27:03:105] TX: AT SH 6D 10 F0
[04:27:03:121] TX: 36 00 00 8A FF 92 05 00 FF AC 4E 70 60 FE 70 04 20 7C 00 FF 94 D7 61 00 00 34 42 80 80 39 00 FF 94 C9 E1 88 80 39 00 FF 94 CA E1 88 80 39 00 FF 94 CB 20 40 42 80 80 39 00 FF 94 C7 E1 88 80 39 00 FF 94 C8 61 00 00 62 60 00 FF 3E 61 00 02 22 13 FC 00 14 00 FF F6 0C 13 D8 00 FF F6 0D 61 00 FF 8C 51 C8 FF F4 13 FC 00 0C 00 FF F6 0C 13 D8 00 FF F6 0D 61 00 FF 76 13 FC 00 03 00 FF F6 0C 13 FC 00 00 00 FF F6 0D 61 00 01 E6 61 00 FF 5E 10 3E 85
[04:27:03:261] RX: 6D F0 10 76 00 73
[04:27:03:261] TX: AT SH 6C 10 F0
[04:27:03:277] TX: 34 00 00 8A FF 91 6F
[04:27:03:355] RX: 6C F0 10 74 00 44
[04:27:03:355] TX: AT SH 6D 10 F0
[04:27:03:371] TX: 36 00 00 8A FF 91 6F FF F6 0E 02 00 00 E0 0C 00 00 E0 66 E8 10 39 00 FF F6 0F 61 00 00 2E 61 00 02 6A 0C 39 00 35 00 FF 94 C5 67 00 00 78 0C 39 00 20 00 FF 94 C5 66 00 FF E6 20 7C 00 FF 94 D3 70 03 61 00 00 9E 61 00 00 44 2A 3C 00 00 27 10 61 00 02 B4 61 00 00 2C 61 00 00 28 61 00 00 24 61 00 00 20 61 00 00 1C 61 00 00 18 61 00 00 14 61 00 00 10 61 00 00 0C 61 00 00 08 51 CD FF D2 4E 75 4E 71 4E 71 4E 71 4E 71 4E 75 13 FC 00 40 00 28 65
[04:27:03:512] RX: 6D F0 10 76 00 73
[04:27:03:512] TX: AT SH 6C 10 F0
[04:27:03:527] TX: 34 00 00 13 FF 91 50
[04:27:03:590] RX: 6C F0 10 74 00 44
[04:27:03:605] TX: AT SH 6D 10 F0
[04:27:03:605] TX: 36 80 00 13 FF 91 50 61 00 00 98 13 FC 00 03 00 FF F6 0C 13 FC 00 00 00 FF F6 09 83
[04:27:03:683] RX: 6D F0 10 76 00 73
[04:27:03:699] kernel uploaded to PCM succesfully
Re: Open source GM OBD2 flash tool using a ELM327 device
Posted: Thu Apr 12, 2018 6:17 am
by NSFW
bubba2533 wrote:I'd be interested in doing testing once you guys get a cable to flash that is less than $100 because I've already spent too much on this hobby as it is.
$35?
http://www.obddiag.net/products.html
In theory, both the USB and Bluetooth Allpro adapters should work. In practice, Bluetooth makes me kinda nervous... I bought one of each, but I plan to use the USB version for flashing and the Bluetooth version for logging.
I think it makes sense to order now, just in case the Allpro guy gets overwhelmed with orders when the app gets released.
Re: Open source GM OBD2 flash tool using a ELM327 device
Posted: Thu Apr 12, 2018 10:34 am
by turbo_v6
Ordered!
I re-read the last few pages and saw that's what you were using.
Re: Open source GM OBD2 flash tool using a ELM327 device
Posted: Fri Apr 13, 2018 12:16 pm
by turbo_v6
I am attempting to pull the code to try and learn some about how you are creating this app.
But I'm getting this error with the master branch.
Code: Select all
Error CS2001 Source file 'C:\Users\brand\Desktop\LS PCM\Prototype\Flash411\Messages\DeviceId.cs' could not be found.