Segment Swap utility

They go by many names, P01, P59, VPW, '0411 etc. Also covering E38 and newer here.
kur4o
Posts: 951
Joined: Sun Apr 10, 2016 9:20 pm

Re: Segment Swap utility

Post by kur4o »

I found the hard way that each byte is compared independently for the search function rather than a block. It took me couple of hours .

Now on the new exciting features. It seems to work but there is one issue I found. When there is more than one checkwords, the info is taken from the first on the list.

So you have vin:cw1,vin:cw2,vin:cw3. If the cw3 is used, the vin is not displayed. To make it work it must be the first on the list as vin:cw3,vin:cw2,vin:cw1.
It takes only the first on the list.

Another thing to mention. The segment p/n and version fields work only if there is checkword specified and is valid. It will be nice to have the absolute address specified as info:#1be:17:text, not dependent on a valid checkword.
User avatar
joukoy
Posts: 392
Joined: Tue Dec 17, 2019 3:27 am
cars: --
Contact:

Re: Segment Swap utility

Post by joukoy »

kur4o wrote:I found the hard way that each byte is compared independently for the search function rather than a block. It took me couple of hours .
I don't understand.
What search function, and how it should work?
kur4o wrote: Now on the new exciting features. It seems to work but there is one issue I found. When there is more than one checkwords, the info is taken from the first on the list.

So you have vin:cw1,vin:cw2,vin:cw3. If the cw3 is used, the vin is not displayed. To make it work it must be the first on the list as vin:cw3,vin:cw2,vin:cw1.
It takes only the first on the list.
Are you trying to do it "bacwards"
define one CW, for example CWvin, and add multiple possible locations. Example from previous info you sent:

Checkwords: a5a0:1be:b8:CWvin,a5a0:1da:1b0:CWvin
Extrainfo: VIN:CWvin+0:17:text
kur4o wrote:
Another thing to mention. The segment p/n and version fields work only if there is checkword specified and is valid. It will be nice to have the absolute address specified as info:#1be:17:text, not dependent on a valid checkword.
This is a bug. Edit: can't confirm

Thinking: Should I abandon this string-based config system and save settings directly from GUI, only showing them in text mode for visualization.
Pros: complicated and error causing parsing can be removed
Cons: all config files need conversion, settings can be done only via GUI
Last edited by joukoy on Sun Mar 08, 2020 4:40 pm, edited 1 time in total.
User avatar
joukoy
Posts: 392
Joined: Tue Dec 17, 2019 3:27 am
cars: --
Contact:

Re: Segment Swap utility

Post by joukoy »

0.8.9
Fixed bug in extrainfo, bytes converted as hex, should be int.

Can't confirm bug in PN/ver ??
kur4o
Posts: 951
Joined: Sun Apr 10, 2016 9:20 pm

Re: Segment Swap utility

Post by kur4o »

I give you some examples. It might be on my side not configured correctly.
on xml0_7_2, the #xx:xx:text doesn`t work. On xml_0_7_3 only the vin loads on bins with checkword CW3, on bins with CW2 and CW1 doesn`t load, you if move the order of vin with CW1 first, than it will read vin from bins with CW1, but not from others bins.
testbins_withxml.rar
(1.82 MiB) Downloaded 210 times
User avatar
joukoy
Posts: 392
Joined: Tue Dec 17, 2019 3:27 am
cars: --
Contact:

Re: Segment Swap utility

Post by joukoy »

kur4o wrote:I give you some examples. It might be on my side not configured correctly.
on xml0_7_2, the #xx:xx:text doesn`t work. On xml_0_7_3 only the vin loads on bins with checkword CW3, on bins with CW2 and CW1 doesn`t load, you if move the order of vin with CW1 first, than it will read vin from bins with CW1, but not from others bins.
The attachment testbins_withxml.rar is no longer available
Your configs need little fixing, please see attachment. Edit: Probably my config have wrong addresses for VIN, but you get the idea?

And there was 2 bugs in software, it didn't handle all checkwords and handle them only when segment search was in use.
Fixed in 0.8.10
Attachments
e38_VIN.xml
(5.29 KiB) Downloaded 223 times
kur4o
Posts: 951
Joined: Sun Apr 10, 2016 9:20 pm

Re: Segment Swap utility

Post by kur4o »

I have another issue. Can you take a look if it is a config problem or some leftover bug.

In a case there isn`t a checkword specified and we use absolute address,
It prints fine with the p/n field, but when it is configured in the extra field tab it doesn`t load.


The way you config the cw seems to work without issues. Nice work.
e38_VINtest1.xml
(5.25 KiB) Downloaded 217 times
User avatar
joukoy
Posts: 392
Joined: Tue Dec 17, 2019 3:27 am
cars: --
Contact:

Re: Segment Swap utility

Post by joukoy »

kur4o wrote:I have another issue. Can you take a look if it is a config problem or some leftover bug.

In a case there isn`t a checkword specified and we use absolute address,
It prints fine with the p/n field, but when it is configured in the extra field tab it doesn`t load.


The way you config the cw seems to work without issues. Nice work.
e38_VINtest1.xml
0.8.11
Fixed bug: extrainfo not handled if no checkword defined

Edit: If I have time tomorrow, I will do some reorganization & cleaning to code - now it's too unclear. Of course there is risk for new bugs then... :comp:
User avatar
joukoy
Posts: 392
Joined: Tue Dec 17, 2019 3:27 am
cars: --
Contact:

Re: Segment Swap utility

Post by joukoy »

0.8.12

Small fixes & reorder.
Added debug-window to help developing configs, more info can be added by request.
ironduke
Posts: 583
Joined: Thu Feb 13, 2020 11:32 pm
cars: Mainly GM trucks, a Cruze and an Equinox for dailys..

Re: Segment Swap utility

Post by ironduke »

Hey, Just posting to let you know that I really appreciate the work your putting into this. I've been trying to muddle thru my own C++ program to edit bin files and then do the SUM and CVN.. I am fumbling at the CVN part but found this instead.. lol.. I will probably keep at it myself just for the sake of learning but I made a blank patch just so I can load my bin and have it correct the checksums for me, lol..

Thanks again man, this is great work!!
User avatar
joukoy
Posts: 392
Joined: Tue Dec 17, 2019 3:27 am
cars: --
Contact:

Re: Segment Swap utility

Post by joukoy »

ironduke wrote:Hey, Just posting to let you know that I really appreciate the work your putting into this. I've been trying to muddle thru my own C++ program to edit bin files and then do the SUM and CVN.. I am fumbling at the CVN part but found this instead.. lol.. I will probably keep at it myself just for the sake of learning but I made a blank patch just so I can load my bin and have it correct the checksums for me, lol..

Thanks again man, this is great work!!
Good to know it is useful.
Looks like "Save BIN" should be available without any patch, if you do "Fix checksums"?
Fixed in version 0.8.13 :thumbup:
Post Reply