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

APDU Tag 207 missing #102

Open
flavioreck opened this issue Dec 17, 2024 · 1 comment
Open

APDU Tag 207 missing #102

flavioreck opened this issue Dec 17, 2024 · 1 comment

Comments

@flavioreck
Copy link

I have this error when trying to connect using High Security:

Traceback (most recent call last):
File "C:\Users\XXX\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.12_qbz5n2kfra8p0\LocalCache\local-packages\Python312\site-packages\dlms_cosem\connection.py", line 57, in apdu_from_bytes
apdu_class = cls.APDU_MAP[tag]
~~~~~~~~~~~~^^^^^
KeyError: 207

The APDU_MAP doesn't have this key:
APDU_MAP = {
1: xdlms.InitiateRequest,
8: xdlms.InitiateResponse,
14: xdlms.ConfirmedServiceError,
15: xdlms.DataNotification,
33: xdlms.GlobalCipherInitiateRequest,
40: xdlms.GlobalCipherInitiateResponse,
216: xdlms.ExceptionResponse,
219: xdlms.GeneralGlobalCipher,
# ACSE APDUs:
96: acse.ApplicationAssociationRequest,
97: acse.ApplicationAssociationResponse,
98: acse.ReleaseRequest,
99: acse.ReleaseResponse,
192: xdlms.GetRequestFactory,
193: xdlms.SetRequestFactory,
195: xdlms.ActionRequestFactory,
196: xdlms.GetResponseFactory,
197: xdlms.SetResponseFactory,
199: xdlms.ActionResponseFactory,
}

@Krolken
Copy link
Contributor

Krolken commented Dec 18, 2024

OK. What type of High Security?

It it is an action response with global ciphering, so it is encrypted. Nothing we support yet as we have not needed it.
But it could easily be handled I thing in the decrypt part and replaced with a normal action response but if it is part of some custom auth flow it needs investigation.

What type of meter? What companion standard (country)?

Would you mind sharing the whole log?

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

2 participants