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. Length of RLRQ Is Not Correct If Using HLS With Security Suite 0

Length of RLRQ is not correct if using HLS with Security Suite 0

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 panny2406 , 12 December, 2018
Forums
Gurux DLMS for Java

Hi there,
we´ve problems using HLS with Security Suite 0 (Library Version 2.2.17).
We are able to initialize the connection, it is even possible to do some get requests, but whenever we close the connection we get a "Length of RLRQ is not correct". There are no problems when using HLS Security Suite 1 or 2.

We use HLS with Authentication (HIGH_GMAC) and Encryption against the Meter Simulator of DNV GL.
Does anyone have an idea why this error occurs?

We use the following code:

GXDLMSSecureClient client = new GXDLMSSecureClient();

client.setInterfaceType(InterfaceType.WRAPPER);
client.setUseLogicalNameReferencing(true);
client.setAuthentication(Authentication.HIGH_GMAC);
client.setClientAddress(1);
client.setServerAddress(1);
client.setUserId(1);

client.setPassword(Util.hexStringToByteArray("30313233343536373839414243444546"));
client.getCiphering().setSecurity(Security.AUTHENTICATION_ENCRYPTION);
client.getCiphering().setAuthenticationKey(Util.hexStringToByteArray("00112233445566778899AABBCCDDEEFF"));
client.getCiphering().setBlockCipherKey(Util.hexStringToByteArray("00112233445566778899AABBCCDDEEFF"));

// If we use Authentication and Encryption with HIGH_GMAC and Security Suite 0 we get an error closing the connection
// (Length of RLRQ is not correct) for Meter Simulator
client.getCiphering().setSecuritySuite(SecuritySuite.AES_GCM_128);
// client.getCiphering().setSecuritySuite(SecuritySuite.ECDH_ECDSA_AES_GCM_128_SHA_256);
// client.getCiphering().setSecuritySuite(SecuritySuite.ECDHE_CDSA_AES_GCM_256_SHA_384);

IGXMedia media = new GXNet(NetworkType.UDP, "192.168.0.20", 4059);

When we initialize and close the connection with the code of your sample client we get the following payloads (already decoded with your Translator):

Req:
00 01 00 01 00 01 00 64 60 62 A1 09 06 07 60 85 74 05 08 01 03 A6 0A 04 08 41 42 43 44 45 46 47
48 A9 03 02 01 01 8A 02 07 80 8B 07 60 85 74 05 08 02 05 AC 12 80 10 3F 70 0F 30 03 27 1D 14 4B
3F 53 68 57 20 3C 2A BE 23 04 21 21 1F 30 00 00 00 00 60 88 10 05 D1 E8 59 6B 59 70 01 46 8D 72
B7 8A 52 E6 5E A7 EF 9E 7F 05 17 89
<WRAPPER len="108" >
<TargetAddress Value="1" />
<SourceAddress Value="1" />
<PDU>
<AssociationRequest>
<ApplicationContextName Value="LN_WITH_CIPHERING" />
<CallingAPTitle Value="4142434445464748" />
<CallingAEInvocationId Value="1" />
<SenderACSERequirements Value="1" />
<MechanismName Value="HighGMac" />
<CallingAuthentication Value="3F700F3003271D144B3F536857203C2A" />
<glo_InitiateRequest Value="300000000060881005D1E8596B597001468D72B78A52E65EA7EF9E7F051789" />
</AssociationRequest>
</PDU>
</WRAPPER>

Res:
00 01 00 01 00 01 00 76 61 74 A1 09 06 07 60 85 74 05 08 01 03 A2 03 02 01 00 A3 05 A1 03 02 01
0E A4 0A 04 08 44 4E 56 67 73 16 5C 86 88 02 07 80 89 07 60 85 74 05 08 02 05 AA 1D 80 1B 2E 2C
7A 68 66 5A 22 3A 4A 30 5B 44 78 62 37 64 38 53 56 57 46 35 5B 43 72 76 40 BE 23 04 21 28 1F 30
00 00 19 47 96 BD D5 D0 48 15 75 5B FE 5A 52 78 39 CB D3 A3 0A 51 37 B1 1E 2F 93 7D E3 31
<WRAPPER len="126" >
<TargetAddress Value="1" />
<SourceAddress Value="1" />
<PDU>
<AssociationResponse>
<ApplicationContextName Value="LN_WITH_CIPHERING" />
<AssociationResult Value="0" />
<ResultSourceDiagnostic>
<!--AUTHENTICATION_REQUIRED-->
<ACSEServiceUser Value="14" />
</ResultSourceDiagnostic>
<RespondingAPTitle Value="444E566773165C86" />
<ResponderACSERequirement Value="1" />
<MechanismName Value="HighGMac" />
<RespondingAuthentication Value="2E2C7A68665A223A4A305B44786237643853565746355B43727640" />
<glo_InitiateResponse Value="300000194796BDD5D04815755BFE5A527839CBD3A30A5137B11E2F937DE331" />
</AssociationResponse>
</PDU>
</WRAPPER>

Req:
00 01 00 01 00 01 00 33 CB 31 30 00 00 00 00 A2 89 D1 05 D8 B7 46 47 59 70 E0 5A 73 84 44 F7 01
09 EF 91 6F B8 B5 67 72 37 2F 7D 1F 31 A9 F6 E0 93 80 99 54 26 37 38 32 40 F1 E9
<WRAPPER len="59" >
<TargetAddress Value="1" />
<SourceAddress Value="1" />
<PDU>
<glo_ActionRequest Value="3000000000A289D105D8B746475970E05A738444F70109EF916FB8B56772372F7D1F31A9F6E0938099542637383240F1E9" />
</PDU>
</WRAPPER>

Res:
00 01 00 01 00 01 00 2C CF 2A 30 00 00 19 49 F0 54 B1 C2 48 A7 C6 A6 D6 DE DE 6E 73 DD 98 3F DA
6A 7F BA C6 EC 11 9A 5E E4 3B 6C B0 32 7D 12 7E E3 62 34 08
<WRAPPER len="52" >
<TargetAddress Value="1" />
<SourceAddress Value="1" />
<PDU>
<glo_ActionResponse Value="3000001949F054B1C248A7C6A6D6DEDE6E73DD983FDA6A7FBAC6EC119A5EE43B6CB0327D127EE3623408" />
</PDU>
</WRAPPER>

Req:
00 01 00 01 00 01 00 3D 62 3B 30 00 00 00 00 03 A0 90 04 D7 09 65 6B 78 51 00 6B 72 8D 55 E7 61
81 FF 94 6C C4 E2 DD 22 9A B8 12 9E 01 9F 4F 7B C0 CE A9 68 66 DD 0C 9A 46 23 FE 75 32 7B 12 9D
B0 E7 3D 40 A3
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> Invalid DLMS framing.

Res:
00 01 00 01 00 01 00 03 D8 01 01
<WRAPPER len="11" >
<TargetAddress Value="1" />
<SourceAddress Value="1" />
<PDU>
<Data="0101" />
</PDU>
</WRAPPER>

BR
Christoph

Profile picture for user Kurumi

Kurumi

7 years 6 months ago

Length of RLRQ is not correct if using HLS with Security Suite 0

Hi,

I'll check this today.

BR,
Mikko

Profile picture for user Kurumi

Kurumi

7 years 6 months ago

Length of RLRQ is not correct if using HLS with Security Suite 0

Hi,

This is fixed. Get the latest version 2.2.20.
https://gurux.fi/node/13078

BR,

Mikko

panny2406

7 years 5 months ago

Length of RLRQ is not correct if using HLS with Security Suite 0

Hi Mikko,
I can confirm that this works with version 2.2.20.

Thank you very much
Christoph

  • 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