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. Adding "Invocation Counter"

adding "Invocation Counter"

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.

Profile picture for user mahsen
By mahsen , 14 March, 2020
Forums
Gurux.DLMS

Hi
Can you help me add the objects "Invocation Counter Broadcast Key" and "Invocation Counter Unicast Key" to C.DLMS?

Profile picture for user Kurumi

Kurumi

6 years 2 months ago

Hi,

Hi,

Use block cipher key. Current implementation uses same key for Broadcast and Unicast messages.

BR,
Mikko

Profile picture for user mahsen

mahsen

6 years 2 months ago

Security-Receive Frame

Security-Receive Frame Counter- unicast key => "0.0.43.1.0.255"
Security-Receive Frame Counter -broadcast Key => "0.0.43.1.1.255"

Is not difference between Broadcast and Unicast in code ?

Profile picture for user Kurumi

Kurumi

6 years 2 months ago

Hi,

Hi,

I'm sorry. There was a misunderstanding. Do you want to make a client or the meter?

BR,
Mikko

Profile picture for user mahsen

mahsen

6 years 2 months ago

I want to make the meter.

I want to make the meter.

Profile picture for user mahsen

mahsen

6 years 2 months ago

Can you help me ?

Can you help me ?

Profile picture for user Kurumi

Kurumi

6 years 2 months ago

Hi,

Hi,

Yes, I can help you. This covirus-19 is causing some delays.
I'll try to release the example the latest tomorrow.

BR,
Mikko

Profile picture for user mahsen

mahsen

6 years 2 months ago

I realized, in this situation

I realized, in this situation, I was entertained by programming.
So I'm waiting...

Profile picture for user Kurumi

Kurumi

6 years 2 months ago

Hi,

Hi,

Check this to get started.

http://gurux.fi/InvocationCounter

BR,
Mikko

utkarsh

6 years 2 months ago

Hi Mikko,

Hi Mikko,

I also trying to read objects from meter (gurux java). below is the client code

GXDLMSReader reader = null;
GXNet net = null;
Settings settings = new Settings();
settings.client.setInterfaceType(InterfaceType.WRAPPER);
settings.client.setUseLogicalNameReferencing(true);
settings.media = new GXNet();
net = (GXNet) settings.media;
net.setHostName(hostname);
net.setPort(7063);;
settings.client.setPassword("eeslekakgsl06abc");
settings.client.getCiphering().setSecurity(Security.AUTHENTICATION_ENCRYPTION);
settings.invocationCounter = "0.0.43.1.0.255";
settings.client.setAuthentication(Authentication.valueOfString("High"));
settings.readObjects.add(new GXSimpleEntry<String, Integer>("1.0.94.91.0.255", Integer.parseInt("2")));
.......
reader.initializeConnection();

I have not set InvocationCounter OBIS code at Gurux meter.
When I test Gurux meter it is working fine as it doesn't try to read invocation counter.
But when I am testing using gurux client, it get failed as invocation counter OBIS is not set.

Meter Side:
Client Connected.
RX: 00 01 00 10 00 01 00 1F 60 1D A1 09 06 07 60 85 74 05 08 01 01 BE 10 04 0E 01 00 00 00 06 5F 1F 04 00 40 1E 1D FF FF
RX String: <WRAPPER len="27" >
<TargetAddress Value="10" />
<SourceAddress Value="1" />
<PDU>
<AssociationRequest>
<ApplicationContextName Value="LN" />
<InitiateRequest>
<ProposedDlmsVersionNumber Value="06" />
<ProposedConformance>
<ConformanceBit Name="Action" />
<ConformanceBit Name="SelectiveAccess" />
<ConformanceBit Name="Set" />
<ConformanceBit Name="Get" />
<ConformanceBit Name="MultipleReferences" />
<ConformanceBit Name="BlockTransferWithAction" />
<ConformanceBit Name="BlockTransferWithSetOrWrite" />
<ConformanceBit Name="BlockTransferWithGetOrRead" />
<ConformanceBit Name="GeneralProtection" />
</ProposedConformance>
<ProposedMaxPduSize Value="FFFF" />
</InitiateRequest>
</AssociationRequest>
</PDU>
</WRAPPER>

AARQ Request
TX: 00 01 00 01 00 10 00 2B 61 29 A1 09 06 07 60 85 74 05 08 01 01 A2 03 02 01 00 A3 05 A1 03 02 01 00 BE 10 04 0E 08 00 06 5F 1F 04 00 40 1E 1D 04 00 00 07
TX String: <WRAPPER len="33" >
<TargetAddress Value="1" />
<SourceAddress Value="10" />
<PDU>
<AssociationResponse>
<ApplicationContextName Value="LN" />
<AssociationResult Value="00" />
<ResultSourceDiagnostic>
<ACSEServiceUser Value="00" />
</ResultSourceDiagnostic>
<InitiateResponse>
<NegotiatedDlmsVersionNumber Value="06" />
<NegotiatedConformance>
<ConformanceBit Name="Action" />
<ConformanceBit Name="SelectiveAccess" />
<ConformanceBit Name="Set" />
<ConformanceBit Name="Get" />
<ConformanceBit Name="MultipleReferences" />
<ConformanceBit Name="BlockTransferWithAction" />
<ConformanceBit Name="BlockTransferWithSetOrWrite" />
<ConformanceBit Name="BlockTransferWithGetOrRead" />
<ConformanceBit Name="GeneralProtection" />
</NegotiatedConformance>
<NegotiatedMaxPduSize Value="0400" />
<VaaName Value="0007" />
</InitiateResponse>
</AssociationResponse>
</PDU>
</WRAPPER>

RX: 00 01 00 10 00 01 00 0D C0 01 C1 00 01 00 00 2B 01 00 FF 02 00
handleGetRequest GetCommandType.NORMAL
getRequestNormal XML is not NULL
RX String: <WRAPPER len="15" >
<TargetAddress Value="10" />
<SourceAddress Value="1" />
<PDU>
<GetRequest>
<GetRequestNormal>
<!--Priority: HIGH ServiceClass: CONFIRMED invokeID: 1-->
<InvokeIdAndPriority Value="C1" />
<AttributeDescriptor>
<!--DATA-->
<ClassId Value="0001" />
<!--0.0.43.1.0.255-->
<InstanceId Value="00002B0100FF" />
<AttributeId Value="02" />
</AttributeDescriptor>
</GetRequestNormal>
</GetRequest>
</PDU>
</WRAPPER>

Get Request
handleGetRequest GetCommandType.NORMAL
getRequestNormal Objtype DATA ln 0.0.43.1.0.255
getRequestNormal Obj NULL
TX: 7E A0 07 21 03 97 2B E1 7E
TX String: <HDLC len="9" >
<TargetAddress Value="10" />
<SourceAddress Value="1" />
<!--S frame.-->
<FrameType Value="97" />
<UnacceptableFrame>
</UnacceptableFrame>
</HDLC>

RX: 00 01 00 10 00 01 00 17 62 15 80 01 00 BE 10 04 0E 01 00 00 00 06 5F 1F 04 00 40 1E 1D 04 00
RX String: <WRAPPER len="1F" >
<TargetAddress Value="10" />
<SourceAddress Value="1" />
<PDU>
<ReleaseRequest>
<Reason Value="Normal" />
<InitiateRequest>
<ProposedDlmsVersionNumber Value="06" />
<ProposedConformance>
<ConformanceBit Name="Action" />
<ConformanceBit Name="SelectiveAccess" />
<ConformanceBit Name="Set" />
<ConformanceBit Name="Get" />
<ConformanceBit Name="MultipleReferences" />
<ConformanceBit Name="BlockTransferWithAction" />
<ConformanceBit Name="BlockTransferWithSetOrWrite" />
<ConformanceBit Name="BlockTransferWithGetOrRead" />
<ConformanceBit Name="GeneralProtection" />
</ProposedConformance>
<ProposedMaxPduSize Value="0400" />
</InitiateRequest>
</ReleaseRequest>
</PDU>
</WRAPPER>

RELEASE Request
TX: 00 01 00 01 00 10 00 17 63 11 80 01 00 BE 0F 04 0E 08 00 06 5F 1F 04 00 40 1E 1D 04 00 00 07
TX String: <WRAPPER len="1F" >
<TargetAddress Value="1" />
<SourceAddress Value="10" />
<PDU>
<ReleaseResponse>
<Reason Value="Normal" />
<InitiateResponse>
<NegotiatedDlmsVersionNumber Value="06" />
<ProposedConformance>
<ConformanceBit Name="Action" />
<ConformanceBit Name="SelectiveAccess" />
<ConformanceBit Name="Set" />
<ConformanceBit Name="Get" />
<ConformanceBit Name="MultipleReferences" />
<ConformanceBit Name="BlockTransferWithAction" />
<ConformanceBit Name="BlockTransferWithSetOrWrite" />
<ConformanceBit Name="BlockTransferWithGetOrRead" />
<ConformanceBit Name="GeneralProtection" />
</NegotiatedConformance>
<NegotiatedMaxPduSize Value="0400" />
<VaaName Value="0007" />
</InitiateResponse>
</ReleaseResponse>
</PDU>
</WRAPPER>

Client Disconnected.

Client Side:
TX: 15:50:04.612 00 01 00 10 00 01 00 1F 60 1D A1 09 06 07 60 85 74 05 08 01 01 BE 10 04 0E 01 00 00 00 06 5F 1F 04 00 40 1E 1D FF FF
RX: 15:50:04.647 00 01 00 01 00 10 00 2B 61 29 A1 09 06 07 60 85 74 05 08 01 01 A2 03 02 01 00 A3 05 A1 03 02 01 00 BE 10 04 0E 08 00 06 5F 1F 04 00 40 1E 1D 04 00 00 07
TX: 15:50:04.652 00 01 00 10 00 01 00 0D C0 01 C1 00 01 00 00 2B 01 00 FF 02 00
RX: 15:51:04.668 7E A0 07 21 03 97 2B E1
TX: 15:51:04.677 00 01 00 10 00 01 00 17 62 15 80 01 00 BE 10 04 0E 01 00 00 00 06 5F 1F 04 00 40 1E 1D 04 00
RX: 15:51:04.684 00 01 00 01 00 10 00 17 63 11 80 01 00 BE 0F 04 0E 08 00 06 5F 1F 04 00 40 1E 1D 04 00 00 07

Regards,
Utkarsh

Profile picture for user Kurumi

Kurumi

6 years 2 months ago

Hi,

Hi,

You can read Invocation counter adding command line parameter -v 0.0.43.1.1.255
There is updateFrameCounter method that handles this. Frame counter is an old name of Invocation counter.

BR,
Mikko

  • Create new account
  • Reset your password

Hire Us!

Latest Releases

  • Tue, 06/09/2026 - 11:16
    gurux.dlms.java 4.0.95
  • Tue, 06/09/2026 - 10:03
    Gurux.DLMS.Python 1.0.199
  • Mon, 06/08/2026 - 13:39
    gurux.dlms.cpp 9.0.2606.0801
  • Mon, 06/01/2026 - 10:15
    gurux.dlms.cpp 9.0.2606.0101
  • Thu, 05/28/2026 - 16:06
    gurux.dlms.java 4.0.94

New forum topics

  • Error reading L&G Meter
  • Pass a TCP Client to GXNet
  • Australian EDMI Mk10D (Essential Energy area)
  • Strange mix of data notificiation vs get response
  • DLMS Connection
More

Who's new

  • Tuanhgg
  • Adel
  • charnon
  • Paddles
  • Miguel Ángel
RSS feed
Privacy FAQ GXDN Issues Contact
Follow Gurux on Twitter Follow Gurux on Linkedin