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. GXDLMSServer On Cpp Infinite Reading

GXDLMSServer on cpp infinite reading

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 germka , 30 July, 2021
Forums
Gurux.DLMS

Hi, I am writing an application for the SPODUS protocol from the GuruxDLMSServerExample project and encountered some bug with data counter:

I have a large number of values ​​in the generic profile line (all columns from "1.0.98.2.0.255" + 3 SPODUS values), for this reason only one row is placed in the PDU, in this case the server does not read more than one record. I tried to reduce the number of columns in a profile generic row so that 2 PDUs can fit, in this case I can read more than one record, but if the number of requested records is a multiple of the number of rows in the PDU, then the server reads the data inifinite until the end of the file (DB in my case)

I found exactly the same bugs in the original project GuruxDLMSServerExample, requesting the generic profile from the example, starting from record 999, many read attempts were made with condition:
"(*it)->GetRowBeginIndex() > (*it)->GetRowEndIndex()" and negative "count"
(condition in code https://github.com/Gurux/Gurux.DLMS.cpp/blob/671fcbf5c02c77bb7dd5113ea5…)

Profile picture for user Kurumi

Kurumi

4 years 10 months ago

Hi,

Hi,

To make sure that we are talking about the same issue:
The problem is that data in one row don't fit to PDU?

How many columns do you have and what is the size of them?
This is fixed as soon as it can be repeated.

BR,
Mikko

germka

4 years 10 months ago

In reply to Hi, by Kurumi

No, row of my data (68

No, row of my data (68 columns) normaly fit to PDU, but it's just one line. And in the case of one line in the PDU, the server does not try to read next line. So if PDU fit only one row, i can read only one row even if i set more, if PDU fit 2 rows, i can read number of row multiple by 2, and so on.
Also server tryes to read data to the end of file in case if rows in PDU > 2 and requested entyes multiple to rows in PDU, even when it read all the necessary lines.

Image

germka

4 years 10 months ago

In this case i deleted 2

In this case i deleted 2 columns from profile generic to fit two rows in PDU, server reads only 8 enries.

Image
Profile picture for user Kurumi

Kurumi

4 years 10 months ago

Hi,

Hi,

What is your PDU size? This works without problems in my environment.

BR,
Mikko

germka

4 years 10 months ago

In reply to Hi, by Kurumi

m_MaxReceivePDUSize = 1024

m_MaxReceivePDUSize = 1024
m_MaxServerPDUSize = 1024
reply size = 136 in case 1 row to PDU

germka

4 years 10 months ago

Hi, i setted m

Hi, i setted m_MaxServerPDUSize to 65535 and now i can read moar then one entry with large profile generic, but seems its not wayout.

Profile picture for user Kurumi

Kurumi

4 years 10 months ago

In reply to Hi, i setted m by germka

Hi,

Hi,

This can now be repeated. I'll let you know as soon as fix tests are over.

BR,
Mikko

  • 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