We are trying to develop a server application based on the Gurux server example 2.
During testing the different security policies, we were able to connect from the GXDLMSDircetor. During reading, everything was working fine with none security (security policy = 0). But when adding any type of security policy (authentication or/and encryption) the reading wasn't working and gave an error (unacceptable frame).
We tried to track the issue:
- With the security policy = 1 (authentication): the AARQ and AARE were well received, treated and authenticated. Thus, the server and client are connected. However, when trying to read the list of objects or read any object or do any service, an error occurs. In the server, the error is "DLMS_ERROR_CODE_INVALID_TAG" leading to an "unacceptable frame". Afterwards, the client requests a disconnection from the server.
- With the security policy = 2 (encryption): the AARQ and AARE were well received, treated and encrypted. Thus, the server and client are connected. However, when trying to read the list of objects or read any object or do any service, an error occurs. In the server, there is a decryption problem, in fact the command "DLMS_COMMAND_GLO_GET_REQUEST" that should've been decrypted as "DLMS_COMMAND_GET_REQUEST" gives instead a "DLMS_ERROR_CODE_INVALID_COMMAND" leading to an "unacceptable frame". Afterwards, the client requests a disconnection from the server.
- With the security policy = 3 (authentication-encryption): the AARQ and AARE were well received, treated, authenticated and encrypted. Thus, the server and client are connected. However, when trying to read the list of objects or read any object or do any service, the two errors previously mentioned are occurring at the same time.