Skip to main content
Home
for DLMS smart meters

Main navigation

  • Home
  • Products
  • About us
  • Open Source
  • Community
  • Forum
  • Downloads
User account menu
  • Log in

Breadcrumb

  1. Home
  2. CL730S22 Association View Reading Returns Invalid Parameter With C Library

CL730S22 association view reading returns invalid parameter with C library

By labasvakaras, 13 June, 2024
Forums
Gurux.DLMS

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

labasvakaras

1 year ago

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.

Profile picture for user Kurumi

Kurumi

1 year ago

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

labasvakaras

1 year ago

What does "You need to add…

What does "You need to add objects to the code." mean?

Profile picture for user Kurumi

Kurumi

1 year ago

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

labasvakaras

1 year ago

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?

Profile picture for user Kurumi

Kurumi

1 year ago

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

labasvakaras

1 year ago

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.

Profile picture for user Kurumi

Kurumi

1 year ago

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

labasvakaras

1 year ago

Sent logs to you.

Sent logs to you.

Profile picture for user Kurumi

Kurumi

1 year ago

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

labasvakaras

1 year ago

thank you, these changes…

thank you, these changes helped!

  • Log in or register to post comments
  • Create new account
  • Reset your password

Hire Us!

Latest Releases

  • Tue, 06/17/2025 - 13:03
    Gurux.DLMS.Python 1.0.182
  • Wed, 06/04/2025 - 13:35
    gurux.dlms.c 9.0.2506.0401
  • Fri, 05/30/2025 - 08:30
    gurux.dlms.c 9.0.2505.3001
  • Tue, 05/27/2025 - 08:10
    Gurux.Serial.Android 2.0.12
  • Mon, 05/26/2025 - 08:39
    gurux.dlms.c 9.0.2505.2601

New forum topics

  • Day profile action item add error (String is not recognized as valid DateTime value)
  • Create gateway protocol in c
  • Error while reading event log object
  • GXDLMS Simulator – AssociationLogicalName Not Listed
  • Failed to read meter through raspberry pi 5 and probe
More
RSS feed
Privacy FAQ GXDN Issues Contact
Follow Gurux on Twitter Follow Gurux on Linkedin