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

Support not sending system title in GeneralGlobalCipher APDU #72

Closed
Krolken opened this issue Jan 19, 2024 · 0 comments
Closed

Support not sending system title in GeneralGlobalCipher APDU #72

Krolken opened this issue Jan 19, 2024 · 0 comments
Assignees

Comments

@Krolken
Copy link
Contributor

Krolken commented Jan 19, 2024

Local communications on Pietro Fiorentini RSE gas meters do not use the system title in general-glo-ciphering APDU.

It is questionable if this is correct behaviour but we need to be pragmatic and solve it.

The system title is till used for the ciphered text, otherwise the encryption is not done correctly.

GeneralGlobalCiphering APDU is created in DlmsConnection.protect() and it would be possible to omit the system title but there also needs to be changes in the APDU class to allow for system_title=None and to encode it correctly into the byte representation.

This should not be default behaviour and we should introduce an optional argument to the DlmsConnection that handles complext settings for the connection. This could also adress the problem in #70
The more meters we aim to support the the more special cases we will find and it is better to have a serialziable object so we can easily transfer the settings in different environments and use cases.

For example

DlsmConnectionSettings:
   empty_system_title_in_general_glo_ciphering_apdu: bool = field(default=False)
@Krolken Krolken self-assigned this Jan 19, 2024
Krolken pushed a commit that referenced this issue Jan 22, 2024
Some manufacturers have spacial cases in the communication. To handle all these differences the settings object is introduced so it can be serialized and documented.
Also added support for first settings to suppoirt Fiorentini meters.

Fixes #72
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

1 participant