I am using the gurux c library to read a meter profile in "DLMS_INTERFACE_TYPE_WRAPPER" mode.
I receive the first frame but the protocol don't ask for the next frame and give an error.
When I call "cl_getData" with the response I cant seem to find the code that request next frame for the wrapper mode.
Hi,
It looks good. Have you read the capture object (attribute index 3) before reading data?
Can you send log from that also so I can test this with a meter simulator?
Just to give you a bit of background, I am trying to read a data concentrator that uses PLC to talk to the meter network, the DCU comminicate G3 with the DLMS wrapper to the main server. I have managed to login to the DCU and read the serial, datetime and the meters it discovered on the PLC network successfully. I am just now stuck with the genericLoadProfile object from the DCU to read the meter data it collected.
There is a GuruxDLMSClientExample. Can you run it? Parameters are something like:
-h METER_IP_ADDRESS -p METER_PORT_NUMBER -c 80 -w -t Verbose a- AUTHENTICATION_LEVEL -P PASSSWORD
It reads all the data from the meter and it'll take some time.
Hi Johan,
Hi Johan,
Can you paste raw data?
BR,
Mikko
Hi this is the raw data:
Hi this is the raw data:
[2020-04-28 12:48:14][MOL0000020191015][6] Send Frame
00 01 00 50 00 01 00 40 C0 01 81 00 07 01 00 63
01 00 FF 02 01 01 02 04 02 04 12 00 08 09 06 00
00 01 00 00 FF 0F 02 12 00 00 09 0C 07 E4 04 18
05 00 00 00 FF FF 88 00 09 0C 07 E4 04 1C 02 0C
1E 00 FF FF 88 00 01 00
[2020-04-28 12:48:16][MOL0000020191015][6] Receive Frame
00 01 00 01 00 50 03 FF C4 02 81 00 00 00 00 01
00 82 03 F3 01 81 C0 02 1E 12 00 0C 09 0C 07 E4
04 17 04 15 00 00 FF 80 00 00 06 00 00 00 00 06
00 00 00 00 06 00 00 00 00 06 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 02 1E 12 00 0C 09 0C 07 E4 04
17 04 15 1E 00 FF 80 00 00 06 00 00 00 00 06 00
00 00 00 06 00 00 00 00 06 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 02 1E 12 00 0C 09 0C 07 E4 04 17
04 16 00 00 FF 80 00 00 06 00 00 00 00 06 00 00
00 00 06 00 00 00 00 06 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 02 1E 12 00 0C 09 0C 07 E4 04 17 04
16 1E 00 FF 80 00 00 06 00 00 00 00 06 00 00 00
00 06 00 00 00 00 06 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 02 1E 12 00 0C 09 0C 07 E4 04 17 04 17
00 00 FF 80 00 00 06 00 00 00 00 06 00 00 00 00
06 00 00 00 00 06 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 02 1E 12 00 0C 09 0C 07 E4 04 17 04 17 1E
00 FF 80 00 00 06 00 00 00 00 06 00 00 00 00 06
00 00 00 00 06 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 02 1E 12 00 0C 09 0C 07 E4 04 18 05 00 00 00
FF 80 00 00 06 00 00 00 00 06 00 00 00 00 06 00
00 00 00 06 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
02 1E 12 00 0C 09 0C 07 E4 04 18 05 00 1E 00 FF
80 00 00 06 00 00 00 00 06 00 00 00 00 06 00 00
00 00 06 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 02
1E 12 00 0C 09 0C 07 E4 04 18 05 01 00 00 FF 80
00 00 06 00 00 00 00 06 00 00 00 00 06 00 00 00
00 06 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 02 1E
12 00 0C 09 0C 07 E4 04 18 05 01 1E 00 FF 80 00
00 06 00 00 00 00 06 00 00 00 00 06 00 00 00 00
06 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 02 1E 12
00 0C 09 0C 07 E4 04 18 05 02 00 00 FF 80 00 00
06 00 00 00 00 06 00 00 00 00 06 00 00 00 00 06
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 02 1E 12 00
0C 09 0C 07 E4 04 18 05 02 1E 00 FF 80 00 00 06
00 00 00 00 06 00 00 00 00 06 00 00 00 00 06 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 02 1E 12 00 0C
09 0C 07 E4 04 18 05 03 00 00 FF 80 00 00 06 00
00 00 00 06 00 00 00 00 06 00 00 00 00 06 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 02 1E 12 00 0C 09
0C 07 E4 04 18 05 03 1E 00 FF 80 00 00 06 00 00
00 00 06 00 00 00 00 06 00 00 00 00 06 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 02 1E 12 00 0C 09 0C
07 E4 04 18 05 04 00 00 FF 80 00 00 06 00 00 00
00 06 00 00 00 00 06 00 00 00 00 06 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 02 1E 12 00 0C 09 0C 07
E4 04 18 05 04 1E 00 FF 80 00 00 06 00 00 00 00
06 00 00 00 00 06 00 00 00 00 06 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00
Hi,
Hi,
It looks good. Have you read the capture object (attribute index 3) before reading data?
Can you send log from that also so I can test this with a meter simulator?
BR,
Mikko
Hi,
Hi,
Can you use malloc?
BR,
Mikko
Hi
Hi
I can quickly add the capture object method and give you feedback on the result.
Yes I can use malloc.
Just to give you a bit of
Just to give you a bit of background, I am trying to read a data concentrator that uses PLC to talk to the meter network, the DCU comminicate G3 with the DLMS wrapper to the main server. I have managed to login to the DCU and read the serial, datetime and the meters it discovered on the PLC network successfully. I am just now stuck with the genericLoadProfile object from the DCU to read the meter data it collected.
capture object (attribute
capture object (attribute index 3) result:
00 01 00 01 00 50 02 22 C4 01 81 00 01 1E 02 04
12 00 01 09 06 00 00 80 32 06 FF 0F 00 12 00 00
02 04 12 00 08 09 06 00 00 01 00 00 FF 0F 02 12
00 00 02 04 12 00 03 09 06 01 00 01 08 00 FF 0F
02 12 00 00 02 04 12 00 03 09 06 01 00 02 08 00
FF 0F 02 12 00 00 02 04 12 00 03 09 06 01 00 03
08 00 FF 0F 02 12 00 00 02 04 12 00 03 09 06 01
00 04 08 00 FF 0F 02 12 00 00 02 04 12 00 03 09
06 01 00 09 08 00 FF 0F 02 12 00 00 02 04 12 00
03 09 06 01 00 0A 08 00 FF 0F 02 12 00 00 02 04
12 00 03 09 06 01 00 0F 08 00 FF 0F 02 12 00 00
02 04 12 00 03 09 06 01 00 83 08 00 FF 0F 02 12
00 00 02 04 12 00 03 09 06 01 00 84 08 00 FF 0F
02 12 00 00 02 04 12 00 03 09 06 01 00 01 1D 00
FF 0F 02 12 00 00 02 04 12 00 03 09 06 01 00 02
1D 00 FF 0F 02 12 00 00 02 04 12 00 03 09 06 01
00 0F 1D 00 FF 0F 02 12 00 00 02 04 12 00 03 09
06 01 00 03 1D 00 FF 0F 02 12 00 00 02 04 12 00
03 09 06 01 00 04 1D 00 FF 0F 02 12 00 00 02 04
12 00 03 09 06 01 00 83 1D 00 FF 0F 02 12 00 00
02 04 12 00 03 09 06 01 00 09 1D 00 FF 0F 02 12
00 00 02 04 12 00 03 09 06 01 00 0A 1D 00 FF 0F
02 12 00 00 02 04 12 00 03 09 06 01 00 84 1D 00
FF 0F 02 12 00 00 02 04 12 00 03 09 06 01 00 5E
5C 00 FF 0F 02 12 00 00 02 04 12 00 04 09 06 01
00 0F 05 00 FF 0F 02 12 00 00 02 04 12 00 04 09
06 01 00 01 05 00 FF 0F 02 12 00 00 02 04 12 00
04 09 06 01 00 02 05 00 FF 0F 02 12 00 00 02 04
12 00 04 09 06 01 00 83 05 00 FF 0F 02 12 00 00
02 04 12 00 04 09 06 01 00 03 05 00 FF 0F 02 12
00 00 02 04 12 00 04 09 06 01 00 04 05 00 FF 0F
02 12 00 00 02 04 12 00 04 09 06 01 00 09 05 00
FF 0F 02 12 00 00 02 04 12 00 04 09 06 01 00 0A
05 00 FF 0F 02 12 00 00 02 04 12 00 04 09 06 01
00 84 05 00 FF 0F 02 12 00 00
Hi,
Hi,
There is more data to read. There are 192 rows. This is the first block. You need to ask the next block using cl_receiverReady.
BR,
Mikko
I prototyped "readDLMSPacket"
I prototyped "readDLMSPacket" and inside the function it calls:
ret = cl_getData(&connection->settings, &connection->data, reply);
if (ret != 0 && ret != DLMS_ERROR_CODE_FALSE)
{
break;
}
This gives an error and don't request the next block.
"cl_getData" calls "getData2" and inside getdata2 I see a next frame request for HDLC but not for the wrapper, or am I doing it wrong maybe. ?
Hi,
Hi,
There is a GuruxDLMSClientExample. Can you run it? Parameters are something like:
-h METER_IP_ADDRESS -p METER_PORT_NUMBER -c 80 -w -t Verbose a- AUTHENTICATION_LEVEL -P PASSSWORD
It reads all the data from the meter and it'll take some time.
BR,
Mikko
Thanks let me try that first.
Thanks let me try that first.