Hello, i tried to use DLMS C library and reading association view gets me Invalid parameter:
[Debug ] TX: 7E A0 13 03 05 B6 BE 82 E6 E6 00 C0 02 C1 00 00 01 6A 5C 7A 7E
[Debug ] RX: 7E A0 DB 05 03 9A D8 35 E6 E7 00 C4 02 C1 01 00 00 01 6B 00 81 C4 02 02 01 0D 02 03 0F 01 16 01 00 02 03 0F 02 16 01 00 02 03 0F 03 16 01 00 02 03 0F 04 16 01 00 02 03 0F 05 16 01 00 02 03 0F 06 16 01 00 02 03 0F 07 16 01 00 02 03 0F 08 16 01 00 02 03 0F 09 16 01 00 02 03 0F 0A 16 01 00 02 03 0F 0B 16 01 00 02 03 0F 0C 16 01 00 02 03 0F 0D 16 01 00 01 05 02 02 0F 01 16 00 02 02 0F 02 16 00 02 02 0F 03 16 00 02 02 0F 04 16 00 02 02 0F 05 16 00 02 04 12 00 73 11 00 09 06 00 00 13 28 00 FF 02 02 01 06 02 03 0F 01 16 01 00 02 03 0F 02 16 01 00 02 03 0F 03 16 01 00 02 03 0F 04 16 01 00 02 03 0F 05 16 01 00 02 03 0F 06 16 01 00 01 01 02 02 0F 01 16 00 B3 D8 7E
Failed to read_dlms_packeta: Invalid parameter.
I tried to read this meter with GXDLMSDirector and it does not produce the same error:
7E A0 13 03 05 B6 BE 82 E6 E6 00 C0 02 C1 00 00 01 6A 5C 7A 7E
11:26:42 AM
7E A0 DB 05 03 9A D8 35 E6 E7 00 C4 02 C1 01 00 00 01 6B 00 81 C4 02 02 01 0D 02 03 0F 01 16 01 00 02 03 0F 02 16 01 00 02 03 0F 03 16 01 00 02 03 0F 04 16 01 00 02 03 0F 05 16 01 00 02 03 0F 06 16 01 00 02 03 0F 07 16 01 00 02 03 0F 08 16 01 00 02 03 0F 09 16 01 00 02 03 0F 0A 16 01 00 02 03 0F 0B 16 01 00 02 03 0F 0C 16 01 00 02 03 0F 0D 16 01 00 01 05 02 02 0F 01 16 00 02 02 0F 02 16 00 02 02 0F 03 16 00 02 02 0F 04 16 00 02 02 0F 05 16 00 02 04 12 00 73 11 00 09 06 00 00 13 28 00 FF 02 02 01 06 02 03 0F 01 16 01 00 02 03 0F 02 16 01 00 02 03 0F 03 16 01 00 02 03 0F 04 16 01 00 02 03 0F 05 16 01 00 02 03 0F 06 16 01 00 01 01 02 02 0F 01 16 00 B3 D8 7E
Authentication in C: [Debug …
Authentication in C:
[Debug ] TX: 7E A0 07 03 05 93 5C 45 7E
[Debug ] RX: 7E A0 20 05 03 73 29 F8 81 80 14 05 02 01 00 06 02 01 00 07 04 00 00 00 01 08 04 00 00 00 01 69 6D 7E
[Debug ] TX: 7E A0 44 03 05 10 B5 C0 E6 E6 00 60 36 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 0A 80 08 30 30 30 30 30 30 30 31 BE 10 04 0E 01 00 00 00 06 5F 1F 04 00 40 1E 1D FF FF 37 AF 7E
[Debug ] RX: 7E A0 37 05 03 30 36 1C E6 E7 00 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 12 15 01 40 00 07 15 A5 7E
GXDLMSDirector:
11:23:48 AM Send SNRM request.
7E A0 07 03 05 93 5C 45 7E
11:23:48 AM
7E A0 20 05 03 73 29 F8 81 80 14 05 02 01 00 06 02 01 00 07 04 00 00 00 01 08 04 00 00 00 01 69 6D 7E
11:23:48 Parsing UA reply succeeded.
11:23:48 AM Send AARQ request.
7E A0 44 03 05 10 B5 C0 E6 E6 00 60 36 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 0A 80 08 30 30 30 30 30 30 30 31 BE 10 04 0E 01 00 00 00 06 5F 1F 04 00 62 1E 5D FF FF 58 DF 7E
11:23:48 AM
7E A0 37 05 03 30 36 1C E6 E7 00 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 12 15 01 40 00 07 15 A5 7E
11:23:48 Parsing AARE reply succeeded.
Hi, The reason for this is…
Hi,
The reason for this is usually the lack of memory. Don't try to read the association view if you are using a microcontroller. You need to add objects to the code.
Authentication succeeded both ANSI C and GXDLMSDirector.
BR,
Mikko
What does "You need to add…
What does "You need to add objects to the code." mean?
Hi, You need to know the…
Hi,
You need to know the object type and logical name that you want to read. Add objects like this:
gxData ldn;
cosem_init(BASE(ldn), DLMS_OBJECT_TYPE_DATA, "0.0.42.0.0.255");
com_read(BASE(ldn), 2);
https://github.com/Gurux/GuruxDLMS.c/blob/5f878cbaae3fb6ccf50e374c83cf5…
BR,
Mikko
My purpose is to read…
My purpose is to read association view. Maybe there is a way to read objects one by one, not to read everything at first?
Hi, In theory, it's possible…
Hi,
In theory, it's possible to parse part of the association view objects after you have received the PDU, but making it work with different meters is not an easy task.
There are too many different things that are changing.
BR,
Mikko
Did some more debugging and…
Did some more debugging and i can see that is it not locking memory. Router where i am programming has enough memory and i am using 32 bits variables.
Where DLMS is failing:
dlms_getData method: value of `info->type & ~DLMS_DATA_TYPE_BYREF` is 103 which is non-existing DLMS_DATA_TYPE. Maybe parsing is done incorrectly in C library? Because with GuruxDLMSDirector is perfectly fine.
Hi, I can check it if you…
Hi,
I can check it if you can send the GXDLMSDirector log to me by email.
You can find the email address from here:
https://www.gurux.fi/AboutUs
BR,
Mikko
Sent logs to you.
Sent logs to you.
Hi, This is fixed for the…
Hi,
This is fixed for the latest version.
The association view size is 101 KB. I can say that this is the biggest association view that I have seen. There was one uint16_t that is now changed to uint32_t and it fixes the issue.
BR,
Mikko
thank you, these changes…
thank you, these changes helped!