Skip to main content
Home
for DLMS smart meters
Open source solutions for DLMS smart metering

Main navigation

  • Home
  • Products
  • About us
  • Open Source
  • Community
  • Forum
  • Downloads
User account menu
  • Log in

Breadcrumb

  1. Home
  2. Node
  3. Reading PushSetupObject Attr 10 Error

Reading PushSetupObject attr 10 error

By andre538 , 1 September, 2026
Forums
DLMSDirector

Hello Mikko,

DLMS Director gives me an error message (something like Can't convert GXEnum to GXStructure) while reading Push Setup object.
I've made a little investigation.

Problem arise while reading Push Protection parameters (attribute 10)
1: 7E A0 1A 02 23 61 74 A2 13 E6 E6 00 C0 01 C1 00 28 00 00 19 09 00 FF 0A 00 15 11 7E
<GetRequest>
<GetRequestNormal>
<!-- Priority: High, ServiceClass: Confirmed, Invoke ID: 1 -->
<InvokeIdAndPriority Value="C1" />
<AttributeDescriptor>
<!-- PushSetup -->
<ClassId Value="0028" />
<!-- 0.0.25.9.0.255 -->
<InstanceId Value="0000190900FF" />
<!-- Push protection parameters -->
<AttributeId Value="0A" />
</AttributeDescriptor>
</GetRequestNormal>
</GetRequest>
2: 7E A0 37 61 02 23 76 4D BC E6 E7 00 C4 01 C1 00 01 01 02 02 16 02 02 05 09 00 09 08 4E 52 54 04 F2 9F 75 BF 09 08 00 00 00 00 00 00 00 00 09 00 02 02 16 00 16 00 63 E6 7E
<GetResponse>
<GetResponseNormal>
<!-- Priority: High, ServiceClass: Confirmed, Invoke ID: 1 -->
<InvokeIdAndPriority Value="C1" />
<Result>
<Data>
<Array Qty="01" >
<Structure Qty="02" >
<Enum Value="02" />
<Structure Qty="05" >
<OctetString Value="" />
<OctetString Value="4E525404F29F75BF" />
<OctetString Value="0000000000000000" />
<OctetString Value="" />
<Structure Qty="02" >
<Enum Value="00" />
<Enum Value="00" />
</Structure>
</Structure>
</Structure>
</Array>
</Data>
</Result>
</GetResponseNormal>
</GetResponse>

Please note this block:

<Structure Qty="02" >
<Enum Value="00" />
<Enum Value="00" />
</Structure>

This is key_info_element ::= structure
where key_info_type: enum: (0) identified_key
and key_info_options: CHOICE {
identified_key_info_options, wrapped_key_info_options, agreed_key_info_options }
}
and identified_key_info_options ::= enum: (0) global_unicast_encryption_key, (1) global_broadcast_encryption_key

So here we have two enum values.
GXDLMSPushSetup.cs module (GetPushProtectionParameters):

GXStructure data = (GXStructure)keyInfo[1]; # Problem arise here because in case of "identified_key" keyInfo[1] is a enum, not a structure.
#In case of wrapped_key_info_options, agreed_key_info_options keyInfo[1] would be a structure.

if (p.KeyInfo.DataProtectionKeyType == DataProtectionKeyType.Identified)
{
p.KeyInfo.IdentifiedKey.KeyType = (DataProtectionIdentifiedKeyType)Convert.ToInt32(data[0]);
}
else if (p.KeyInfo.DataProtectionKeyType == DataProtectionKeyType.Wrapped)
{
p.KeyInfo.WrappedKey.KeyType = (DataProtectionWrappedKeyType)Convert.ToInt32(data[0]);
p.KeyInfo.WrappedKey.Key = (byte[])data[1];
}
else if (p.KeyInfo.DataProtectionKeyType == DataProtectionKeyType.Agreed)
{
p.KeyInfo.AgreedKey.Parameters = (byte[])data[0];
p.KeyInfo.AgreedKey.Data = (byte[])data[1];
}

Best regards, Andre

  • Log in or register to post comments
  • Create new account
  • Reset your password

Hire Us!

Latest Releases

  • Wed, 08/26/2026 - 09:04
    Gurux.DLMS.Python 1.0.203
  • Mon, 08/17/2026 - 11:28
    Gurux.DLMS.Python 1.0.202
  • Mon, 08/17/2026 - 09:47
    gurux.dlms.cpp 9.0.2608.1701
  • Mon, 08/17/2026 - 09:25
    gurux.dlms.c 9.0.2608.1701
  • Mon, 07/27/2026 - 12:37
    gurux.dlms.cpp 9.0.2607.2701

New forum topics

  • Reading PushSetupObject attr 10 error
  • addCaptureObject as Class ID=01 (Data) (not 03 (Register))
  • L+G E355 Load Control
  • Generic Exception raised on HLS authentication failure instead of GXDLMSException
  • DLMS Image Transfer: “byte must be in range(0, 256)” with 512-byte block size in Python
More
RSS feed
Privacy FAQ GXDN Issues Contact
Follow Gurux on Twitter Follow Gurux on Linkedin