GXDLMSClient asks block cipher and authentication keys if they are not set

Project: 
Gurux.DLMS.Net

It might be cases where meters are using different block cipher and authentication keys with push messages.

GXDLMSSecureClient client = new GXDLMSSecureClient();
client.InterfaceType = InterfaceType.WRAPPER;
//Set keys to null so they are searched each time when needed.

client.Ciphering.BlockCipherKey = null;
client.Ciphering.AuthenticationKey = null;
client.OnKeys += (sender, arg) =>
{
Console.WriteLine("Find keys for" + GXCommon.ToHex(arg.SystemTitle));
arg.BlockCipherKey = //Search key.
arg.AuthenticationKey = //Search key.
};
GXReplyData reply = new GXReplyData();
GXReplyData notify = new GXReplyData();
GXByteBuffer bb = new GXByteBuffer();
//GetData will invoke OnKeys when keys are needed and if they aren't set.
client.GetData(bb, reply, notify)

Status: 
Closed (fixed)
Priority: 
Normal
Category: 
Feature request
Component: 
Code
Reporter: 
Administrator
Created: 
Wed, 11/23/2022 - 15:20
Updated: 
Wed, 11/23/2022 - 15:20