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. Invalid HDLC Frame: 10 Expected: 30 In Push Notification

Invalid HDLC Frame: 10 Expected: 30 in push notification

By kapilGaire , 10 October, 2024
Forums
Gurux DLMS for Java

Hi Mr Kurumi,

I am trying to decrypt the push notification frame

7ea06b8103109b10e6e700db08474f450000002960820052200000000b4bb6fce2d22f68b58a3de708de0a45b690d10bf2a2ac9a034fd3886fc6a5dc7cf8b67db461be5855dcb51dc32ba815c8692b41b4bad7a58bbaa45ab8f8e80526e0f610e34f50f090a2f6db5827cb647e

using the below code

String pushEventEncryptedHex="7ea06b8103109b10e6e700db08474f450000002960820052200000000b4bb6fce2d22f68b58a3de708de0a45b690d10bf2a2ac9a034fd3886fc6a5dc7cf8b67db461be5855dcb51dc32ba815c8692b41b4bad7a58bbaa45ab8f8e80526e0f610e34f50f090a2f6db5827cb647e";

GXDLMSSecureClient sc = new
GXDLMSSecureClient(true, 64, 1, Authentication.HIGH, null, InterfaceType.HDLC);

sc.getCiphering().setSecurity(Security.AUTHENTICATION_ENCRYPTION);

sc.getCiphering().setSystemTitle(GXCommon.hexToBytes("systemtitle"));

sc.setServerSystemTitle(GXCommon.hexToBytes("systemtitle"));
sc.getCiphering().setBlockCipherKey(GXCommon.hexToBytes("key"));
sc.getCiphering().setAuthenticationKey(GXCommon.hexToBytes("key"));

sc.getCiphering().setSecuritySuite(SecuritySuite.SUITE_0);

GXByteBuffer rd = new GXByteBuffer();

GXReplyData reply = new GXReplyData();

GXReplyData notify = new GXReplyData();

rd.set(Hex.decodeHex(pushEventEncryptedHex));

try {
boolean status = sc.getData(rd, reply, notify);
System.out.println(notify.getData().toHex(false,0));
System.out.println(reply.getData().toHex(false,0));
System.out.println(reply.getError());
System.out.println(gurux.common.GXCommon.bytesToHex(reply.getData().getData()));
if (reply.getError()!=0) {
throw new GXDLMSException(reply.getError());
}
} catch (InvalidKeyException | NoSuchAlgorithmException | NoSuchPaddingException |
InvalidAlgorithmParameterException | IllegalBlockSizeException | BadPaddingException |
SignatureException e) {
throw new RuntimeException(e);
}

Getting the below Exception
INFO: Invalid HDLC Frame: 10 Expected: 30

Profile picture for user Kurumi

Kurumi

1 year 10 months ago

Hi, Check push listener for…

Hi,

Check push listener for parsing push messages.

https://github.com/Gurux/gurux.dlms.java/tree/master/gurux.dlms.push.li…

You can also use GXDLMSTranslator to convert received push messages to XML string. You can find an example for this in the same project.

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

  • negative indexing for custom method/attribute
  • System title
  • Elster a1800 clock reset to year 2000 with one tariff billing
  • Possible memory leak in file dlms.c, getCompactArrayItem(), getCompactArrayItem2()
  • Official Gurux.DLMS.Client.Example.Net fails during High GMAC secure association (Invalid PDU), while Gurux Director connects successfully
More
RSS feed
Privacy FAQ GXDN Issues Contact
Follow Gurux on Twitter Follow Gurux on Linkedin