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. Reading Profile Generic In Wrapper Layer - Failed

Reading profile generic in wrapper layer - failed

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 Mohanraj , 27 February, 2020
Forums
General discussion

Hi Mikko,

trying to read profile generic data using WRAPPER.But unable to process the response. "Device reports a hardware fault"
Below is the code snippet and log

cl_init(&con.settings, 1, 32, 1, DLMS_AUTHENTICATION_LOW, "LWTSM", DLMS_INTERFACE_TYPE_WRAPPER);
ret = com_initializeConnection(&con);
if (ret != DLMS_ERROR_CODE_OK)
{
return ret;
}
cosem_init2(BASE(my_profile_object),DLMS_OBJECT_TYPE_PROFILE_GENERIC,"0.0.94.91.10.255");
com_read(&con, BASE(my_profile_object), 3);
com_read(&con, BASE(my_profile_object), 2);

obj_toString(BASE(my_profile_object), &data);
if(data != NULL)
{
printf("%s\r\n", data);
free(data);
data = NULL;
}
else
{
printf("Data is NULL...\n");
}

Communication log
----------------------------------------------------------------
TX: 00 01 00 20 00 01 00 35 60 33 A1 09 06 07 60 85 74 05 08 01 01 8A 02 07 80 8B 07 60 85 74 05 08 02 01 AC 07 80 05 4C 57 54 53 4D BE 10 04 0E 01 00 00 00 06 5F 1F 04 00 00 1E 1D FF FF

RX: 00 01 00 01 00 20 00 2B 61 29 A1 09 06 07 60 85 74 05 08 01 01 A2 03 02 01 00 A3 05 A1 03 02 01 00 BE 10 04 0E 08 00 06 5F 1F 04 00 00 10 14 01 D6 00 07

TX: 00 01 00 20 00 01 00 0D C0 01 81 00 08 00 00 01 00 00 FF 02 00

RX: 00 01 00 01 00 20 00 12 C4 01 81 00 09 0C 07 E4 02 1B 04 0F 28 34 FF 80 00 FF
Index: 2 Value: 02/27/2020 15:40:52
Index: 3 Value: 0
Index: 4 Value: 0
Index: 5 Value: 01/00/1900 00:00:00 UTC+00:00
Index: 6 Value: 01/00/1900 00:00:00 UTC+00:00
Index: 7 Value: 0
Index: 8 Value: 0
Index: 9 Value: 0

TX: 00 01 00 20 00 01 00 0D C0 01 81 00 07 30 2E 30 2E 39 34 03 00

RX: 00 01 00 01 00 20 00 05 C4 01 81 01 04
ReadObject failed Profile Generic 48.46.48.46.57.52:3 Access Error : Device reports a hardware fault.
TX: 00 01 00 20 00 01 00 0D C0 01 81 00 07 30 2E 30 2E 39 34 02 00

RX: 00 01 00 01 00 20 00 05 C4 01 81 01 04
ReadObject failed Profile Generic 48.46.48.46.57.52:2 Access Error : Device reports a hardware fault.
Index: 2 Value: [
]
Index: 3 Value: []
Index: 4 Value: 0
Index: 5 Value: 0
Index: 6 Value:
Index: 7 Value: 0
Index: 8 Value: 0

TX: 00 01 00 20 00 01 00 02 62 00

RX: 00 01 00 01 00 20 00 05 63 03 80 01 00

Thanks
Mohanraj

Mohanraj

6 years 3 months ago

Hi Mikko,

Hi Mikko,
Any update please?

Thanks
Mohanraj

Profile picture for user Kurumi

Kurumi

6 years 3 months ago

Hi,

Hi,

Check your logical name. You try to read the profile generic with logical name 48.46.48.46.57.52 and it's not correct.

BR,
Mikko

Mohanraj

6 years 3 months ago

Hi,

Hi,
we are initializing cosem with
cosem_init2(BASE(my_profile_object),DLMS_OBJECT_TYPE_PROFILE_GENERIC,"0.0.94.91.10.255");
not sure why is it sending 48.46.48.46.57.52 OBIS code?

with cosem_init(BASE(my_profile_object),DLMS_OBJECT_TYPE_PROFILE_GENERIC,"0.0.94.91.10.255");
response is received but parsing problem. attached log with debug for your reference.
data type mismatch i think

Debug has been collected from "int dlms_getData(gxByteBuffer* data, gxDataInfo* info, dlmsVARIANT* value)" function in dlms.c file

TX: 00 01 00 20 00 01 00 0D C0 01 81 00 07 00 00 5E 5B 0A FF 02 00
RX: 00 01 00 01 00 20 00 6D C4 01 81 00 01 01 02 08 0A 0A 30 30 39 32 30 30 30 30 30 36 0A 0D 56 54 4B 30 30 39 32 30 30 30 30 30 36 0A 20 4C 49 4E 4B 57 45 4C 4C 20 54 45 4C 45 53 59 53 54 45 4D 53 20 50 56 54 2E 4C 54 44 2E 48 59 44 0A 14 53 4D 31 32 2D 53 56 30 33 2E 30 30 2D 41 56 30 33 2E 30 30 11 06 0A 02 44 31 0A 07 31 30 2D 36 30 20 41 12 07 E4
info->type : 1 ,data->position: 1 ,data->data:
01 01 02 08 0A 0A 30 30 39 32 30 30 30 30 30 36 0A 0D 56 54 4B 30 30 39 32 30 30 30 30 30 36 0A 20 4C 49 4E 4B 57 45 4C 4C 20 54 45 4C 45 53 59 53 54 45 4D 53 20 50 56 54 2E 4C 54 44 2E 48 59 44 0A 14 53 4D 31 32 2D 53 56 30 33 2E 30 30 2D 41 56 30 33 2E 30 30 11 06 0A 02 44 31 0A 07 31 30 2D 36 30 20 41 12 07 E4 41 12 07 E4pos : 0
info->type : 2 ,data->position: 3 ,data->data:
01 01 02 08 0A 0A 30 30 39 32 30 30 30 30 30 36 0A 0D 56 54 4B 30 30 39 32 30 30 30 30 30 36 0A 20 4C 49 4E 4B 57 45 4C 4C 20 54 45 4C 45 53 59 53 54 45 4D 53 20 50 56 54 2E 4C 54 44 2E 48 59 44 0A 14 53 4D 31 32 2D 53 56 30 33 2E 30 30 2D 41 56 30 33 2E 30 30 11 06 0A 02 44 31 0A 07 31 30 2D 36 30 20 41 12 07 E4 41 12 07 E4pos : 0
info->type : 10 ,data->position: 5 ,data->data:
01 01 02 08 0A 0A 30 30 39 32 30 30 30 30 30 36 0A 0D 56 54 4B 30 30 39 32 30 30 30 30 30 36 0A 20 4C 49 4E 4B 57 45 4C 4C 20 54 45 4C 45 53 59 53 54 45 4D 53 20 50 56 54 2E 4C 54 44 2E 48 59 44 0A 14 53 4D 31 32 2D 53 56 30 33 2E 30 30 2D 41 56 30 33 2E 30 30 11 06 0A 02 44 31 0A 07 31 30 2D 36 30 20 41 12 07 E4 41 12 07 E4pos : 1
info->type : 48 ,data->position: 7 ,data->data:
01 01 02 08 0A 0A 30 30 39 32 30 30 30 30 30 36 0A 0D 56 54 4B 30 30 39 32 30 30 30 30 30 36 0A 20 4C 49 4E 4B 57 45 4C 4C 20 54 45 4C 45 53 59 53 54 45 4D 53 20 50 56 54 2E 4C 54 44 2E 48 59 44 0A 14 53 4D 31 32 2D 53 56 30 33 2E 30 30 2D 41 56 30 33 2E 30 30 11 06 0A 02 44 31 0A 07 31 30 2D 36 30 20 41 12 07 E4 41 12 07 E4cl_getData failed in readDLMSPacket 258 : Invalid Parameter.
ReadObject failed Profile Generic 00.00.94.91.10.255:2 Access Error : Device reports a hardware fault.

Please provide inputs.

Thanks
Mohanraj

Profile picture for user Kurumi

Kurumi

6 years 3 months ago

Hi,

Hi,

Use it like this:
const unsigned char ln[6] = { 0, 0, 94, 91, 10, 255 };
cosem_init2(BASE(associationShortName), DLMS_OBJECT_TYPE_PROFILE_GENERIC, ln);

or:
cosem_init(BASE(my_profile_object),DLMS_OBJECT_TYPE_PROFILE_GENERIC,"0.0.94.91.10.255");

You need to read capture objects before reading buffer.
Attribute index of capture is #3.

https://www.gurux.fi/Gurux.DLMS.Objects.GXDLMSProfileGeneric

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