Below you can find communication log with ADD Grup meter NP71E.1-19-1 + XML version of last packet received from meter. Gurux library returned error code GXDLMS_SOURCE_DIAGNOSTIC_NO_REASON_GIVEN (275). Is it really error state because older version of library interpreted exact this packet as OK (method InitializeConnection returned zero) ?
[40:03:552] - Open port COM11 (E:\Projects\mdex\readout_add\bin\Readout_add.exe)
Version of gurux.dlms.cpp library is from 20.11.2017. Password is 99% correct because other values tahn "00000001" are giving another error codes. I remember when debugging older version of library this error code was not checked by library (there was no any conditional code in packet parser) therefore InitializeConnection returned zero.
I just want to know, if you see last HDLC packet received from meter, should it be considered as error or not ? I dont know DLMS protocol so I dont know. I need to decide if meter returns error code or not. In first case I will ask meter manufacturer. In second case there is bug in gurux dlms library.
Change authentication level to High. Ask what authentication level you should use from the meter manufacturer. If you want to use same challenge everytime you can set it using CtoSChallenge method.
Something like:
cl.CtoSChallenge = example bytes: [41 44 58 00 00 00 00 01];
Meter manufacturer wrote me, that "calling AP title" can be used also with low level security. High level security is complication I try avoid. Even now is complexity too much in comparison with IEC 61107, there is too much parameters to set. I just need to read values of some registers and do simple parameterization.
Is "CtoSChallenge" same as "calling AP title" ? Because I am lost in terminology.
When I send AARQ packet without "calling AP title", gurux library returns error code GXDLMS_SOURCE_DIAGNOSTIC_NO_REASON_GIVEN (275), see beginning of this thread. According to meter manufacturer, I have to sent "calling AP title" also when using low level authentication.
CallingAuthentication is used to send PW in Low level authentication and "calling AP title" is client's system title. You need to send only if you are using ciphering or GMAC authentication.
After debugging communication with ADD Grup meter NP71E.1-19-1 and exchanging a few emails with ADD Grup support I think the methods ParseAAREResponse, ParsePDU and InitializeConnection are badly written. They ignore bad cases when meter returns error code in "AssociationResult" field (this was not my case, but can happen when meters return in this field non zero value) and little warning in ResultSourceDiagnostic (which is harmless according to manufacturer of meter) are treated as errors.
If meter returns an error in AssociationResult it's not correct. DLMS standard defines three values for AssociationResult : accepted, rejected-permanent and rejected-transient. Nothing more.
ResultSourceDiagnostic describes the error. Possible values are described on Green Book page 298.
Your manufacturer has given wrong information to you. This is easy to check from DLMS standard.
error connecting to meter Primary tabs
Hi,
Check the Low level pw: 3030303030303031
In my mind, we have not made any changes that might cause this. What version are you using?
BR,
Mikko
Version of gurux.dlms.cpp
Version of gurux.dlms.cpp library is from 20.11.2017. Password is 99% correct because other values tahn "00000001" are giving another error codes. I remember when debugging older version of library this error code was not checked by library (there was no any conditional code in packet parser) therefore InitializeConnection returned zero.
I just want to know, if you
I just want to know, if you see last HDLC packet received from meter, should it be considered as error or not ? I dont know DLMS protocol so I dont know. I need to decide if meter returns error code or not. In first case I will ask meter manufacturer. In second case there is bug in gurux dlms library.
error connecting to meter Primary tabs
Hi,
It's sure that meter returns an error.
http://www.gurux.fi/GuruxDLMSTranslator?translate=7ea03805004130d6f9e6e…
Request what you sent is correct and the meter should be able to handle that.
BR,
Mikko
Re:
This is response from meter manufacturer. Important words are highlighted with !!! characters:
(beginning of citation)
" Use in AARQ field !!! CallingAPTitle !!!
AARQ:
ApplicationContextName = 2.16.756.5.8.1.1
!!! CallingAPTitle = 41 44 58 00 00 00 00 01 !!! // Sample: A6 0A 04 08 41 44 58 00 00 00 00 01
MechanismName = 2.16.756.5.8.2.1
CallingAuthenticationValue = 30 30 30 30 30 30 30 31 // Reading client
UserInformation = 01 00 00 00 06 5F 1F 04 00 00 01 7E 1F FF
InitiateRequest {
ResponseAllowed = True
ProposedDlmsVersionNumber = 6
ProposedConformance = EventNotification, SelectiveAccess, Set, Get, ParameterizedAccess,
ReservedSeventeen, InformationReport
ClientMaxReceivePduSize = 8191
}
" (end of citation)
How can I enable CallingAPTitle in gurux library ?
error connecting to meter Primary tabs
Hi,
Change authentication level to High. Ask what authentication level you should use from the meter manufacturer. If you want to use same challenge everytime you can set it using CtoSChallenge method.
Something like:
cl.CtoSChallenge = example bytes: [41 44 58 00 00 00 00 01];
BR,
Mikko
Re:
Meter manufacturer wrote me, that "calling AP title" can be used also with low level security. High level security is complication I try avoid. Even now is complexity too much in comparison with IEC 61107, there is too much parameters to set. I just need to read values of some registers and do simple parameterization.
Is "CtoSChallenge" same as "calling AP title" ? Because I am lost in terminology.
error connecting to meter Primary tabs
HI Ján,
If you are using Low level authentication you don't need to send calling AP title. Just set password and set right client address.
BR,
Mikko
Re:
When I send AARQ packet without "calling AP title", gurux library returns error code GXDLMS_SOURCE_DIAGNOSTIC_NO_REASON_GIVEN (275), see beginning of this thread. According to meter manufacturer, I have to sent "calling AP title" also when using low level authentication.
error connecting to meter Primary tabs
HI Ján,
CallingAuthentication is used to send PW in Low level authentication and "calling AP title" is client's system title. You need to send only if you are using ciphering or GMAC authentication.
Ask meter manufacturer to fix this.
BR,
Mikko
Re:
After debugging communication with ADD Grup meter NP71E.1-19-1 and exchanging a few emails with ADD Grup support I think the methods ParseAAREResponse, ParsePDU and InitializeConnection are badly written. They ignore bad cases when meter returns error code in "AssociationResult" field (this was not my case, but can happen when meters return in this field non zero value) and little warning in ResultSourceDiagnostic (which is harmless according to manufacturer of meter) are treated as errors.
AARE
Hello Ján,
If meter returns an error in AssociationResult it's not correct. DLMS standard defines three values for AssociationResult : accepted, rejected-permanent and rejected-transient. Nothing more.
ResultSourceDiagnostic describes the error. Possible values are described on Green Book page 298.
Your manufacturer has given wrong information to you. This is easy to check from DLMS standard.
BR,
Mikko