Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UDS Hex Editor #16

Open
jglim opened this issue Dec 31, 2020 · 11 comments
Open

UDS Hex Editor #16

jglim opened this issue Dec 31, 2020 · 11 comments
Assignees
Labels
enhancement New feature or request

Comments

@jglim
Copy link
Owner

jglim commented Dec 31, 2020

Feature request from @Feezex ( #13 (comment) ) to add a hex editor that uses UDS ReadDataByIdentifier and WriteDataByIdentifier.

  • UDS parameters may require adjustment (default: 0x23/0x3D)
  • Reading is done in a single pass
  • After changes are made, check for differences and commit them with WriteDataByIdentifier
@jglim jglim added the enhancement New feature or request label Dec 31, 2020
@jglim jglim self-assigned this Dec 31, 2020
@jglim
Copy link
Owner Author

jglim commented Dec 31, 2020

@Feezex This is an experimental build that implements the UDS hex editor. Again, the target must first be unlocked to correctly read its memory.
CaesarSuite_dbg_2020-12-31-A.zip

I have tried it briefly with my CRD3; I am pleasantly surprised that the read command works out of the box, although I am unable to verify if the write command works, since the CRD3 rejects it. I have attached my logs below, in case I was sending the wrong commands:

7cJvGxwQom

This region A001C000 was selected from a related CFF file:

Diogenes_UT87NYQYCg

W 10 03
R 50 03 00 14 00 C8
W 22 F1 00
R 62 F1 00 02 21 31 03
W 3E 00
R 7E 00
W 27 0B
R 67 0B 52 8E 89 C3
W 27 0C BA B1 BB 3D
R 67 0C
W 3E 00
R 7E 00
W 3E 00
R 7E 00
W 3E 00
R 7E 00
W 23 14 A0 01 C0 00 10
R 63 43 52 44 33 2D 36 35 31 2D 57 4D 49 37 37 44 31
W 23 14 A0 01 C0 10 10
R 63 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
W 23 14 A0 01 C0 20 10
R 63 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
W 23 14 A0 01 C0 30 10
R 63 36 35 31 39 30 33 31 34 33 31 0D 2B 01 22 00 40
W 23 14 A0 01 C0 40 10
R 63 00 30 5E 02 21 31 00 58 07 FF 57 4D 49 37 37 00
W 23 14 A0 01 C0 50 10
R 63 3E F8 0C FD 88 C0 01 A0 FF FF 0F A0 FF FF FF FF
W 23 14 A0 01 C0 60 10
R 63 FF FF FF FF FF FF FF FF FF FF FF FF 56 6A 0C 00
W 23 14 A0 01 C0 70 10
R 63 3C 9B 04 A0 7C D6 04 A0 FF FF FF FF FF FF FF FF
W 23 14 A0 01 C0 80 10
R 63 FF FF FF FF FF FF FF FF 00 28 00 28 00 28 00 28
W 23 14 A0 01 C0 90 10
R 63 00 28 00 00 00 00 00 00 00 00 00 00 00 00 00 00
W 23 14 A0 01 C0 A0 10
R 63 00 00 00 00 00 28 00 28 00 00 00 00 00 00 00 00
W 23 14 A0 01 C0 B0 10
R 63 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
W 23 14 A0 01 C0 C0 10
R 63 00 08 00 08 00 00 00 00 00 00 00 00 00 00 00 00
W 23 14 A0 01 C0 D0 10
R 63 00 00 00 00 00 00 00 00 00 00 00 00 00 00 80 00
W 23 14 A0 01 C0 E0 10
R 63 00 00 00 00 80 00 00 00 00 00 00 00 FF FF F7 FD
W 23 14 A0 01 C0 F0 10
R 63 00 00 00 00 00 00 FF 00 FF FF FF FF FF FF FF FF
W 3E 00
R 7E 00
W 3E 00
R 7E 00
W 3E 00
R 7E 00
W 3E 00
R 7E 00
W 3D 14 A0 01 C0 00 10 43 52 44 33 2D 31 32 33 2D 57 4D 49 37 37 44 31
R 7F 3D 31
W 3D 14 A0 01 C0 30 10 36 35 31 39 39 39 39 34 33 31 0D 2B 01 22 00 40
R 7F 3D 31
W 3E 00
R 7E 00
W 3E 00
R 7E 00
W 3E 00
R 7E 00

@N0cynym
Copy link
Contributor

N0cynym commented Dec 31, 2020

Wow this is amazing!
I never thought that it would be able to realize this so quickly 👍

@jglim thanks for your hard work you're a big game changer! Hope you will have a good start into the new year.

@Feezex
Copy link

Feezex commented Dec 31, 2020

I wish this New Year
Less sadness and worries
More happiness and kindness,
Smiles, tenderness, warmth!

To have faithful friends
like a very friendly family,
To make every day successful
And to have enough strength for everything!

Well, also let the New Year
Will bring more money
Health, peace and love,
So that there is no winter in the heart!

@Feezex
Copy link

Feezex commented Jan 4, 2021

I there a way to make it work for kw2c3pe? in video it been working over kwp.
In my case it can be very useful

@jglim
Copy link
Owner Author

jglim commented Jan 5, 2021

I loosened the UDS check, it will only warn you about the protocol mismatch, and continue to run. This assumes that your target ECU understands UDS ReadDataByIdentifier and WriteDataByIdentifier.

Available now in v1.4.6

@jglim
Copy link
Owner Author

jglim commented Jan 11, 2021

@Feezex Whenever you try out the memory editor, please let me know if it works (so that I can close this issue), or if there is an issue (I will try to resolve it). Also, thanks for your notes on the bench setup :^)

@WSorban
Copy link

WSorban commented Feb 19, 2021

A very cool feature I thought about, and implemented the other day, was to simply select hex addresses, and generate and execute the UDS commands, for those memory segments, like so:
image

I can contribute to your project, with such a feature, if you want

@jglim
Copy link
Owner Author

jglim commented Feb 19, 2021

Thanks for the feedback, that is indeed a cool feature and it would be great to receive your contribution.

I took a quick peek at the referenced (third party) hexbox library, and it has SelectionStart and SelectionLength values. The function btnWrite_Click in UDSHexEditor.cs handles diffing and writing, and it might be a good place to work with (clamp the working memory range).

@WSorban
Copy link

WSorban commented Feb 19, 2021

BE HexBox is indeed a very very well made library, although I found that there is little documentation, and little talk from people, on social platforms, I had to figure everything myself.
It wasn't a hard thing, though, as they also provide an example program, that implements mostly all functionalities.

@Feezex
Copy link

Feezex commented Feb 2, 2023

Noticed that progress bar can be sized fullscreen if doubleclick header..
Small fix needed

        loader.Resize = false;   

or similar

@jglim
Copy link
Owner Author

jglim commented Feb 3, 2023

That's a feature for monitoring the progress while you are standing at the other end of your workshop ))

But yes, I'll take note to relook at that. It is configured as a FixedToolWindow which I assumed to behave like a FixedSingle (which doesn't resize).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants