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. Gurux.c Testing With Gxdlmsdirector Ctt Test

gurux.c testing with gxdlmsdirector ctt test

By dlmsDeveloper , 15 November, 2025
Forums
Gurux DLMS for ANSI C

Hi,

I use Gurux.c library and when i tested it with gxdlmsdirector ctt test
The Communication is ok between this two (Device and Software)
But when software was sent only this :

7e a0 2f 00 02 0e d3 03 10 5e 66 e6 e6 00 c8 1e
30 00 00 00 0c 63 a9 c6 fe 56 8e 96 a8 9f fe ed
1b c9 a9 a3 15 20 64 85 be 96 2f 07 00 c8 b8 6e
7e

1: 7E A0 2F 00 02 0E D3 03 10 5E 66 E6 E6 00 C8 1E 30 00 00 00 0C 63 A9 C6 FE 56 8E 96 A8 9F FE ED 1B C9 A9 A3 15 20 64 85 BE 96 2F 07 00 C8 B8 6E 7E
<HDLC len="2E" >
<!-- Logical address:1, Physical address:1001 -->
<TargetAddress Value="43E9" />
<SourceAddress Value="1" />
<!-- AARQ frame. -->
<FrameType Value="10" />
<PDU>
<!-- Invocation Counter: 12 -->
<!-- Decrypt data: C0 01 C1 00 0F 00 00 28 00 00 FF 01 00
<GetRequest>
<GetRequestNormal>
# Priority: High, ServiceClass: Confirmed, Invoke ID: 1
<InvokeIdAndPriority Value="C1" />
<AttributeDescriptor>
# AssociationLogicalName
<ClassId Value="000F" />
# 0.0.40.0.0.255
<InstanceId Value="0000280000FF" />
# Logical Name
<AttributeId Value="01" />
</AttributeDescriptor>
</GetRequestNormal>
</GetRequest>
-->
<glo_GetRequest Value="300000000C63A9C6FE568E96A89FFEED1BC9A9A315206485BE962F0700C8" />
</PDU>
</HDLC>

The device has hard-fault error

I check it, when i send it alone, without any other packet, the device is freeze, I debugged it and found this :

in Ciphering.c in gxgcm_transformBlock function at this line :

bb_set(&nonceAndCounter, systemTitle, 8);

the systemTitle is empty and the hardfault is happen

how can I fix this problem?

Thanks.

Profile picture for user Kurumi

Kurumi

6 months 4 weeks ago

Hi, I believe that you haven…

Hi,

I believe that you haven't set the system title for the meter. You need to set it.

BR,

BR,
Mikko

dlmsDeveloper

6 months 3 weeks ago

Thanks for your respons I…

Thanks for your respons

I Check it again
and set these as you said before :

BB_ATTACH(Settings.base.clientSystemTitle, CLIENT_SYSTEM_TITLE, 8);
BB_ATTACH(Settings.base.preEstablishedSystemTitle, SERVER_SYSTEM_TITLE, 0);
BB_ATTACH(Settings.base.preEstablishedSystemTitle, SERVER_SYSTEM_TITLE, 0);

Also for securitySetup :

BB_ATTACH(SecuritySetupMgPre.serverSystemTitle, SERVER_SYSTEM_TITLE, 8);
BB_ATTACH(SecuritySetupMgPre.clientSystemTitle, CLIENT_SYSTEM_TITLE, 8);

But When I sent just this packet:

7e a0 2f 00 02 0e d3 03 10 5e 66 e6 e6 00 c8 1e
30 00 00 00 0c 63 a9 c6 fe 56 8e 96 a8 9f fe ed
1b c9 a9 a3 15 20 64 85 be 96 2f 07 00 c8 b8 6e
7e

It has hardfault becuase of this line :

Functions :

svr_handleRequest4
==> dlms_getData2
==> dlms_getData3
==> dlms_getPdu
==> dlms_handleGloDedRequest
in :
else if (emptySourceSystemTile){...}

when it run :

if ((ret = cip_decrypt(&settings->cipher,
#ifndef DLMS_IGNORE_MALLOC
settings->preEstablishedSystemTitle->data,
(settings->cipher.broadcast ? &settings->cipher.broadcastBlockCipherKey : &settings->cipher.blockCipherKey),
#else
settings->preEstablishedSystemTitle,
(settings->cipher.broadcast ? settings->cipher.broadcastBlockCipherKey : settings->cipher.blockCipherKey),
#endif //DLMS_IGNORE_MALLOC
& data->data,
&security,
&suite,
&invocationCounter)) != 0)
{
return ret;
}

this function :

gxgcm_transformBlock

in this line :

bb_set(&nonceAndCounter, systemTitle, 8);

HardFault Error happened

Please Help me Fix it

Thank you.

Profile picture for user Kurumi

Kurumi

6 months 3 weeks ago

Hi, Are you using the pre…

Hi,

Are you using the pre-established connection? If you are, you can't use glo_GetRequest because the system title is not sent as part of the PDU.

You must set the general protection conformance for the client. When general protection conformance is set, the GeneralGloCiphering message is used.

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
RSS feed
Privacy FAQ GXDN Issues Contact
Follow Gurux on Twitter Follow Gurux on Linkedin