Skip to main content
Home
for DLMS smart meters
Open source solutions for DLMS smart metering

Main navigation

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

Breadcrumb

  1. Home
  2. Forums
  3. DLMS Library Problem

DLMS library problem

Forum Rules

Before commenting read Forum rules

Don't comment the topic if you have a new question.

You can create a new topic selecting correct category from Gurux Forum and then create a new topic selecting "New Topic" from the top left.

By Mohanraj , 28 December, 2020
Forums
General discussion

Hi Mikko,

We are trying to download profilegeneric data from meter using ANSI C library. At point DLMS stack is getting struck at getCount function . Attached Tx and Rx log also the function call history.
For your information , meter is working with GuruxDLMSExplorer

Tx : 7E A0 07 03 41 93 5A 64 7E
Rx : 7E A0 20 41 03 73 3E 9D 81 80 14 05 02 02 26 06 02 00 9B 07 04 00 00 00 01 08 04 00 00 00 01 B6 DC 7E

Tx : 7E A0 44 03 41 10 B3 E1 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 31 31 31 31 31 31 31 31 BE 10 04 0E 01 00 00 00 06 5F 1F 04 00 00 1E 1D FF FF D4 34 7E
Rx : 7E A0 37 41 03 30 21 79 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 10 14 00 89 00 07 38 2C 7E

Tx : 7E A0 19 03 41 32 3A BD E6 E6 00 C0 01 81 00 07 00 00 5E 5B 0A FF 03 00 5D CB 7E
Rx : 7E A0 B4 41 03 52 96 31 E6 E7 00 C4 01 81 00 01 09 02 04 12 00 01 09 06 00 00 60 01 00 FF 0F 02 12 00 00 02 04 12 00 01 09 06 00 00 60 01 01 FF 0F 02 12 00 00 02 04 12 00 01 09 06 01 00 00 02 00 FF 0F 02 12 00 00 02 04 12 00 01 09 06 00 00 5E 5B 09 FF 0F 02 12 00 00 02 04 12 00 01 09 06 00 00 5E 5B 0B FF 0F 02 12 00 00 02 04 12 00 01 09 06 00 00 5E 5B 0C FF 0F 02 12 00 00 02 04 12 00 01 09 06 01 00 00 04 02 FF 0F 02 12 00 00 02 04 12 00 01 09 06 01 00 00 04 03 FF 0F 02 12 00 00 02 04 12 00 01 09 06 00 00 60 01 04 FF 0F 02 12 00 00 AB 60 7E

Tx : 7E A0 19 03 41 54 0A BB E6 E6 00 C0 01 81 00 07 00 00 5E 5B 0A FF 02 00 85 D2 7E
Rx : 7E A0 4D 41 03 74 EA FB E6 E7 00 C4 02 81 01 00 00 00 01 00 37 01 01 02 09 0A 07 50 44 4C 50 52 30 31 0A 0A 4C 61 6E 64 69 73 2B 47 79 72 0A 03 34 30 30 0A 01 34 0A 02 43 32 0A 08 31 30 2D 36 30 20 41 20 12 00 01 11 01 12 00 00 9C BA 7E

Tx : 7E A0 19 03 41 76 1A B9 E6 E6 00 C0 01 81 00 07 01 00 5E 5B 00 FF 03 00 4C 96 7E
Rx : 7E A2 21 41 03 96 AE 27 E6 E7 00 C4 02 81 00 00 00 00 01 00 82 02 09 01 26 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 1F 07 00 FF 0F 02 12 00 00 02 04 12 00 03 09 06 01 00 33 07 00 FF 0F 02 12 00 00 02 04 12 00 03 09 06 01 00 47 07 00 FF 0F 02 12 00 00 02 04 12 00 03 09 06 01 00 20 07 00 FF 0F 02 12 00 00 02 04 12 00 03 09 06 01 00 34 07 00 FF 0F 02 12 00 00 02 04 12 00 03 09 06 01 00 48 07 00 FF 0F 02 12 00 00 02 04 12 00 03 09 06 01 00 21 07 00 FF 0F 02 12 00 00 02 04 12 00 03 09 06 01 00 35 07 00 FF 0F 02 12 00 00 02 04 12 00 03 09 06 01 00 49 07 00 FF 0F 02 12 00 00 02 04 12 00 03 09 06 01 00 0D 07 00 FF 0F 02 12 00 00 02 04 12 00 03 09 06 01 00 0E 07 00 FF 0F 02 12 00 00 02 04 12 00 03 09 06 01 00 09 07 00 FF 0F 02 12 00 00 02 04 12 00 03 09 06 01 00 01 07 00 FF 0F 02 12 00 00 02 04 12 00 03 09 06 01 00 03 07 00 FF 0F 02 12 00 00 02 04 12 00 01 09 06 00 00 60 07 00 FF 0F 02 12 00 00 02 04 12 00 03 09 06 00 00 5E 5B 08 FF 0F 02 12 00 00 02 04 12 00 01 09 06 00 00 5E 5B 00 FF 0F 02 12 00 00 02 04 12 00 01 09 06 00 00 00 01 00 FF 0F 02 12 00 00 02 04 12 00 01 09 06 00 00 60 02 00 FF 0F 02 12 00 00 02 04 12 00 03 09 06 00 00 00 01 02 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 05 08 00 FF 0F 02 12 00 00 02 04 12 00 03 09 06 01 00 08 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 04 09 06 01 00 01 06 00 FF 0F 02 12 00 00 02 04 12 00 04 09 06 01 00 01 06 00 FF 0F 05 12 00 00 02 04 12 00 04 09 06 01 00 09 06 00 FF 0F 02 12 00 00 02 04 12 00 04 09 06 01 00 09 06 00 FF 0F 05 87 AB 7E

Tx : 7E A0 13 03 41 98 C4 6B E6 E6 00 C0 02 81 00 00 00 01 73 7F 7E
Rx : 7E A0 BC 41 03 B8 1A 9C E6 E7 00 C4 02 81 01 00 00 00 02 00 81 A5 12 00 00 02 04 12 00 03 09 06 01 00 17 07 00 FF 0F 02 12 00 00 02 04 12 00 03 09 06 01 00 2B 07 00 FF 0F 02 12 00 00 02 04 12 00 03 09 06 01 00 3F 07 00 FF 0F 02 12 00 00 02 04 12 00 03 09 06 01 01 18 07 00 FF 0F 02 12 00 00 02 04 12 00 03 09 06 01 01 38 07 00 FF 0F 02 12 00 00 02 04 12 00 03 09 06 01 01 4C 07 00 FF 0F 02 12 00 00 02 04 12 00 03 09 06 00 00 60 01 C9 FF 0F 02 12 00 00 02 04 12 00 04 09 06 01 00 01 04 00 FF 0F 02 12 00 00 02 04 12 00 04 09 06 01 00 01 04 00 FF 0F 05 12 00 00 E5 EB 7E

Thanks
Mohanraj

Image

Mohanraj

5 years 5 months ago

Hi Mikko,

Hi Mikko,

Any update please or any changes required from meter end?

Thanks
Mohan Raj

Profile picture for user Kurumi

Kurumi

5 years 5 months ago

Hi,

Hi,

Meter returns the wrong frame length. Max PDU size is 137 bytes and meter returns more than 500 bytes. You need to fix this.

BR,
Mikko

Mohanraj

5 years 5 months ago

In reply to Hi, by Kurumi

Hi Mikko,

Hi Mikko,

please suggest us where this has to be fixed?

Is it in meter firmware?
I do not think. Because GXDLMSDirector is working properly.

If it is in our application please tell us where and how?

Thanks
Mohanraj

Profile picture for user Kurumi

Kurumi

5 years 5 months ago

Hi Mohanraj,

Hi Mohanraj,

Yes, this is in meter firmware. The reason why GXDLMSDirector works is that it doesn't care how much memory is allocated. ANSI C version allocates only the needed amount of memory.

You can fix this to the client side if you change this line:
//Allocate 50 bytes more because some meters count this wrong and send few bytes too many.
con_initializeBuffers(connection, 50 + connection->settings.maxPduSize);

Change 50 to 500 and you can read your meter.

BR,
Mikko

Mohanraj

5 years 5 months ago

In reply to Hi Mohanraj, by Kurumi

Hi Mikko,

Hi Mikko,

Thank you for the suggestion. working after changing the buffer size at client side.

Thanks
Mohanraj

Profile picture for user Kurumi

Kurumi

5 years 5 months ago

Hi,

Hi,

I have to point out that this is only a fast fix. This should be fixed for the meter or it might cause problems later.

BR,
Mikko

  • Create new account
  • Reset your password

Hire Us!

Latest Releases

  • Tue, 06/09/2026 - 11:16
    gurux.dlms.java 4.0.95
  • Tue, 06/09/2026 - 10:03
    Gurux.DLMS.Python 1.0.199
  • Mon, 06/08/2026 - 13:39
    gurux.dlms.cpp 9.0.2606.0801
  • Mon, 06/01/2026 - 10:15
    gurux.dlms.cpp 9.0.2606.0101
  • Thu, 05/28/2026 - 16:06
    gurux.dlms.java 4.0.94

New forum topics

  • Error reading L&G Meter
  • Pass a TCP Client to GXNet
  • Australian EDMI Mk10D (Essential Energy area)
  • Strange mix of data notificiation vs get response
  • DLMS Connection
More

Who's new

  • Tuanhgg
  • Adel
  • charnon
  • Paddles
  • Miguel Ángel
RSS feed
Privacy FAQ GXDN Issues Contact
Follow Gurux on Twitter Follow Gurux on Linkedin