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. Gurux.DLMS.XmlClient Settings of Invocation Counter

Gurux.DLMS.XmlClient settings of 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.

By RSS , 6 May, 2020
Forums
Gurux.Net

Hi Mikko,

I am working with the Gurux.DLMS.XmlClient console project programmed in C #, I am trying to configure it as HLS GMAC AuthenticationEncryption.

Until now I have added the following lines of code to the Gurux.DLMS.XmlClient project to the Programs.cs file, to configure them through the windows console:

settings.client.Ciphering.BlockCipherKey = ASCIIEncoding.ASCII.GetBytes(it.Value);
settings.client.Ciphering.AuthenticationKey = ASCIIEncoding.ASCII.GetBytes(it.Value);
settings.client.Ciphering.DedicatedKey = ASCIIEncoding.ASCII.GetBytes(it.Value);
settings.client.Ciphering.InvocationCounter = uint.Parse(it.Value);
settings.client.Ciphering.Security = (Security)Enum.Parse(typeof(Security), it.Value);
settings.client.Ciphering.SecuritySuite = (Objects.Enums.SecuritySuite)Enum.Parse(typeof(Objects.Enums.SecuritySuite), it.Value);
settings.client.Ciphering.SystemTitle = ASCIIEncoding.ASCII.GetBytes(it.Value);

With these configurations the first data of the AARQ are sent well with the exception of the invocation counter which sends the bytes 0x43 0x44 0x45 0x46 instead of 0x00 0x00 0x00 0x01, which is how the GXDLMSDirector does.

To configure the InvocationCounter, I send from the console: -I 0

but still the invocation counter has a very large value instead of 0.

Could you help me to know what is missing in my configurations or if I am not configuring the client invocation counter well?

Regards!
Rafael Sánchez

Profile picture for user Kurumi

Kurumi

6 years 2 months ago

Hi,

Hi,

XML Client example is now improved. You can give those values as command line parameters. Something like:
-x test.xml -t Verbose -C AuthenticationEncryption -F 100 -T System_title -A Authentication_key -B Block_cipher_key -D Dedicated_key

Get the latest version from GitHub.

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

  • 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
  • DLMS server - serving multiple similar datasets gathered from multiple meters across distinct logical addresses
More

Who's new

  • Thomasqto
  • Uka Ibe
  • CTKNhZElptjSlOrpkXl
  • YCbccqfLGRMnlCWoJhXP
  • Malcolmactig
RSS feed
Privacy FAQ GXDN Issues Contact
Follow Gurux on Twitter Follow Gurux on Linkedin