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. Node
  3. Problem With Profile Generic Buffer

Problem With Profile generic buffer

By Pablo1610 , 16 May, 2023
Forums
Gurux.DLMS

Hi,

I'm trying to create a Profile generic object but I'm not able to read the buffer with the DLMSDirector.

The DLMS server is running in a MCU with DLMS in C. I'm able to read the data registers and clock that belongs to the Profile generic, but not the profile generic buffer.

From the DLMSDirector I can see the access rigths for the buffer it is No Access. How can I change this property? I haven't seen any property value or something to change it.

The code for the object is the following one:

int ret;
//7 capture objects.
static gxTarget CAPTURE_OBJECT[7] = { 0 };
const unsigned char ln[6] = { 1, 0, 99, 1, 0, 255 };
if ((ret = INIT_OBJECT(profileGeneric, DLMS_OBJECT_TYPE_PROFILE_GENERIC, ln)) == 0)
{
profileGeneric.capturePeriod = 60;
//Maximum row count. One row takes 6 bytes. Allocate 150 rows = 900B.
profileGeneric.profileEntries = 20;
profileGeneric.sortMethod = DLMS_SORT_METHOD_FIFO;
//entries in use.
profileGeneric.entriesInUse = 0;

///////////////////////////////////////////////////////////////////
//Add 7 columns.
ARR_ATTACH(profileGeneric.captureObjects, CAPTURE_OBJECT, 7);
//Add clock object.
CAPTURE_OBJECT[0].target = BASE(clock1);
CAPTURE_OBJECT[0].attributeIndex = 2;
CAPTURE_OBJECT[0].dataIndex = 0;
//Add active power.
CAPTURE_OBJECT[1].target = BASE(instantVR);
CAPTURE_OBJECT[1].attributeIndex = 2;
CAPTURE_OBJECT[1].dataIndex = 0;
//Add active power.
CAPTURE_OBJECT[2].target = BASE(instantVT);
CAPTURE_OBJECT[2].attributeIndex = 2;
CAPTURE_OBJECT[2].dataIndex = 0;
//Add active power.
CAPTURE_OBJECT[3].target = BASE(instantVS);
CAPTURE_OBJECT[3].attributeIndex = 2;
CAPTURE_OBJECT[3].dataIndex = 0;
//Add active power.
CAPTURE_OBJECT[4].target = BASE(instantIR);
CAPTURE_OBJECT[4].attributeIndex = 2;
CAPTURE_OBJECT[4].dataIndex = 0;
//Add active power.
CAPTURE_OBJECT[5].target = BASE(instantIT);
CAPTURE_OBJECT[5].attributeIndex = 2;
CAPTURE_OBJECT[5].dataIndex = 0;
//Add active power.
CAPTURE_OBJECT[6].target = BASE(instantIS);
CAPTURE_OBJECT[6].attributeIndex = 2;
CAPTURE_OBJECT[6].dataIndex = 0;
//Set clock to sort object.
profileGeneric.sortObject = BASE(clock1);
profileGeneric.sortObjectAttributeIndex = 2;
}
return 0;

Profile picture for user Kurumi

Kurumi

3 years 4 months ago

Hi, You can change the …

Hi,

You can change the access right in the svr_getAttributeAccess method.

https://github.com/Gurux/GuruxDLMS.c/blob/136207781359516d959ee0c3ebf26…

BR,
Mikko

Pablo1610

3 years 4 months ago

Hi, The problem it is…

Hi,

The problem it is solved, it wasn't the access, because I have fixed it to read mode in the code. It was a problem with the clock, if the clock source it's bad defined, it doesn't return any error and the buffer state changes from read to no access.

As I do not have a clock source in this simulation, I wasn't able to read it. As soon as, I solved the clock parameters, I was able to read it.

Thanks,
Pablo

  • Create new account
  • Reset your password

Hire Us!

Latest Releases

  • Wed, 08/26/2026 - 09:04
    Gurux.DLMS.Python 1.0.203
  • Mon, 08/17/2026 - 11:28
    Gurux.DLMS.Python 1.0.202
  • Mon, 08/17/2026 - 09:47
    gurux.dlms.cpp 9.0.2608.1701
  • Mon, 08/17/2026 - 09:25
    gurux.dlms.c 9.0.2608.1701
  • Mon, 07/27/2026 - 12:37
    gurux.dlms.cpp 9.0.2607.2701

New forum topics

  • Security vulnerability report — request for a private contact (GuruxDLMS.c / ANSI C)
  • Topic: Insufficient Memory Error When Reading Class 7 Profile Generic Objects
  • SN ReadResponse returns all-null values when response spans multiple HDLC frames
  • Gurux.Serial.Android 3.0.6 – CH340 (HL-340) USB-Serial Adapter Not Working,
  • Trying to talk to a L&G E360 meter (Using Python Gurux)
More
RSS feed
Privacy FAQ GXDN Issues Contact
Follow Gurux on Twitter Follow Gurux on Linkedin