-
Notifications
You must be signed in to change notification settings - Fork 7
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
Encrypted DLMS Payload #7
Comments
Hi, I am glad you liked the package. I want to support encryption, but I have not been able to find good enough documentation. The official documentation costs money. The link from you looks promising, and I will look at it. But I will need some test samples and its encryption keys to be able to do this. Are you able to provide this? |
Hi Tore, yeah I really like your package, it looks very professional ;-) At our home we have a new Kaifa smart power meter with activated encryption. So, yes I am able to provide you with this information. I would be glad to support you with that ... Beside, there several other projects with included ecryption, but there not at that professional level of yours:
Regards, |
In my experience, many small details is important when you work with encryption. It is hard to get correct at first attempt. I also need some encrypted data with corresponding key to include in my tests. I don't want to implement anything without having tests in place to be able to run when the projects moves on with other changes. I understand that you dont want your active key to be on Github forever, but maybe you energy supplier can issue a new key when this issue is sorted out? I can have a look in the projects you linked to see if any of them has some test data with encryption keys. I learned German at school 30 years ago, but I was not av very good student in that subject. But Google translate should be able to help me. |
Hi Tore, please take a look at my fork of your repo at: https://github.com/dstrigl/amshan I just added the support for my Kaifa smart meter from our network operator TINETZ in a "quick and dirty" way, but it seems to work well :-) I run the
Maybe you could take a look on it, so that it can find the way in your repo in more professional way?! Regards, |
This is how the encryption works:
|
Nice. I will have a look at it. |
It seems like a bit different protocol than what I know so far. The current implementation expects HDLC wrapped APDU (with payload). The APDU can also be encrypted (not currently supported by amshan) when wrapped in HDLC frame. A HDLC frame always startes with flag sequence (0x7E) and can contain escaping character (0x7D). The frame has a header with CRC checksum and a new checksum at the end of frame. The frame normally ends with (0x7e). This protocol has a different framing of the payload. It starts with start character (0x68) and ends with a simple checksum and a stop character (0x16). I think this is something called Wired M-Bus profile. This is new to me. I cant find much about it in the public parts of the COSEM blue and green books. But if found an example with payload and encryption key here: https://www.netz-noe.at/Download-(1)/Smart-Meter/218_9_SmartMeter_Kundenschnittstelle_lektoriert_14.aspx Do you know is protocol has any kind of escaping in case the payload contains the start character and the end character? Does a new frame (0x68) follow directly after the stop character (0x16) of the previous, or is some kind of special flag sequence of "filler" characters between them? |
Hi again,
You are right, at the beginning of my tries I was a little bit confused, because I oriented me on your implementation, before I registered that my Kaifa smart meter delivers a different format of the frames ...
That's correct.
Sorry, I don't know the correct naming ... That's the main reference I worked with (from my network operator TINETZ):
No, not that I know or recognized during my tries.
I looks like, the "new frame" starts directly after the stop character, no kind of special flag or "filler". I hope this will help you! And thanks for beeing interested in this topic! Regards, |
Just checked again: The new frame starts directly after the stop character of the previous frame, no special character or filling ... |
Hi Tore, any plan to include my requested feature? I am running it on a RPi since several months without any problem. Works fine so far :-) |
Hi Tore, have you ever thought about including my requested feature? It runs without any problems since nearly a year ... Regards, |
Hi Tore,
really nice package!
One question:
Do you have any plans to support "Encrypted DLMS Payload" which I would need to use your package with our Kaifa smart power meter.
[ https://www.tinetz.at/fileadmin/user_upload/Kundenservice/pdf/Beschreibung_Kundenschnittstelle_Smart_Meter_TINETZ.pdf ]
(sorry, general text is only in German, but relevant parts are in English)
Regards,
Daniel.
The text was updated successfully, but these errors were encountered: