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

Decryption key format #34

Open
valki2 opened this issue Oct 17, 2023 · 2 comments
Open

Decryption key format #34

valki2 opened this issue Oct 17, 2023 · 2 comments

Comments

@valki2
Copy link

valki2 commented Oct 17, 2023

Hi!
For those who get problems when decrypting:

when your key is 32 digits like D658345DF620A2839E5AD6A6D1B85135

then you have to fill each pair of the key into the 0x00 format... like:

0xD6, 0x58, 0x34, 0x5D, 0xF6, 0x20, 0xA2, 0x83, 0x9E, 0x5A, 0xD6, 0xA6, 0xD1, 0xB8, 0x51, 0x35

Have fun!

@ert666
Copy link

ert666 commented Dec 15, 2023

@valki2
So your code would be...
...
uint8_t key[] = {0xD6, 0x58, 0x34, 0x5D, 0xF6, 0x20, 0xA2, 0x83, 0x9E, 0x5A, 0xD6, 0xA6, 0xD1, 0xB8, 0x51, 0x35};
dlms_meter->set_key(key, 32; // Pass your decryption key and key length here
...
?

@kenci
Copy link

kenci commented Jan 7, 2024

@ert666 no, it should be dlms_meter->set_key(key, 16); because there are 16 bytes.

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

No branches or pull requests

3 participants