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. Use Gurux.DLMS.cpp or GuruxDLMS.c For Embedded Client

Use Gurux.DLMS.cpp or GuruxDLMS.c for embedded client

By switch2_app, 20 June, 2024
Forums
General discussion

Hi,
I have used your GuruxDLMS.cpp driver code to communicate with a manufacturer supplied meter and I can read values from the meter from the pc using the Read() functions.

I also had a look at GuruxDLMS.c repo and the client application, and if the function names are any indication, the client application is for communicating with a meter via the optical head. And also supports DLMS mode E.

I noticed that the libraries seem [visually] to be quiet a bit different size-wise. And yes I can see that the cpp driver supports many interfaces/modes so that may be the reason for the size difference. The c driver only needs a smaller subset.

Now we have a STM32 based target board that needs to talk to a DLMS meter and we only need to read the current values and, from your comments in another question, this makes things easier from a malloc point of view.
So, I was thinking, would it be better to port the C driver client library, its smaller and supports only what we need [serial comms], rather than trying to port the cpp more comprehensive driver?

I understand the C driver doesn't support the 'w'/'f' [window/frame] command line options but is there anything else that would effect the C porting from working?

Thanks,
switch2_app

Profile picture for user Kurumi

Kurumi

11 months ago

Hi, ANSI C implements the…

Hi,

ANSI C implements the same functionality as ANSI C++. The main difference is in memory size and usability. ANSI C needs less memory, but it's harder to use.

I don't know what MCU you plan to use and how much memory you have. Everything depends on how much memory you have. It might be that ANSI C is the only option because of a lack of memory.

BR,
Mikko

switch2_app

11 months ago

Hi, Thanks for that reply,…

Hi,
Thanks for that reply, it looks like the DLMS.c library port is the way to go.

I did look at the Keil server example in the GuruxDLMS.c repo based on the STM32L433 which has 64KB or ram which was reassuring for us.

We use a STM32L4 variant with 128KB of ram though in our case we are starting to argue over RAM availability so there is not that much spare at the moment.

Given the Keil project and the DLMS server implementation in it, do you have any ball park estimates of how much RAM we would need given that we will only be getting the same values over and over again?

Thanks,
switch2_app

Profile picture for user Kurumi

Kurumi

11 months ago

Hi, It depends on what…

Hi,

It depends on what objects you want to read and if the secured connection is used.
You can reduce the size by uncommenting all unnecessary features from gxignore.h.

BR,
Mikko

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

Hire Us!

Latest Releases

  • Thu, 05/15/2025 - 16:26
    gurux.dlms.c 9.0.2505.1501
  • Wed, 05/14/2025 - 08:30
    gurux.dlms.c 9.0.2505.1401
  • Tue, 05/13/2025 - 10:00
    Gurux.DLMS.Android 2.0.15
  • Fri, 05/09/2025 - 13:03
    Gurux.DLMS.Python 1.0.181
  • Wed, 05/07/2025 - 16:09
    Gurux.DLMS.Android 2.0.14

New forum topics

  • Long reading ends with "Invalid frame ..." error.
  • Push listener example how it works + tcp stream issue
  • Problem with reading energymeter Star DTS27 via GXDLMSDirector
  • Receiver Ready Test Failed
  • Combining several meters' profile generic data into one
More
RSS feed
Privacy FAQ GXDN Issues Contact
Follow Gurux on Twitter Follow Gurux on Linkedin