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 CPP Library For Armv7l

DLMS CPP library for armv7l

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 ckrath , 8 April, 2021
Forums
General discussion

Hi,

Is there any DLMS cpp library ported for armv7l?
I tried to compile the gurux cpp dlms library using arm toolchain, but got a lot of errors.

Please let me know a way forward to read DLMS meters using hand held device with armv7l processor.

Thank you.
Ckrath.

Profile picture for user Kurumi

Kurumi

5 years 2 months ago

Hi Ckrath,

Hi Ckrath,

What compiler you are using?

BR,
Mikko

ckrath

5 years 2 months ago

Hi Mikko,

Hi Mikko,

I am using armv7l-analogics-linux-gnueabi-g++ and the version details as below.

root@ubuntu:/home/ckrath# armv7l-analogics-linux-gnueabi-g++ --version
armv7l-analogics-linux-gnueabi-g++ (Timesys 20140729) 4.8.2
Copyright (C) 2013 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

Thanks,
Ckrath.

Profile picture for user Kurumi

Kurumi

5 years 2 months ago

Hi Ckrath,

Hi Ckrath,

Can you add one of the errors. This is now tested with gnueabihf-gcc compiler. There was three warning, but everything was built without problems.

arm-linux-gnueabihf-gcc (Debian 6.3.0-18) 6.3.0 20170516
Copyright (C) 2016 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

BR,
Mikko

ckrath

5 years 2 months ago

Hi Mikko,

Hi Mikko,

Please find below containing the console texts.
Please note that I have used compiler armv7l-analogics-linux-gnueabi-g++.

I can't figure out what's going wrong. Used VS Code IDE and there is no error highlighted on it.

root@ubuntu:/home/ckrath/projects/Gurux.DLMS.cpp-master/GuruxDLMSClientExample# make
Compiled src/communication.cpp successfully!
Compiled src/GuruxDLMSClientExample.cpp successfully!
obj/communication.o: In function `CGXCommunication::WriteValue(GX_TRACE_LEVEL, std::string)':
communication.cpp:(.text+0x80): undefined reference to `GXHelpers::Write(std::string, std::string)'

UPDATE: Now I have managed to successfully compile the cpp library using the toolchain compiler (armv7l-analogics-linux-gnueabi-g++). For now to test, I am using the same example project provided along with the source code (GuruxDLMSClientExample). When tried to read, I got an error as "Read failed. Timeout occurred. SNRMRequest failed 253".

I am trying to read an Indian standard Saral meter. I can successfully read the meter from windows using the same example program.

The command used on linux as below.
./gurux.dlms.client.bin -S /dev/ttyS0:9600:8None1 -c 32 -s 1 -a Low -P ABCD0001

And the command used on Windows as below and read successfully.
GuruxDLMSClientExample.exe -S COM1:9600:8None1 -c 32 -s 1 -a Low -P ABCD0001

Thanks,
Ckrath.

Profile picture for user Kurumi

Kurumi

5 years 2 months ago

Hi Chandan,

Hi Chandan,

I'm glad that you were able to solve the compiler problem.

Is the meter replying anything? You can add -t Verbose to see the send and received bytes.

BR,
Mikko

ckrath

5 years 2 months ago

In reply to Hi Chandan, by Kurumi

Hi Mikko,

Hi Mikko,

Please find below the verbose log. Also please look at the baudrate. Am I supplying it correct for linux? Is it 9600 and not B9600?

# /home/admin/bin/gurux.dlms.client.bin -S /dev/ttyS0:9600:8None1 -c 32 -s 1 -a Low -P ABCD0001 -t Verbose
InitializeConnection
TX: 17:02:50 7E A0 07 03 41 93 5A 64 7E
Read failed. Timeout occurred.
Read failed.
Data send failed. Try to resend 1/3
Read failed. Timeout occurred.
Read failed.
Data send failed. Try to resend 2/3
Read failed. Timeout occurred.
Read failed.
Data send failed. Try to resend 3/3
Read failed. Timeout occurred.
Read failed.

SNRMRequest failed 253.
#

Regards,
Ckrath

Profile picture for user Kurumi

Kurumi

5 years 2 months ago

Hi Chandan,

Hi Chandan,

B9600 is used in Linux. Can you read your meter from Windows with GXDLMSDirector? If you can, are you using the same cable? Data is correct. The reason is for serial port settings. Is your cable connected correctly?

BR,
Mikko

ckrath

5 years 1 month ago

In reply to Hi Chandan, by Kurumi

Hi Mikko,

Hi Mikko,

I am using an Analogics handheld device having ARMV7L processor. I can read the same meter using another software. I developed another program just to test the serial connectivity. After some analysis, I came to know that the read method waits for an infinite time period. I am not able to figure out the cause because another software is able to communicate using the same cable.

Please share if you have any clue regarding this issue.

Regards,
Ckrath.

Profile picture for user Kurumi

Kurumi

5 years 1 month ago

Hi,

Hi,

Are you using an optical probe or RS-232? Is the baud rate correct?

BR,
Mikko

ckrath

5 years 1 month ago

Hi Mikko,

Hi Mikko,

I am using RJ11 optical prob. I have tried all the standard baud rates (300, 600, 1200, 2400, 4800, 9600, 14400, 19200, 38400, 57600 and 115200). The stty command shows details as below.

# stty < /dev/ttyS0
speed 9600 baud; line = 0;
rprnt = <undef>; werase = <undef>; lnext = <undef>; flush = <undef>;
-brkint ixoff -imaxbel

Regards,
Ckrath.

Profile picture for user Kurumi

Kurumi

5 years 1 month ago

Hi Ckrath,

Hi Ckrath,

If you are using an optical port you need to check is start protocol IEC 65056-21.
If it's IEC 65056-21 you can try to run the client app with -i parameter.

BR,
Mikko

ckrath

5 years 1 month ago

Hi Mikko,

Hi Mikko,

Finally, it was read successfully. There was a serial port issue.
The GuruxDLMS library is working perfectly.

Thank you so much for your support.

Regards,
Ckrath.

  • 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