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. Error Connecting To Meter

error connecting to meter

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 jan.kolar , 25 June, 2018
Forums
Gurux.DLMS

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)

[40:03:632] Written data (COM11)
2f 3f 21 0d 0a /?!..
[40:04:747] Read data (COM11)
2f 41 44 58 35 5c 32 31 31 39 31 32 36 35 39 0d /ADX5\211912659.
0a .
[40:04:747] Written data (COM11)
06 32 35 32 0d 0a .252..
[40:05:719] Read data (COM11)
06 32 35 32 0d 0a .252..
[40:08:775] Written data (COM11)
7e a0 08 00 41 05 93 6d a9 7e ~ ..A.“m©~
[40:08:875] Read data (COM11)
7e a0 1f 05 00 41 73 04 d9 81 80 12 05 01 75 06 ~ ...As.ف€...u.
01 75 07 04 00 00 00 01 08 04 00 00 00 01 25 9c .u............%ś
7e ~
[40:08:875] Written data (COM11)
7e a0 45 00 41 05 10 a8 a2 e6 e6 00 60 36 a1 09 ~ E.A..¨˘ćć.`6ˇ.
06 07 60 85 74 05 08 01 01 8a 02 07 80 8b 07 60 ..`…t....Š..€‹.`
85 74 05 08 02 01 ac 0a 80 08 30 30 30 30 30 30 …t....¬.€.000000
30 31 be 10 04 0e 01 00 00 00 06 5f 1f 04 00 00 01ľ........_....
7e 1f ff ff 49 42 7e ~.˙˙IB~
[40:09:075] Read data (COM11)
7e a0 38 05 00 41 30 d6 f9 e6 e7 00 61 29 a1 09 ~ 8..A0Öůćç.a)ˇ.
06 07 60 85 74 05 08 01 01 a2 03 02 01 00 a3 05 ..`…t....˘....Ł.
a1 03 02 01 01 be 10 04 0e 08 00 06 5f 1f 04 00 ˇ....ľ......_...
00 32 14 00 72 00 07 d5 97 7e .2..r..Ő—~

<HDLC len="55" >
<TargetAddress Value="2" />
<SourceAddress Value="32" />
<!--AARE frame.-->
<FrameType Value="30" />
<PDU>
<AssociationResponse>
<ApplicationContextName Value="LN" />
<AssociationResult Value="0" />
<ResultSourceDiagnostic>
<!--NO_REASON_GIVEN-->
<ACSEServiceUser Value="1" />
</ResultSourceDiagnostic>
<InitiateResponse>
<NegotiatedDlmsVersionNumber Value="6" />
<NegotiatedConformance>
<ConformanceBit Name="SelectiveAccess" />
<ConformanceBit Name="Get" />
<ConformanceBit Name="MultipleReferences" />
<ConformanceBit Name="BlockTransferWithGetOrRead" />
<ConformanceBit Name="Attribute0SupportedWithGet" />
</NegotiatedConformance>
<NegotiatedMaxPduSize Value="114" />
<VaaName Value="7" />
</InitiateResponse>
</AssociationResponse>
</PDU>
</HDLC>

Profile picture for user Kurumi

Kurumi

7 years 11 months ago

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

jan.kolar

7 years 11 months ago

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.

jan.kolar

7 years 11 months ago

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.

Profile picture for user Kurumi

Kurumi

7 years 11 months ago

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

jan.kolar

7 years 10 months ago

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 ?

Profile picture for user Kurumi

Kurumi

7 years 10 months ago

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

jan.kolar

7 years 10 months ago

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.

Profile picture for user Kurumi

Kurumi

7 years 10 months ago

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

jan.kolar

7 years 10 months ago

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.

Profile picture for user Kurumi

Kurumi

7 years 10 months ago

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

jan.kolar

7 years 8 months ago

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.

Profile picture for user Kurumi

Kurumi

7 years 8 months ago

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

  • 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