Gurux.DLMS.cpp client example issue

10 posts / 0 new
Last post
rajfanofsachin
Gurux.DLMS.cpp client example issue

Hi anyone tried CPP client(https://github.com/Gurux/Gurux.DLMS.cpp) example? I need little more info on how to run makefiles in LINUX.
I tried compiling the code in VisualStudio2015,, i successfully compiled and i am starting to read from Landis, i am getting "GetObjects failed" error. I suppose i have given all manufacturer specific parameters for "CGXDLMSClient cl()". Help me out?

kurumi
kurumi's picture
Gurux.DLMS.cpp client example issue

Hi,

First you should go development folder and run make. Just simply type make to cmd line.

What kind of error you are receiving? Can you send trace to me by email? Do not send it to the forum, because it might be huge.

BR,

Mikko

________________________________________
Mikko Kurunsaari
Gurux Ltd
Hermiankatu 6-8 H 33720 TAMPERE, FINLAND
Phone: +358 3 265 1244
Home page: http://www.gurux.org

rajfanofsachin
SNRM failed

Hi, sorry for the delay. I fact i have given a mail, no response, thats why i am here.
If i want to send SNRM frame as
(7e a0 23 00 02 04 01 41 93 98 f2 81 80 14 05 02 08 00 06 02 08 00 07 04 00 00 00 07 08 04 00 00 00 07 b3 c6 7e ), how can i proceed?
Could you please explain how code is framing the SNRM
I am using LNG E250 Indian meter.
Here is the trace:
<- 12:48:03 7E A0 0F 03 41 93 82 81 81 80 FD 06 01 3E F7 E3 7E
SNRMRequest failed 252
InitializeConnection failed Data send failed..

kurumi
kurumi's picture
SNRM

Hi,

We are not supporting Window size setting at the moment in SNRM message.
Usually this is an option and you do not need to send them.
Do you have special need for this?

BR,

Mikko

________________________________________
Mikko Kurunsaari
Gurux Ltd
Hermiankatu 6-8 H 33720 TAMPERE, FINLAND
Phone: +358 3 265 1244
Home page: http://www.gurux.org

rajfanofsachin
SNRM failed

Same thing with another indian meter also

InitializeConnection
<- 17:18:09 7E A0 07 03 21 93 0F 01 7E
SNRMRequest failed 252.
InitializeConnection failed Data send failed..

But this time it is working with GURUXDirector
Any suggestions?

kurumi
kurumi's picture
SNRM failed

Hi,

Please, create new topic if you have new question. It's easier to answer.

Are you using Linux or Windows? Check your serial port settings.

BR,

Mikko

________________________________________
Mikko Kurunsaari
Gurux Ltd
Hermiankatu 6-8 H 33720 TAMPERE, FINLAND
Phone: +358 3 265 1244
Home page: http://www.gurux.org

rajfanofsachin
I am using Ubuntu

I am using Ubuntu
I have given this:
if ((ret = comm.Open("/dev/ttyUSB0", false)) != 0)
Verified with putty also.
These settings were used in GuruxDirector: (Winodws 10)
Manufacturer : Indian standard
Logical Name Referencing : checked
Start protocol: DLMS
Media : Serial
Password : XXXXXXXXX
ASCII : Checked
Wait time : 7
Client Address : 20
Address Type : Default
Physical Server : 1
Logical Server : 0
Settings:
Serial port : COM1
Use Maximum Baud Rate : 9600

With these i could read all available objects

Anything i am missing in client program (CPP)?

kurumi
kurumi's picture
SNRM failed

Hi,

Usually this is because you don't have access right to the serial port.
Have you try this using root or sudo?

BR,

Mikko

________________________________________
Mikko Kurunsaari
Gurux Ltd
Hermiankatu 6-8 H 33720 TAMPERE, FINLAND
Phone: +358 3 265 1244
Home page: http://www.gurux.org

morphheus
Before start

Hi Mikko,

I have done these two steps for Linux:

We have made makefile for linux environment. You should go development folder and create lib and obj directories. Then run make. gurux_dlms_cpp static library is made.

For Client example you should also create bin and obj -directories. Change Host name, port and DLMS settings for example. Run make and you are ready to test.

I'm trying to run ClientExample with arguments (like Java), could you give me more information about it?

BR,

Morphheus

kurumi
kurumi's picture
cpp client

Hi Morphheus,

Command line parameters are same for java and C++.
BR,

Mikko

________________________________________
Mikko Kurunsaari
Gurux Ltd
Hermiankatu 6-8 H 33720 TAMPERE, FINLAND
Phone: +358 3 265 1244
Home page: http://www.gurux.org