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.
Hi Ckrath,
What compiler you are using?
BR,
Mikko
________________________________________
Mikko Kurunsaari
Gurux Ltd
http://www.gurux.fi
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.
Chandan
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
________________________________________
Mikko Kurunsaari
Gurux Ltd
http://www.gurux.fi
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.
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
________________________________________
Mikko Kurunsaari
Gurux Ltd
http://www.gurux.fi
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
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
________________________________________
Mikko Kurunsaari
Gurux Ltd
http://www.gurux.fi
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.
Chandan
Hi,
Are you using an optical probe or RS-232? Is the baud rate correct?
BR,
Mikko
________________________________________
Mikko Kurunsaari
Gurux Ltd
http://www.gurux.fi
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.
Chandan
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
________________________________________
Mikko Kurunsaari
Gurux Ltd
http://www.gurux.fi
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.
Chandan