Skip to main content
Home
for DLMS smart meters

Main navigation

  • Home
  • Products
  • About us
  • Open Source
  • Community
  • Forum
  • Downloads
User account menu
  • Log in

Breadcrumb

  1. Home
  2. Extract Unified XML From Multiple Answer Reading

Extract Unified XML from multiple answer reading

By Davenzo, 12 February, 2025
Forums
Gurux DLMS for Java

Hi,

Currently i am reading a GenericProfile which answers in multiple frames.

When the reading is done the GXReply class contains the full data.

I want to log this data in XML format.

For single frames responses I can use translator.messageToXml

But what can I do in this case, where there are multiple frames as a response?

I tried to use pduToXml and dataToXml on the reply.getData(), the first gives error and the second gives an empty string. Is there a way to do this easily?

Also I need this to work for Block readings.

Thank you.

Profile picture for user Kurumi

Kurumi

11 months ago

Hi, If you want to show the…

Hi,

If you want to show the data as XML, you need to read all frames and then you can use dataToXml method.

BR,
Mikko

Davenzo

11 months ago

Hi Mikko, DLMS_SEND:…

Hi Mikko,
DLMS_SEND: 7EA00802FF0393925E7E
DLMS_RECEIVE: 7EA021030002185D73F856818012050180060180070400000001080400000001533B7E

Using dataToXml on the SNRM and AARE responses i get an error:
java.lang.IllegalArgumentException: Invalid data type: 129

As I already said this command doesn't work for me.

Also I cannot translate commands sent to the meter because i don't have "data", the library just gives me the frame.

so, how can i translate commands sent INCLUDING SNRM AND AARQ (Including when they are split in multiple frames)

How can i translate responses to SNRM AND AARE (Including when they are split into multiple frames or blocks?)

Thank you very much

Profile picture for user Kurumi

Kurumi

11 months ago

Hi, You can use messageToXml…

Hi,

You can use messageToXml to convert HDLC frames to XML. You can use dataToXml method after you have read all the data from the meter e.g. when you read Profile Generic buffer.

There is no data and for that reason, the dataToXml method fails.

BR,
Mikko

  • Create new account
  • Reset your password

Hire Us!

Latest Releases

  • Mon, 12/29/2025 - 10:38
    Gurux.Serial.Android 3.0.5
  • Mon, 12/15/2025 - 08:11
    Gurux.DLMS.Net 4.0.87
  • Fri, 12/12/2025 - 08:38
    Gurux.DLMS.Python 1.0.195
  • Thu, 12/11/2025 - 13:22
    Gurux.DLMS.Python 1.0.194
  • Thu, 12/11/2025 - 11:01
    gurux.dlms.java 4.0.88

New forum topics

  • 6-digit field values from meter not fully received (only 5 digits shown)
  • Gurux DLMS Android App
  • AMR support for bidirectional meters.
  • addition of new object in object list, meter not working
  • old meter take to much time(l&t)
More
RSS feed
Privacy FAQ GXDN Issues Contact
Follow Gurux on Twitter Follow Gurux on Linkedin