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. Getting DLMS_ERROR_CODE_INCONSISTENT_CLASS_OR_OBJECT Error While Requesting Instantaneous Profile With Index 3

Getting DLMS_ERROR_CODE_INCONSISTENT_CLASS_OR_OBJECT error while requesting Instantaneous profile with index 3

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 Parth Jariwala , 20 August, 2021
Forums
Gurux.DLMS

I am testing my application with DLMS component, which is embedded in it.
Using DLMS code from this link :
https://github.com/Gurux/GuruxDLMS.c

I am using development folder of it.
The controller of my application does not support dynamic memory allocation. So, I have defined DLMS_IGNORE_MALLOC.

I am requesting Instantaneous profile in profile generic(1.0.94.91.0.255) with attribute index 3 which is for capture objects.

I am getting response from meter but as shown in attached image it shows error DLMS_ERROR_CODE_INCONSISTENT_CLASS_OR_OBJECT.

Image
Profile picture for user Kurumi

Kurumi

4 years 9 months ago

Hi,

Hi,

Reading buffer without malloc is causing some problems because you need to parse received data by yourself. Can you add hex string from the received data so I can check this?

BR,
Mikko

Parth Jariwala

4 years 9 months ago

Hi Mikko,

Hi Mikko,

It is getting static buffer to store received data and size of static buffer is 1024 bytes.

I hope you are talking about this response.

Request frame generated from my application :
7E A0 2C 03 41 98 CF 95 E6 E6 00 C8 1E 30 00 00 00 04 13 5E 3F 36 B6 C5 7C EB 92 E6 85 43 13 A1 8D 7E 53 9E 2E DF 30 7A 19 60 B3 14 1C 7E

Response frame got from meter :
7E A1 01 41 03 B8 4D 7D E6 E7 00 CC 81 F2 30 00 00 79 82 D9 BF EA 5F AE 83 AC B5 75 9E A9 80 F0 5A F0 C5 60 4A 9A B3 44 16 31 27 86 4D 91 9F 19 2E F9 87 FD BB C8 94 87 B4 DC 91 06 4C E4 93 AB 14 29 F3 99 BC C6 56 D3 3E 4F 6C 2B DF FC 9C DD 15 D9 C5 33 16 87 78 D7 39 3F 40 DD 3D 10 C8 BC 35 C5 AF 60 0E 28 D6 23 6A 92 EF 6F FD C5 8F 71 E3 77 1D AB 48 04 01 27 FA 39 D9 B8 86 62 4F 4D F2 CA 8A C2 35 0A 25 C7 BE 2A 6D D7 7D E1 21 D7 FE 7D B4 DC E0 92 08 26 13 AD C1 96 08 24 D6 D7 12 48 12 8E 24 A7 C8 AF 6E B5 96 A5 00 17 3A 36 E7 96 74 B2 72 57 DE 8D D1 E9 0F 3B 69 F2 D9 A8 E0 AA 0E 53 6D 1E 27 32 DD 45 0F AB B4 7C 9D 4A 74 A3 12 76 A3 7B F9 D5 B3 64 75 29 4A 68 55 D4 EE 02 2B B7 A2 CA 0F A4 68 83 2F 8E E4 7B 01 3A 1E 76 55 25 58 8B 60 5C A8 15 E1 7C 2D 38 7B B0 E8 9E 7E

Thanks.
Parth.

Image
Profile picture for user Kurumi

Kurumi

4 years 9 months ago

Hi Parth ,

Hi Parth ,

The problem is cl_updateValue-method. You can't call it when you read profile generic. It will try to update the profile generic buffer and because it's empty, it can't be updated.

You need to parse reply.DataValue by yourself when you read profile generic buffer.

BR,
Mikko

Parth Jariwala

4 years 9 months ago

Hi Mikko,

Hi Mikko,

Thanks for reply.

I want to inform you that my application is not running on linux platform .One of my colleague is using same DLMS code which I am using, but he is able to request the instantaneous profile with attribute index 3, also receiving the response and he is using cl_updateValue-method to set the value which it gets.

So, Is there any configuration still remaining for my application platform or DLMS code is working only for linux platform smoothly.

I have defined below list of MACROs in make file.

DLMS_IGNORE_MALLOC
GX_DLMS_MICROCONTROLLER
DLMS_IGNORE_IP6_SETUP
USE_HDLC

Regards,
Parth.

Parth Jariwala

4 years 9 months ago

Hi Mikko,

Hi Mikko,

Waiting for your preciouses response.

Regards,
Parth Jariwala.

Profile picture for user Kurumi

Kurumi

4 years 9 months ago

Hi Parth Jariwala,

Hi Parth Jariwala,

I'm sorry for the slow reply. Our clients are keeping us busy at the moment.

Ýou can't use cl_updateValue with profile generic if you don't use malloc. Attribute #2 is basically working if you have allocated correct objects for the buffer, but then there is no reason to read them if you already know the capture objects.

Malloc is needed to add new rows to the buffer and it's not possible to do for the client-side. You need to handle cl_updateValue for profile generic by yourself. That is the price if you can't use malloc.

BR,
Mikko

Parth Jariwala

4 years 8 months ago

Hi Mikko,

Hi Mikko,

I am sorry for late response. Recently I resolved my issue by myself. I want to inform you regarding the same.

I found two root causes.

RCA 1)
I found that while requesting Instantaneous profile with index 3 which is for capturing all supported objects, it was required to request 2 times, but I have commented the logic of request-response for second time(screen shot1 attached).
So It was failing to set value of capture objects, which I got from response of first request.(This is due to my mistake).

RCA 2)
After enabling the logic of request-response for second time, It was requesting the remaining object list and got same too. But while setting the list of object using cl_updateValue-method function, it was failing in static memory implementation of cosem_verifyArray(screen shot2 attached).I have added logic to get capacity of array and assign same size of memory to array. I have also tested the same and Now it is working fine.

After getting capture object list and setting them too, I requested index 2 for instantaneous Profile. But for that, I found there is no implementation for static memory.
So that I need to implement on my own. So I got your suggestion now and all doubts are clear now.

Thanks for your kind support. Hope you understand the RCA. Let me know if any doubts.
Parth Jariwala.

Image

Parth Jariwala

4 years 8 months ago

ScreenShot1

ScreenShot1

Image
  • 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