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. Forums
  3. Problem Sending Compact Data With Push Setup

Problem sending Compact Data with Push Setup

Forum Rules

Before commenting read Forum rules

Don't comment the topic if you have a new question.

You can create a new topic selecting correct category from Gurux Forum and then create a new topic selecting "New Topic" from the top left.

By Rubent , 21 January, 2020
Forums
Gurux.DLMS

Hi,

First of all thank you for the inconvenience it may cause.

We are trying to send / simulate a meter which sends a push setup object with a compact data with the buffer with the corresponding pdu. We simulate a secure send using GXDLMSSecureNotify. The problem is that the structure that generates us is the following:

<WRAPPER len="263" >
<TargetAddress Value="1" />
<SourceAddress Value="102" />
<PDU>
<DataNotification>
<LongInvokeIdAndPriority Value="3221225473" />
<DateTime Value="" />
<NotificationBody>
<DataValue>
<Structure Qty="1" >
<OctetString Value="0A5E26F8E9204D50524E4349475041594E494946594D4B414E5A4E53424C4249484F414847580001045E26F954000007F330000E004D001A0041003F004200130040000E003A004E001B00480011000E000B00040045003D0006002E005B00380035005D0011000A0002005F0023004C0010000900310025005200160018004000090002002A0023004B004400080001005D0000000000151E0C40241E0C00241E0B80231E0900221E0900221DEBE0241DEBA0241DEB20231D9540221D9520221D8F40241D8F00241D8E8023038BC022038BC0220385A024038580240384E0230004005F00028022000280220000004F00000071" />
</Structure>
</DataValue>
</NotificationBody>
</DataNotification>
</PDU>
</WRAPPER>

This does not correspond to what the Blue Book says about the compact data object. Since the buffer attribute should be an OctetString and not be within a structure.

GURUX RESPONSE
---------------
<DataValue>
<Structure Qty="1" >
<OctetString Value="(PDU DATA)" />
</Structure>
</DataValue>

BLUE BOOK (Class_id = 62)
----------
Attribute description

compact_buffer: Contains the values of the attributes captured as an octet-string.
When the data captured is of type octet-string, bit-string, visible-string, utf8-string or array the length is also included here.

My question is: Is there a way to prevent it from going inside a structure? Is it a bug?

Thank you very much in advance for the help and the response.

Rubent Delgado

Image

Rubent

6 years 6 months ago

Gurux Translator Response

Gurux Translator Response

Image
Profile picture for user Kurumi

Kurumi

6 years 6 months ago

Hi,

Hi,

I believe that you are using C#? Can you show how you are adding capture objects before sending data?

BR,
Mikko

Rubent

6 years 6 months ago

Of course Mikko. This is an

Of course Mikko. This is an example:

var compactData = new GXDLMSCompactData(GasEchoObisCodes.CompactDataPs10)
{
Version = 1,
CaptureMethod = CaptureMethod.Implicit,
CaptureObjects =
{
new GXKeyValuePair<GXDLMSObject, GXDLMSCaptureObject>(new GXDLMSData(GasEchoObisCodes.UnixTime),
new GXDLMSCaptureObject(2, 0)),
new GXKeyValuePair<GXDLMSObject, GXDLMSCaptureObject>(new GXDLMSData(GasEchoObisCodes.Mprn),
new GXDLMSCaptureObject(2, 0)),
new GXKeyValuePair<GXDLMSObject, GXDLMSCaptureObject>(new GXDLMSDisconnectControl(GasEchoObisCodes.OutputControlState),
new GXDLMSCaptureObject(2, 0)),
new GXKeyValuePair<GXDLMSObject, GXDLMSCaptureObject>(new GXDLMSDisconnectControl(GasEchoObisCodes.OutputControlState),
new GXDLMSCaptureObject(3, 0)),
new GXKeyValuePair<GXDLMSObject, GXDLMSCaptureObject>(new GXDLMSGSMDiagnostic(GasEchoObisCodes.SignalQuality),
new GXDLMSCaptureObject(6, 3)),
new GXKeyValuePair<GXDLMSObject, GXDLMSCaptureObject>(new GXDLMSData(GasEchoObisCodes.UnixTimeStartOfGasDay),
new GXDLMSCaptureObject(2, 1)),
new GXKeyValuePair<GXDLMSObject, GXDLMSCaptureObject>(new GXDLMSRegister(GasEchoObisCodes.TotalRecordedVolume),
new GXDLMSCaptureObject(2, 0)),
new GXKeyValuePair<GXDLMSObject, GXDLMSCaptureObject>(new GXDLMSRegister(GasEchoObisCodes.RemainingBatteryCapacity),
new GXDLMSCaptureObject(2, 0)),
new GXKeyValuePair<GXDLMSObject, GXDLMSCaptureObject>(new GXDLMSProfileGeneric(GasEchoObisCodes.LoadSurveyProfile),
new GXDLMSCaptureObject(2, 0)),
new GXKeyValuePair<GXDLMSObject, GXDLMSCaptureObject>(new GXDLMSProfileGeneric(GasEchoObisCodes.GasEchoEventsProfile),
new GXDLMSCaptureObject(2, 0)),
new GXKeyValuePair<GXDLMSObject, GXDLMSCaptureObject>(new GXDLMSData(GasEchoObisCodes.EventLogPriorId),
new GXDLMSCaptureObject(2, 0)),
new GXKeyValuePair<GXDLMSObject, GXDLMSCaptureObject>(new GXDLMSData(GasEchoObisCodes.EventLogLastId),
new GXDLMSCaptureObject(2, 0))

}

Profile picture for user Kurumi

Kurumi

6 years 6 months ago

Hi,

Hi,
I'm sorry that it takes so long. The data is correct.
You are sending compact data in the data notification message and for this reason, it's inside of the structure. I changed your data here so it's easier to read.

Here we have two objects in compact data:
GXDLMSCompactData compactData = new GXDLMSCompactData();
compactData.CaptureObjects.Add(new GXKeyValuePair<GXDLMSObject, GXDLMSCaptureObject>(clock, new GXDLMSCaptureObject(1, 0)));
compactData.CaptureObjects.Add(new GXKeyValuePair<GXDLMSObject, GXDLMSCaptureObject>(clock, new GXDLMSCaptureObject(2, 0)));
p.PushObjectList.Add(new KeyValuePair<GXDLMSObject, GXDLMSCaptureObject>(compactData, new GXDLMSCaptureObject(3, 0)));
p.PushObjectList.Add(new KeyValuePair<GXDLMSObject, GXDLMSCaptureObject>(compactData, new GXDLMSCaptureObject(2, 0)));

In Push message we are sending attributes 3 and 2.

Generated data is here:

http://www.gurux.fi/GuruxDLMSTranslator?translate=00010001001000440FC00…

I hope this helps you.
BR,
Mikko

  • Create new account
  • Reset your password

Hire Us!

Latest Releases

  • Mon, 07/27/2026 - 12:37
    gurux.dlms.cpp 9.0.2607.2701
  • Thu, 07/23/2026 - 16:19
    gurux.dlms.java 4.0.96
  • Thu, 07/09/2026 - 14:34
    Gurux.DLMS.Python 1.0.201
  • Fri, 06/26/2026 - 16:32
    Gurux.Service 3.0.2606.2601
  • Wed, 06/24/2026 - 08:36
    Gurux.DLMS.Python 1.0.200

New forum topics

  • Version mismatch between Gurux.DLMS 9.x and Gurux.Common/Gurux.Serial 8.x
  • Service not known error on gprs communication
  • Help Needed: Interfacing Saral 100 Energy Meter with Microcontroller via RS232
  • Connecting Meter to Agent via serial
  • Reading block profile with Compact array
More

Who's new

  • Duaneduh
  • ClaytonPap
  • sAYgntkdaTjhgpvfz
  • HenryEneno
  • ScottCab
RSS feed
Privacy FAQ GXDN Issues Contact
Follow Gurux on Twitter Follow Gurux on Linkedin