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. Incorrect Meter Response

Incorrect Meter response

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 utkarsh , 4 December, 2019
Forums
Gurux DLMS for Java

Hi Mikko,

It seems gurux example server is not sending correct response.
Below is the AARQ request sent by HES.

Writing data 00 01 00 30 00 01 00 70 60 6E A1 09 06 07 60 85 74 05 08 01 03 A6 0A 04 08 9F 1B 11 90 40 44 4A 32 8A 02 07 80 8B 07 60 85 74 05 08 02 02 AC 12 80 10 56 69 70 66 52 7A 62 4B 30 5A 78 4C 54 59 30 79 BE 34 04 32 21 30 30 00 00 00 03 ED 9F 34 EE AC DF A4 09 57 A4 13 06 8B 2C F1 51 48 56 4A 3B B3 1A 02 59 74 AD AA 39 BA AA 9E 93 18 36 01 96 D8 DB 7F BB 27 9D FA

Below is response from example server which doesn't look correct.
Data received 7E A0 21 61 03 97 94 23 61 00 A1 09 06 07 60 85 74 05 08 01 03 A2 03 02 01 01 A3 05 A2 03 02 01 25 BE 7E

Please help.

Regards,
Utkarsh

Profile picture for user Kurumi

Kurumi

6 years 6 months ago

Hi Utkarsh,

Hi Utkarsh,

You try to read the wrong TCP/IP port. Your HES wants to use WRAPPER and you read port that is using HDLC framing. Try change port to 4063. Your HES is also using ciphering, so you must make sure that security settings are the same in HES and client.

BR,
Mikko

utkarsh

6 years 6 months ago

Hi Mikko,

Hi Mikko,

I have set same Block Cipher key, Authentication Key and Password in HES as well as in server. But still keys are not matching. How in gurux example server i can check key are matching or not ?
I have set these key in GXCiphering constructor as hard code value in hex.

Regards,
Utkarsh

Profile picture for user Kurumi

Kurumi

6 years 6 months ago

Hi Utkarsh,

Hi Utkarsh,

If keys don't match, your decrypted data is invalid.

You are using High authentication, so remember to change the password.

BR,
Mikko

utkarsh

6 years 6 months ago

Hi Mikko,

Hi Mikko,

I changed the password in the code but still not working.

HES request:
Writing data 00 01 00 30 00 01 00 70 60 6E A1 09 06 07 60 85 74 05 08 01 03 A6 0A 04 08 BD 5E E3 C2 68 CD 57 32 8A 02 07 80 8B 07 60 85 74 05 08 02 02 AC 12 80 10 41 37 33 45 34 48 50 61 53 76 39 49 39 46 70 5A BE 34 04 32 21 30 30 00 00 00 06 CC 9E EE 45 F9 A3 5D D5 5F DD 05 20 08 30 36 B3 A1 74 24 5C B6 28 51 A3 22 5D C8 1F 7B 2C B2 D1 D6 71 38 0C 88 40 C1 93 58 BD F4

Below is response from example server
00 01 00 01 00 30 00 6B 61 69 A1 09 06 07 60 85 74 05 08 01 03 A2 03 02 01 00 A3 05 A1 03 02 01 0E A4 0A 04 08 41 42 43 44 45 46 47 48 88 02 07 80 89 07 60 85 74 05 08 02 02 AA 12 80 10 32 0A 07 4B 06 4D 63 40 57 42 74 51 35 3B 03 0A BE 23 04 21 28 1F 30 00 00 00 00 F0 72 25 65 5B 37 8D 02 B8 69 79 E5 8B FC 1F 2C 0C 40 20 EA D5 0B 00 8F C2 E0

Please help.

Regards,
Utkarsh

Profile picture for user Kurumi

Kurumi

6 years 6 months ago

Hi,

Hi,

Everything looks good. You can make a connection using High authentication and the server asks the next step. You need to generate the challenge and sent it.

BR,
Mikko

utkarsh

6 years 6 months ago

Hi,

Hi,

Existing DLMS example server code should be generating the challenge and sending it. Do I need to write it separately ?
Same DLMS example server code is working fine with GuruxDirector.

Regards,
Utkarsh

Profile picture for user Kurumi

Kurumi

6 years 6 months ago

Hi,

Hi,

DLMS server don't send it. Client asks it and meter reply for it if it matches.
Server takes care from that automatically.

BR,
Mikko

utkarsh

6 years 6 months ago

Hi,

Hi,

I checked it again. below is the HES logs. Can you please help.

[AA Session] Sending AARQ request
HLSSecurity - HES Invocation counter: 2
TcpConnectionHandler - Writing data 00 01 00 30 00 01 00 70 60 6E A1 09 06 07 60 85 74 05 08 01 03 A6 0A 04 08 EA CD B9 9E D5 E6 85 38 8A 02 07 80 8B 07 60 85 74 05 08 02 02 AC 12 80 10 4C 57 72 75 54 34 48 53 76 6D 30 55 4A 70 6C 35 BE 34 04 32 21 30 30 00 00 00 02 49 18 77 F1 41 68 A9 BD 3D 3F 95 27 AD 90 71 65 F1 EB 5D 0E DD 62 E6 A1 15 96 B3 4C 99 F8 98 FC E7 DC 8F 57 08 26 4E A5 6B EA A3
TcpConnectionHandler - Data received 00 01 00 01 00 30 00 6B 61 69 A1 09 06 07 60 85 74 05 08 01 03 A2 03 02 01 00 A3 05 A1 03 02 01 0E A4 0A 04 08 41 42 43 44 45 46 47 48 88 02 07 80 89 07 60 85 74 05 08 02 02 AA 12 80 10 54 49 4B 24 76 65 53 01 2D 0F 68 34 4F 76 22 6E BE 23 04 21 28 1F 30 00 00 00 00 F0 72 25 65 5B 37 8D 02 B8 69 79 E5 8B FC 1F 2C 0C 40 20 EA D5 0B 00 8F C2 E0
HLS5WithGMAC - cipheredApdu: 28 1F 30 00 00 00 00 F0 72 25 65 5B 37 8D 02 B8 69 79 E5 8B FC 1F 2C 0C 40 20 EA D5 0B 00 8F C2 E0
HLS5WithGMAC - systemTitle: 41 42 43 44 45 46 47 48
CommunicationTemplate - Received the following error from the meter [SessionEstablishmentException]: Unable to establish Application Association
CommunicationTemplate - Trying to sync invocation counter from meter
CommunicationTemplate - Sleeping for 1000 second to let meter cool down
CommunicationTemplate - Reading public invocation counter from meter
TcpConnectionManager - The connection is already open on fd0f:f1c3:ba53:c798:3c35:9919:84a8:3ede:4063
ApplicationLayerServicesClientImpl - [AA Session] Sending AARQ request
TcpConnectionHandler - Writing data 00 01 00 10 00 01 00 1F 60 1D A1 09 06 07 60 85 74 05 08 01 01 BE 10 04 0E 01 00 00 00 06 5F 1F 04 00 00 1E 1D 04 00
TcpConnectionHandler - Data received 7E A0 07 61 03 97 5D E7 7E
TcpTransportLayerClientImpl - Wait for response timeout. Retrying communication.
ResponseTimeOutException: Response time out while waiting for response
TcpConnectionHandler - Writing data 00 01 00 10 00 01 00 1F 60 1D A1 09 06 07 60 85 74 05 08 01 01 BE 10 04 0E 01 00 00 00 06 5F 1F 04 00 00 1E 1D 04 00
TcpConnectionHandler - Data received 7E A0 07 61 03 97 5D E7 7E
TcpTransportLayerClientImpl - Wait for response timeout. Retrying communication.
ResponseTimeOutException: Response time out while waiting for response
TcpConnectionHandler - Writing data 00 01 00 10 00 01 00 1F 60 1D A1 09 06 07 60 85 74 05 08 01 01 BE 10 04 0E 01 00 00 00 06 5F 1F 04 00 00 1E 1D 04 00
TcpConnectionHandler - Data received 7E A0 07 61 03 97 5D E7 7E
TcpTransportLayerClientImpl - Wait for response timeout. Retrying communication.
ResponseTimeOutException: Response time out while waiting for response
TcpConnectionHandler - Writing data 00 01 00 10 00 01 00 1F 60 1D A1 09 06 07 60 85 74 05 08 01 01 BE 10 04 0E 01 00 00 00 06 5F 1F 04 00 00 1E 1D 04 00
TcpConnectionHandler - Data received 7E A0 07 61 03 97 5D E7 7E
TcpTransportLayerClientImpl - Wait for response timeout. Retrying communication.
ResponseTimeOutException: Response time out while waiting for response
ApplicationLayerServicesClientImpl - [AA Session] Sending RLRQ Request
TcpConnectionHandler - Writing data 00 01 00 10 00 01 00 17 62 15 80 01 00 BE 10 04 0E 01 00 00 00 06 5F 1F 04 00 00 1E 1D 04 00
TcpConnectionHandler - Data received 7E A0 07 61 03 97 5D E7 7E
TcpTransportLayerClientImpl - Wait for response timeout. Retrying communication.
ResponseTimeOutException: Response time out while waiting for response

Regards,
Utkarsh

Profile picture for user Kurumi

Kurumi

6 years 6 months ago

Hi,

Hi,

In your trace is HLS5WithGMAC, but you try to connect with HLS2.
Change client's authentication level from High2 to HLS5.

BR,
Mikko

utkarsh

6 years 6 months ago

Thanks Mikko, how i can

Thanks Mikko, how i can change server from HLS5WithGMAC to High2 or HLS2.

Regards,
Utkarsh

Profile picture for user Kurumi

Kurumi

6 years 6 months ago

HI Utkarsh,

HI Utkarsh,

Your client app defines what authentication is used. You need to ask this from the client application manufacturer.

BR,
Mikko

utkarsh

6 years 5 months ago

Hi Mikko,

Hi Mikko,

Client Application (HES) will use only HLS_2, so I need to configure example server for HLS_2.
Please let me know how to do that.

Regards,
Utkarsh

Profile picture for user Kurumi

Kurumi

6 years 5 months ago

Hi,

Hi,

So HLS5WithGMAC in the client trace might be misinformation. Client doesn't send CtoS challenge. Ask them to fix it. There is nothing that we can do for this. The client app is not working correctly.

BR,
Mikko

utkarsh

6 years 5 months ago

Hi Mikko,

Hi Mikko,

Again I checked Client request (as below using Gurux DLMS Translator)

<WRAPPER len="120" >
<TargetAddress Value="48" />
<SourceAddress Value="1" />
<PDU>
<AssociationRequest>
<ApplicationContextName Value="LN_WITH_CIPHERING" />
<CallingAPTitle Value="829A184A912C7179" />
<SenderACSERequirements Value="1" />
<MechanismName Value="High" />
<CallingAuthentication Value="744535434456353339616C7667477352" />
<glo_InitiateRequest Value="3000000014C4D40DD25F0CD927F462E3A53FFA18B07F903381FA85DFD69B9D1F7C2BC02301C4EB27965C432665B01DBB" />
</AssociationRequest>
</PDU>
</WRAPPER>

Client is sending CtoS which challenge <CallingAuthentication Value="744535434456353339616C7667477352"/>

Please help.

Regards,
Utkarsh

Profile picture for user Kurumi

Kurumi

6 years 5 months ago

Hi,

Hi,

CtoS should change every time. It's a random seed. Is another app sending always a same seed?

BR,
Mikko

utkarsh

6 years 5 months ago

Hi,

Hi,

No, client is sending random CtoS. I mentioned that as you previously said that client hasn't send CtoS challenge.

Regards,
Utkarsh

  • 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