Hi, i'm using Gurux DLMS C.
I'm receiving APDU from the meter in binary format like below. I believe its simple APDU.
Please help me understand how to parse it with gurux C library.
Thank you.
# this is sent every middle of a minute
########################################
0F # data notification
00 00 00 03 # invoke id
00 # and priority
02 02 # structure [2]
16 # enum
01 # value
01 # array
16 # 22 elements ?
# element 1
02 02 # structure [2]
# object address
00 # null-data type
01 # class id = data
00 00 60 01 01 FF #instance id
# object attribute
02 # id
09 0A # octet string, len 10
31 30 30 30 30 30 30 30 30 30 ; "1000000000"
# element 2
02 02 # structure [2]
00 # cosem class and obis
46 # class_id 70 Disconnect control
00 00 60 03 0A FF # OBIS
03 # attribute
16 # enum
01 # value
and so on
I mean there is `notify…
I mean there is `notify_getPushObjects` but i dont understand how to give push object list.
Ideally i dont want to stick to some hardcoded list, since list of objects which are sent by meter can be changed by user.
I'm making generic reader of push messages which would work for different meters pushing these messages.
Hi, I believe that you have…
Hi,
I believe that you have removed HDLC or WRAPPER frame from the push message.
This is push message. You can use the push example to handle it.
https://github.com/Gurux/GuruxDLMS.c/tree/master/GuruxDLMSPushExample
Just update the correct setting to this line:
https://github.com/Gurux/GuruxDLMS.c/blob/d460aff6cc4df1c17b6c29061108f…
Then you need to update push objects. The content of push objects is configurable, so it can be anything, but it should be described on meter documentation.
https://github.com/Gurux/GuruxDLMS.c/blob/d460aff6cc4df1c17b6c29061108f…
BR,
Mikko
I have not removed anything…
I have not removed anything. This is how ZPA electricity meters push the data.
on top of every minute
0F 00 00 00 03 00 02 02 16 00 01 04 02 02 11 01 16 00 02 02 11 02 16 00 02 02 11 03 16 01 02 02 11 04 16 00
and frame with meter readings every 30th second of a minute.
0F 00 00 00 03 00 02 02 16 01 01 16 02 02 00 01 00 00 60 01 01 FF 02 09 0A
31 30 30 30 36 30 37 37 39 37 02 02 00 46 00 00 60 03 0A
FF 03 16 01 02 02 00 47 00 00 11 00 00 FF 03 06 00 00 00 00 02 02 00 46 00 01 60 03 0A
FF 03 16 00 02 02 00 46 00 02 60 03 0A
FF 03 16 00 02 02 00 46 00 03 60 03 0A
FF 03 16 01 02 02 00 46 00 04 60 03 0A
FF 03 16 00 02 02 00 01 00 00 60 0E 00 FF 02 09 02 54 31 02 02 00 03 01 00 01 07 00 FF 02 06 00 00 01 70 02 02 00 03 01 00 15 07 00 FF 02 06 00 00 00 0B 02 02 00 03 01 00 29 07 00 FF 02 06 00 00 01 51 02 02 00 03 01 00 3D 07 00 FF 02 06 00 00 00 14 02 02 00 03 01 00 02 07 00 FF 02 06 00 00 00 00 02 02 00 03 01 00 16 07 00 FF 02 06 00 00 00 00 02 02 00 03 01 00 2A 07 00 FF 02 06 00
00 00 00 02 02 00 03 01 00 3E 07 00 FF 02 06 00 00 00 00 02 02 00 03 01 00 01 08 00 FF 02 06 00 00 52 A9 02 02 00 03 01 00 01 08 01 FF 02 06 00 00 21 D9 02 02 00 03 01 00 01 08 02 FF 02 06 00 00 30 D0 02 02 00 03 01 00 01 08 03 FF 02 06 00 00 00 00 02 02 00 03 01 00 01 08 04 FF 02 06 00 00 00 00 02 02 00 03 01 00 02 08 00 FF 02 06 00 00 09 03
so no HLDC wrappers or anything.
i tried to use notify_getData() with DLMS_INTERFACE_TYPE_PDU
but it fails.
debugging tells me that it finds
- notification tag
- invoke id and priority
- then it finds first structure. which has enum type 16 and value 1 and array of 22 elements. it tries to iterate through and fails on parsing enum
Hi, It might cause problems…
Hi,
It might cause problems if the push message is sent without framing. Everything works if all data is received at the same time. If the data is fragmented, there is no information what is the data size or if the data is corrupted.
The data is correct in the message that is sent every minute, but the meter reading is not correct. Can you verify it?
BR,
Mikko