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. Lightweight DLMS Library

lightweight DLMS Library

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 mightyChamp , 15 December, 2021
Forums
Gurux.DLMS

Hello,

I am using a 128kB flash MCU, and this library occupied space more than 115kB, so doesn't have much space for my code. So, requesting to help for lower footprint of DLMS library.

Thank You

Profile picture for user Kurumi

Kurumi

4 years 5 months ago

Hi,

Hi,

Open gxignore.h file and un-comment all COSEM objects that you don't need.
#define GX_DLMS_MICROCONTROLLER
#define DLMS_IGNORE_ARBITRATOR
etc...

BR,
Mikko

mightyChamp

4 years 4 months ago

I tried your solution and

I tried your solution and able to reduce only 12kB of size.
I need to read only Register and Profile generic and our flash limitation is of 20 kB maximum for DLMS library.
Could I achieve this? or Is there another way to get Register and Profile generic with 20kB of flash for DLMS library?

Profile picture for user Kurumi

Kurumi

4 years 4 months ago

Hi,

Hi,

You need to un-comment all the features that you don't need. I don't know what compiler you are using, so I can't compare the results.

If you have a maximum of 20 Kb flash I can say that it's very unlike that you can read DLMS meters. Before you can read the register or data objects you must establish the connection for the meter.

If you need to use a High level or GMac authentication the size will increase much bigger.

BR,
Mikko

mightyChamp

4 years 4 months ago

I am using arm-gcc-none-eabi

I am using arm-gcc-none-eabi for STM32.
I need Low level authentication only. Is it possible to achieve only 20kB flash for Dlms Library.

Profile picture for user Kurumi

Kurumi

4 years 4 months ago

Hi,

Hi,

I believe it's not possible. HDLC framing will take about 6 Kb.

Data or Register values can be example bit-string, date-time, string, signed number or unsigned number, etc. Handling different data types is not trivial.

Establishing the connection is not an easy task. There are a lot of different errors that might occur and you must handle them all.

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