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. Error When Using Get With List If Response Is Morethan One Data Block

Error when using get with list if response is morethan one data block

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 pramodahanya , 16 April, 2019
Forums
Gurux DLMS for Java

We are not getting any values out of the reply when using get with list and if the response is more than one data block. We have the below code to read with list:
01private void readList(List<Entry<GXDLMSObject, Integer>> list) throws Exception {
02 if (list.size() != 0) {
03 // uses Command.GET_REQUEST with GetCommandType.WITH_LIST
04 byte[][] data = client.readList(list);
05 GXReplyData reply = new GXReplyData();
06 List<Object> values = new ArrayList<Object>(list.size());
07 for (byte[] it : data) {
08 readDataBlock(it, reply);
09 if (list.size() != 1 && reply.getValue() instanceof Object[]) {
10 values.addAll(Arrays.asList((Object[]) reply.getValue()));
11 } else if (reply.getValue() != null) {
12 // Value is null if data is send multiple frames.
13 Object value = reply.getValue();
14 values.add(value);
15 }
16 reply.clear();
17 }
18 if (values.size() != list.size()) {
19 throw new Exception("Invalid reply. Read items count do not match.");
20 }
21 client.updateValues(list, values);
22 }
23 }

When I use the reply.getValue()(line no 13) the value is something random sometimes boolean, sometimes GXBitString etc. But in the debugger, if I check the contents of the reply(reply.data) then it shows the correct data in hex format but fails while retrieving the values(reply.dataValue).
This works fine if the response is only in a single block. Could you please do let us what might be the issue.

Also the latest Gurux.dlms version 2.2.24 is not published into the maven central repository. Could you please do publish it.

BR
Pramod G

Profile picture for user Kurumi

Kurumi

7 years 1 month ago

Hi,

Hi,

Can you send a log to me by email? We'll check this.

BR,
Mikko

pramodahanya

7 years 1 month ago

Thanks Mikko, I have sent the

Thanks Mikko, I have sent the log by email.

pramodahanya

7 years 1 month ago

Dear Miko

Dear Mikko
Could you please do let me know if this was fixed in release 2.2.25 or if it will be fixed in some later release. I have tested the code with 2.2.25 and the issue is still present. I went through the changes and I couldn't understand if this was fixed and I have to do some code changes or this will be fixed in some future releases.
If fixed in 2.2.25 could you please do let me know if I have to call a different method instead of
Object value = reply.getValue();
values.add(value);
Thank You
BR,
Pramod

Profile picture for user Kurumi

Kurumi

7 years 1 month ago

Dear Pramod,

Dear Pramod,

This is fixed this and we are now testing it. We'll release next version on next week where this is fixed.

BR,

Mikko

pramodahanya

7 years 1 month ago

Thanks for the Mikko

Thanks for the Mikko

Profile picture for user Kurumi

Kurumi

7 years 1 month ago

Dear Pramod,

Dear Pramod,
New version 2.2.26 is released where this is fixed.

BR,
Mikko

pramodahanya

7 years 1 month ago

Dear Mikko, Thank you for the

Dear Mikko, Thank you for the update. This works now

  • 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