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
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
Hi Mikko,
Hi Mikko,
Any update please?
Thanks
Mohanraj
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
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
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