Platform - Linux 64b Fedora 21
I try co compile GuruxDLMSClientExample (version from github 16.01.2017)
It works nearly ok with my Landis&Gyr counter, (ReadRowsByRange get nothing)
but when I create loop to read another one set of register with new connection
(after about 2 minutes) I receive information :
AARQRequest failed 273.
InitializeConnection failed Rejected permament..
Today I try latest version of library - this error
was now at start. Something was changed in AARQ
and library not working at all.
Edit:
Test on DLMSDirector show the same problem.
First connection works ok , but when I disconnect
and then connect again - connection fail.
I can connect again only when I close program,
and start it again after a few minutes after fail.
If I close program without second try, connection
works immediate.
Are you using TCP/IP or serial port connection? I just tested with GXDLMSDirector using TCP/IP connection about 10 times using L+G 650 and there was no problems. Can you connect and reconnect with GXDLMSDirector and send trace to me by email? You can get trace under Tools menu.
When I drop and recreate object CGXDLMSClient connection works immediate - less then 1 second after close.
When I use old object - System give me connection error after 15 minutes!.
New library not connect at all.
I try to connect to ZMD310 and old library works (with exception explained before).
And GXDLMSDirector not connect to the same counter even next day.
When I close and reopen application - everything works nearly ok (sometimes I must
close application and wait no more then 5 minutes before next try).
I create connection by TCP to box connected to serial port (RS232) on CU-B4+ connected to ZMD.
This is interesting. When connection is made first time maximum PDU size is used (0xFFFF) and it works.
When connection is made second time, previous connection PDU size is used (2400, 0x0960).
For some reason your meter is not accept it. It says that PDU size is too small. And your meter returns this value. Anyway, MaxPduSize is set to 0xFFFF when DisconnectRequest is generated.
We have made change for ANSI C, ANSI C++, Java and C# versions.
New version is available on Github. New version from GXDLMSDirector is released today.
For me library is now broken.
When I try to connect it gave me:
InitializeConnection
<- 13:12:18 7E A0 07 03 21 93 0F 01 7E
-> 13:12:18 7E A0 1E 21 03 73 C3 7A 81 80 12 05 01 80 06 01 3E 07 04 00 00 00 01 08 04 00 00 00 01 07 22 7E
<- 13:12:18 7E A0 2B 03 21 10 FB AF E6 E6 00 60 1D A1 09 06 07 60 85 74 05 08 01 02 BE 10 04 0E 01 00 00 00 06 5F 1F 04 00 00 00 00 FF FF 06 4E 7E
-> 13:12:19 7E A0 37 21 03 30 6C 7C E6 E7 00 61 28 A1 09 06 07 60 85 74 05 08 01 02 A2 03 02 01 01 A3 05 A1 03 02 01 01 BE 0F 04 0D 08 00 06 5F 1F 04 00 18 02 20 09 60 FA 00 13 F6 7E
AARQRequest failed 273.
InitializeConnection failed Rejected permament..
Old version works after about 5 minutes after this crash.
Can you gave me access to ANSI C version ?
I originaly write AMR programs in C on small ARM
computers under linux, and all read in IEC, but now
I have counter ZMQ to read , and I can't read profile thru IEC
(ZMD I can). I test your library, and it can read with exception
"readrowsbyrange" (by entry works). Many years I read and write C programs, but
not C++. Until now I can't access to COSEM objects of profile directly.
On C I think I can not only use, but test and debug library.
I only change connection parameters of example.
But during route to home I remaind that github is not only
storage, but also version control system.
At monday I try to test what in (I think) DLMSClient
broke connection possibility to ZMD (and ZMQ).
At home I look at patch/diff and now I know what was changed
at Feb 3rd. This commit broke connection in my work.
It would be earlier, but when I go out from work , I shutdown
serwers for weekend. After weekend I wrote, what I found.
Edit:
Small sugestion - to get profile of last day get date/time
from counter.It is possible that clock in counter is not
correctly set, and last day is not today. (In ZMQ I had
year 2000)
I change example so last date is read. Some meters return error If there is no data between start and end time . I also uncomment Reading multiple scalers with one query. This is causing issues with some meters.
ANSI C version is not open source at the moment.
BR,
After small testing I found, that AARQ block was changed in conformance field
(in new library sets to 0 (zero) ). When I set it to earlier version( 0x1c0320) program connect
to counter and work . Range reading this time works properly.
Small sugestion:
Between profilebyentry and profilebyrange reading put line:
((CGXDLMSProfileGeneric*) *it)->Reset();
Without in range reading have entry profile as a first line.
Small sugestion:
Between profilebyentry and profilebyrange reading put line:
((CGXDLMSProfileGeneric*) *it)->Reset();
Without in range reading have entry profile as a first line(s).
Edit:
Now it is not working.
I'm testing why.
Edit 2:
It was my testing in old library:
In GXDLMSProfileGeneric.cpp:
void CGXDLMSProfileGeneric::Reset()
{
//TODO:
m_Buffer.erase(m_Buffer.begin(),m_Buffer.end());
}
And reset works (in my testing/opinion) ok.
With 1 counter connected everything works ok , but when I connect second counter
SNRM request get mixed response from 2 counters at the same time.
How I can address 1 counter in SNRM request ? DLMSDirector could,
but for now I'm not found exact metod in C++.
In addition I test DLMSDirector in new wersion.
Connect/disconnect works ok , but not all profiles.
Profile 0.0.98.1.0.255 works ok,
but profiles 1.0.99.98.0.255 and 1.0.99.1.0.255 not working.
When I select it, program communicate something like "Index out of range"
(I see it in polish and it says "Indeks wykraczaĆ poza granice tablicy").
Maybe I must reload something, but I dont know what.
Connections was made new, and data was taken directly from
connected counters.
You need to use meter's serial number as server address. There is example in GuruxDLMSClientExample. Something like this:
CGXDLMSClient cl(true, 0x10, CGXDLMSClient::GetServerAddress([Serial number]), DLMS_AUTHENTICATION_NONE, NULL);
Are there columns on 1.0.99.98.0.255 and 1.0.99.1.0.255?
BR,
Mikko
Yes, profile have columns.
C++ and older versions of Director shows everything ok.
In your example was 1 mistake
0x10 or 16 , not 0x16.
If found it and now everithing working again.
Thanks for helping.
If you have any questions about Director with my counters
write in this thread , or email me direct.
Thanks again
Gurux.DLMS.cpp - problem with reconnect
Hi,
Are you using TCP/IP or serial port connection? I just tested with GXDLMSDirector using TCP/IP connection about 10 times using L+G 650 and there was no problems. Can you connect and reconnect with GXDLMSDirector and send trace to me by email? You can get trace under Tools menu.
BR,
Mikko
Gurux.DLMS.cpp - problem with reconnect
Hi,
There must be delay between connections. If you try to connect right away you get error. Wat 30 seconds between connections.
BR,
Mikko
I found workaround
When I drop and recreate object CGXDLMSClient connection works immediate - less then 1 second after close.
When I use old object - System give me connection error after 15 minutes!.
New library not connect at all.
I try to connect to ZMD310 and old library works (with exception explained before).
And GXDLMSDirector not connect to the same counter even next day.
When I close and reopen application - everything works nearly ok (sometimes I must
close application and wait no more then 5 minutes before next try).
I create connection by TCP to box connected to serial port (RS232) on CU-B4+ connected to ZMD.
log
Log was sended to e-mail as explained on page and to Gurux2017@gurux.fi
Gurux.DLMS.cpp
Hi,
This is interesting. When connection is made first time maximum PDU size is used (0xFFFF) and it works.
When connection is made second time, previous connection PDU size is used (2400, 0x0960).
For some reason your meter is not accept it. It says that PDU size is too small. And your meter returns this value. Anyway, MaxPduSize is set to 0xFFFF when DisconnectRequest is generated.
We have made change for ANSI C, ANSI C++, Java and C# versions.
New version is available on Github. New version from GXDLMSDirector is released today.
BR,
Mikko
Gurux.DLMS.cpp
For me library is now broken.
When I try to connect it gave me:
InitializeConnection
<- 13:12:18 7E A0 07 03 21 93 0F 01 7E
-> 13:12:18 7E A0 1E 21 03 73 C3 7A 81 80 12 05 01 80 06 01 3E 07 04 00 00 00 01 08 04 00 00 00 01 07 22 7E
<- 13:12:18 7E A0 2B 03 21 10 FB AF E6 E6 00 60 1D A1 09 06 07 60 85 74 05 08 01 02 BE 10 04 0E 01 00 00 00 06 5F 1F 04 00 00 00 00 FF FF 06 4E 7E
-> 13:12:19 7E A0 37 21 03 30 6C 7C E6 E7 00 61 28 A1 09 06 07 60 85 74 05 08 01 02 A2 03 02 01 01 A3 05 A1 03 02 01 01 BE 0F 04 0D 08 00 06 5F 1F 04 00 18 02 20 09 60 FA 00 13 F6 7E
AARQRequest failed 273.
InitializeConnection failed Rejected permament..
Old version works after about 5 minutes after this crash.
Can you gave me access to ANSI C version ?
I originaly write AMR programs in C on small ARM
computers under linux, and all read in IEC, but now
I have counter ZMQ to read , and I can't read profile thru IEC
(ZMD I can). I test your library, and it can read with exception
"readrowsbyrange" (by entry works). Many years I read and write C programs, but
not C++. Until now I can't access to COSEM objects of profile directly.
On C I think I can not only use, but test and debug library.
Gurux.DLMS.cpp
Hi,
We have tested with C++ version and it works without problems. Are you sure that you have not changed anything?
BR,
Mikko
tests
I only change connection parameters of example.
But during route to home I remaind that github is not only
storage, but also version control system.
At monday I try to test what in (I think) DLMSClient
broke connection possibility to ZMD (and ZMQ).
At home I look at patch/diff and now I know what was changed
at Feb 3rd. This commit broke connection in my work.
It would be earlier, but when I go out from work , I shutdown
serwers for weekend. After weekend I wrote, what I found.
Edit:
Small sugestion - to get profile of last day get date/time
from counter.It is possible that clock in counter is not
correctly set, and last day is not today. (In ZMQ I had
year 2000)
Hi,
Hi,
I change example so last date is read. Some meters return error If there is no data between start and end time . I also uncomment Reading multiple scalers with one query. This is causing issues with some meters.
ANSI C version is not open source at the moment.
BR,
Mikko
partially solved
After small testing I found, that AARQ block was changed in conformance field
(in new library sets to 0 (zero) ). When I set it to earlier version( 0x1c0320) program connect
to counter and work . Range reading this time works properly.
Small sugestion:
Between profilebyentry and profilebyrange reading put line:
((CGXDLMSProfileGeneric*) *it)->Reset();
Without in range reading have entry profile as a first line.
Gurux.DLMS.cpp
Hi,
Thanks from this info. We'll check this ASAP.
BR,
Mikko
sugestion
Small sugestion:
Between profilebyentry and profilebyrange reading put line:
((CGXDLMSProfileGeneric*) *it)->Reset();
Without in range reading have entry profile as a first line(s).
Edit:
Now it is not working.
I'm testing why.
Edit 2:
It was my testing in old library:
In GXDLMSProfileGeneric.cpp:
void CGXDLMSProfileGeneric::Reset()
{
//TODO:
m_Buffer.erase(m_Buffer.begin(),m_Buffer.end());
}
And reset works (in my testing/opinion) ok.
Gurux.DLMS.cpp
Hi,
We fixed Conformance. We also added reset. New version is available on GitHub.
BR,
Mikko
;)
Now everything work for me.
Gurux.DLMS.cpp
Hi,
Nice to hear. :-)
BR,
Mikko
Small problem
With 1 counter connected everything works ok , but when I connect second counter
SNRM request get mixed response from 2 counters at the same time.
How I can address 1 counter in SNRM request ? DLMSDirector could,
but for now I'm not found exact metod in C++.
In addition I test DLMSDirector in new wersion.
Connect/disconnect works ok , but not all profiles.
Profile 0.0.98.1.0.255 works ok,
but profiles 1.0.99.98.0.255 and 1.0.99.1.0.255 not working.
When I select it, program communicate something like "Index out of range"
(I see it in polish and it says "Indeks wykraczaĆ poza granice tablicy").
Maybe I must reload something, but I dont know what.
Connections was made new, and data was taken directly from
connected counters.
Small problem
Hi,
You need to use meter's serial number as server address. There is example in GuruxDLMSClientExample. Something like this:
CGXDLMSClient cl(true, 0x10, CGXDLMSClient::GetServerAddress([Serial number]), DLMS_AUTHENTICATION_NONE, NULL);
Are there columns on 1.0.99.98.0.255 and 1.0.99.1.0.255?
BR,
Mikko
Hi
Yes, profile have columns.
C++ and older versions of Director shows everything ok.
In your example was 1 mistake
0x10 or 16 , not 0x16.
If found it and now everithing working again.
Thanks for helping.
If you have any questions about Director with my counters
write in this thread , or email me direct.
Thanks again
Small problem
Hi,
I have updated example.
BR,
Mikko