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. Parsing Notification Body.

Parsing notification body.

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 wooreeinfo , 23 May, 2022
Forums
Gurux DLMS for Java

Hi,
I'd like to parse notification body.

I sent notification through sendPush() method on server example.
When I added some empty objects on GXDLMSPushSetup, it worked perfectlry.
It can be also translated with Gurux DLMS Translator on GXDLMSDirector.

However, when I added profile generic object (ln : 1.0.99.1.0.255), it didn't seems to be translated notification body.

It shows like this :
BlockCipher key: 00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F
Authentication Key:D0 D1 D2 D3 D4 D5 D6 D7 D8 D9 DA DB DC DD DE DF
1: 7E A0 57 81 03 13 C6 F9 E6 E7 00 0F C0 00 00 03 00 01 00 00 00 01 3F 02 02 01 02 02 04 12 00 28 09 06 00 01 19 09 00 FF 0F 02 12 00 00 02 04 12 00 07 09 06 01 00 63 80 00 FF 0F 02 12 00 00 01 01 02 05 04 08 04 04 08 00 04 08 00 04 18 0C 02 00 17 43 5B 28 F6 57 8A 7E
<HDLC len="56" >
<TargetAddress Value="40" />
<SourceAddress Value="1" />
<!-- Notification frame. -->
<FrameType Value="13" />
<PDU>
<DataNotification>
<!-- High priority. -->
<!-- Confirmed service. -->
<!-- Invoke ID: 3 -->
<LongInvokeIdAndPriority Value="C0000003" />
<!-- 0001-01-01 오전 12:00:00 -->
<DateTime Value="" />
<NotificationBody>
<DataValue>
<Array Qty="00" >
</Array>
</DataValue>
</NotificationBody>
</DataNotification>
</PDU>
</HDLC>

Please let me know how to parse it.

Thanks in Advance.
Hyunse Cho
wooreeinfo

Profile picture for user Kurumi

Kurumi

4 years 2 months ago

Hi,

Hi,

It seems that there is an invalid byte in the data. Are you using malloc in GXDLMSPushSetup or is this the original example where you have added the profile generic object?

BR,
Mikko

wooreeinfo

4 years 2 months ago

Thanks for your kindness.

Thanks for your kindness.

I added two objects for the notification test, at last of init() method in GXDLMSBase.java.
(using example codes on github.)

1. I added a new GXDLMSProfileGeneric object and add rows like this :

GXDLMSProfileGeneric pg = new GXDLMSProfileGeneric("1.0.99.1.0.255");
pg.addCaptureObject(new GXDLMSData("1.0.128.0.11.255"), 2, 0);
pg.addCaptureObject(new GXDLMSRegister("1.1.1.8.0.255"), 2, 0);
pg.addCaptureObject(new GXDLMSRegister("1.1.5.8.0.255"), 2, 0);
pg.addCaptureObject(new GXDLMSRegister("1.1.8.8.0.255"), 2, 0);
pg.addCaptureObject(new GXDLMSRegister("1.1.9.8.0.255"), 2, 0);
pg.addCaptureObject(new GXDLMSClock("0.0.1.0.0.255"), 2, 0);
pg.addCaptureObject(new GXDLMSData("0.0.97.97.4.255"), 2, 0);
pg.addRow(new Object[]{2992, 4351, 67, 2096, 8781, new GXDateTime("2022-05-23 12:00:00"), "000011000000000000000000"});
getItems().add(pg);

2. And I added a new GXDLMSPushSetup object like this :

GXDLMSPushSetup push = new GXDLMSPushSetup("0.2.25.9.0.255");
push.setDestination("127.0.0.1:4059");
push.getPushObjectList().add(new GXSimpleEntry<GXDLMSObject, GXDLMSCaptureObject>(push, new GXDLMSCaptureObject(2, 0)));
push.getPushObjectList().add(new GXSimpleEntry<GXDLMSObject, GXDLMSCaptureObject>(pg, new GXDLMSCaptureObject(2, 0)));
getItems().add(push);

3. Finally, I called sendPush() method using push object.

I don't know why exist invalid byte in the data.

Please let me know If I had something wrong.

Thanks in advance.
Hyunse Cho
wooreeinfo

Profile picture for user Kurumi

Kurumi

4 years 1 month ago

Hi Hyunse Cho,

Hi Hyunse Cho,

Profile generic buffer was causing this problem. This is fixed for the new Java version. Get the latest version and let me know if you have problems.

BR,
Mikko

wooreeinfo

4 years 1 month ago

Thanks for the reply.

Thanks for the reply.

I forgot to comment that was solved.
It solved via "Something weird in notification body" post's reply.

It works perfectly now.

  • Create new account
  • Reset your password

Hire Us!

Latest Releases

  • 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
  • Mon, 06/15/2026 - 08:52
    gurux.dlms.c 9.0.2606.1501

New forum topics

  • Service not known error on gprs communication
  • 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
More

Who's new

  • @Hmd- several '.
  • Dawsontot
  • Jerrylam
  • qvlLdJweKzGUYaSOVS
  • LindanEt
RSS feed
Privacy FAQ GXDN Issues Contact
Follow Gurux on Twitter Follow Gurux on Linkedin