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. Svr_handleSetRequest2 Not Working Correctly

svr_handleSetRequest2 not working correctly

By Pablob, 22 October, 2025
Forums
Gurux DLMS for ANSI C

Hi,

I’ve been working with the GURUX library for ANSI C and ran into an issue.

When I try to set the value of an object class_id = 1 and an attribute of type OCTET_STRING, I’ve noticed the following:

If I read the object first and then set it, inside svr_postWrite(dlmsSettings* settings, gxValueEventCollection* args) I get args->size == 1.

If I don’t read first and I write directly, then in the same function args->size == 0, which means no post-processing happens after the write.

After stepping through the library, I found that in svr_handleSetRequest2 the list.size is never set to 1. As a test, I have asigned list.size = 1 at the beginning of this function:

#ifdef DLMS_IGNORE_MALLOC
list = settings->transaction.targets;
e = &list.data[0];
ve_clear(e);
list.size = 1;

With this change, svr_postWrite now receives one event and I’m able to perform post-processing after a write.

Is this the expected behavior, or is there a better/proper fix for this scenario?

Thanks,
Pablo

Profile picture for user Kurumi

Kurumi

2 weeks 4 days ago

Hi Pablo, I believe that you…

Hi Pablo,

I believe that you are right. This problem occurs if you establish the connection and write without reading anything from the meter. The read resets this error.

This needs testing, and this will be released in the next week after the tests are over.

BR,
Mikko

Pablob

2 weeks 4 days ago

Hello Kurumi, Thank you for…

Hello Kurumi,

Thank you for your response.
I’ll be looking forward to the next releases.

Thanks!

Pablo

Profile picture for user Kurumi

Kurumi

1 week 5 days ago

Hi Pablo, This is fixed to…

Hi Pablo,

This is fixed to version 9.0.2510.2901.
Thank you for pointing this out.

BR,
Mikko

  • Create new account
  • Reset your password

Hire Us!

Latest Releases

  • Wed, 10/29/2025 - 08:51
    gurux.dlms.c 9.0.2510.2901
  • Thu, 10/16/2025 - 09:59
    gurux.dlms.java 4.0.83
  • Wed, 10/08/2025 - 10:21
    gurux.dlms.c 9.0.2510.0801
  • Fri, 09/26/2025 - 10:02
    gurux.dlms.cpp 9.0.2509.2601
  • Fri, 09/26/2025 - 09:45
    gurux.dlms.c 9.0.2509.2601

New forum topics

  • Guidance on using the source codes
  • How to get/convert user readable format data from readRowsByRange
  • Insufficient memory to continue the execution of the program.
  • The client instance code failed to connect to the electricity meter for authentication
  • Unable to Release Request when closing connection with meter.
More
RSS feed
Privacy FAQ GXDN Issues Contact
Follow Gurux on Twitter Follow Gurux on Linkedin