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. DLMS_ERROR_CODE_INVALID_DECIPHERING_ERROR

DLMS_ERROR_CODE_INVALID_DECIPHERING_ERROR

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 MetersGuru , 26 January, 2023
Forums
Gurux.DLMS

Hello,

We are trying to establish a secured connection with security suite 1 and we filled the "Secured Connections" window with the following parameters:
Security : authenticationEncryption
System Title: 41 42 43 44 45 46 47 48
Block cipher key: 00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F
Authentication key: D0 D1 D2 D3 D4 D5 D6 D7 D8 D9 DA DB DC DD DE DF

The connection is not working for us, I have a DLMS_ERROR_CODE_INVALID_DECIPHERING_ERROR for the "cip_decrypt" function inside the "apdu_parseUserInformation" function.

following the GXDLMSDirector log:

GXDLMSDirector 9.0.2210.0401
Log created 16:30:45
16:30:47 Initializing serial connection.
16:30:48 Send SNRM request.
7E A0 21 44 D1 03 93 6A 21 81 80 14 05 02 04 00 06 02 04 00 07 04 00 00 00 01 08 04 00 00 00 01 72 E3 7E

16:30:48
7E A0 1F 03 44 D1 73 D4 EE 81 80 12 05 01 80 06 01 80 07 04 00 00 00 01 08 04 00 00 00 01 53 3B 7E

16:30:48 Parsing UA reply succeeded.
16:30:48 Send AARQ request.
7E A0 6C 44 D1 03 10 AF 2A E6 E6 00 60 5D A1 09 06 07 60 85 74 05 08 01 03 A6 0A 04 08 41 42 43 44 45 46 47 48 8A 02 07 80 8B 07 60 85 74 05 08 02 05 AC 12 80 10 74 5A 42 17 61 07 60 1E 52 27 02 01 18 22 78 12 BE 23 04 21 21 1F 31 00 00 00 00 1F 58 4B 30 32 AF 28 57 07 12 C6 0D 7E 8F 63 B7 D6 63 02 F7 BE 75 89 C1 44 6B D2 18 7E

16:30:48
7E A0 10 03 44 D1 30 B7 F4 E6 E7 00 D8 02 05 70 2F 7E

16:30:48 Disconnect request
16:30:48
7E A0 1F 03 44 D1 73 D4 EE 81 80 12 05 01 80 06 01 80 07 04 00 00 00 01 08 04 00 00 00 01 53 3B 7E

Gurux.DLMS.GXDLMSExceptionResponse: Exception response. "Service unknown"-exception. Deciphering failed
in Gurux.DLMS.GXDLMS.HandleExceptionResponse(GXReplyData data)
in Gurux.DLMS.GXDLMS.GetPdu(GXDLMSSettings settings, GXReplyData data)
in Gurux.DLMS.GXDLMS.GetData(GXDLMSSettings settings, GXByteBuffer reply, GXReplyData data, GXReplyData notify)
in Gurux.DLMS.GXDLMSClient.GetData(GXByteBuffer reply, GXReplyData data, GXReplyData notify)
in GXDLMSDirector.GXDLMSCommunicator.ReadDLMSPacket(Byte[] data, Int32 tryCount, GXReplyData reply)
in GXDLMSDirector.GXDLMSCommunicator.ReadDataBlock(Byte[] data, String text, Int32 multiplier, Int32 tryCount, GXReplyData reply)
in GXDLMSDirector.GXDLMSCommunicator.ReadDataBlock(Byte[] data, String text, Int32 multiplier, GXReplyData reply)
in GXDLMSDirector.GXDLMSCommunicator.ReadDataBlock(Byte[] data, String text, GXReplyData reply)
in GXDLMSDirector.GXDLMSCommunicator.ReadDataBlock(Byte[][] data, String text, GXReplyData reply)
in GXDLMSDirector.GXDLMSCommunicator.InitializeConnection(Boolean force)
in GXDLMSDirector.GXDLMSDevice.InitializeConnection()
in GXDLMSDirector.MainForm.Connect(Object sender, GXAsyncWork work, Object[] parameters)

Best Regards,

Gianluca

Profile picture for user Kurumi

Kurumi

3 years 4 months ago

Hi Gianluca, Your meter…

Hi Gianluca,

Your meter returns Deciphering failed error. It means that your ciphering settings (block cipher or/and authentication keys) are different in the client and the meter.

Check those values.

BR,
Mikko

MetersGuru

3 years 4 months ago

Hi Mikko, thank you for your…

Hi Mikko,
thank you for your answer but I unfortunately have the same issue also executing the "GuruxDLMSSimpleServerExample" that, as much as I see, uses the default cipher & auth keys. I've found that "cip_crypt" inside "apdu_parseUserInformation" fails returning "DLMS_ERROR_CODE_INVALID_TAG" due to "memcmp(NONSE, input->data + input->size, 12)".

Following I have reported the server log and attached a screenshot with my GXDLMSDirector settings.

RX: 7E A0 21 02 03 21 93 73 56 81 80 14 05 02 04 00 06 02 04 00 07 04 00 00 00 01 08 04 00 00 00 01 72 E3 7E
svr_isTarget.

Connecting without authentication.

svr_connected to HDLC level.

TX 7E A0 1F 21 02 03 73 D5 E4 81 80 12 05 01 80 06 01 80 07 04 00 00 00 01 08 04 00 00 00 01 53 3B 7E

RX: 7E A0 2C 02 03 21 10 94 9C E6 E6 00 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 62 1E 5D FF FF 88 55 7E
svr_validateAuthentication

findObject 15 0.0.40.0.0.255

svr_connected DLMS level.

TX 7E A0 38 21 02 03 30 07 C4 E6 E7 00 61 29 A1 09 06 07 60 85 74 05 08 01 01 A2 03 02 01 00 A3 05 A1 03 02 01 00 BE 10 04 0E 08 00 06 5F 1F 04 00 00 00 10 02 00 00 07 1C EA 7E

RX: 7E A0 1A 02 03 21 32 CD 71 E6 E6 00 C0 01 C1 00 01 00 00 2B 01 00 FF 02 00 7D 8F 7E
svr_getAttributeAccess

svr_preRead: 1 0.0.43.1.0.255

svr_postRead: 1 0.0.43.1.0.255

TX 7E A0 16 21 02 03 52 3A 85 E6 E7 00 C4 01 C1 00 06 00 00 00 01 F4 09 7E

RX: 7E A0 08 02 03 21 53 8A A1 7E
svr_disconnected

TX 7E A0 1F 21 02 03 73 D5 E4 81 80 12 05 01 80 06 01 80 07 04 00 00 00 01 08 04 00 00 00 01 53 3B 7E

RX: 7E A0 21 02 03 03 93 F0 46 81 80 14 05 02 04 00 06 02 04 00 07 04 00 00 00 01 08 04 00 00 00 01 72 E3 7E
svr_isTarget.

Connecting using High authentication.

svr_connected to HDLC level.

TX 7E A0 1F 03 02 03 73 F0 52 81 80 12 05 01 80 06 01 80 07 04 00 00 00 01 08 04 00 00 00 01 53 3B 7E

RX: 7E A0 6C 02 03 03 10 35 4D E6 E6 00 60 5D A1 09 06 07 60 85 74 05 08 01 03 A6 0A 04 08 41 42 43 44 45 46 47 48 8A 02 07 80 8B 07 60 85 74 05 08 02 05 AC 12 80 10 00 49 3A 03 79 09 3D 65 6D 64 39 24 33 4E 6D 69 BE 23 04 21 21 1F 31 00 00 00 02 23 7F E0 A9 FA 32 2D DC 9B 2F A1 E3 F6 09 C8 9C 1E 18 3A 16 BB DA 6D 0A 39 6D FE E9 7E
TX 7E A0 10 03 02 03 30 93 48 E6 E7 00 D8 02 05 70 2F 7E

RX: 7E A0 08 02 03 03 53 09 B1 7E
svr_disconnected

TX 7E A0 1F 03 02 03 73 F0 52 81 80 12 05 01 80 06 01 80 07 04 00 00 00 01 08 04 00 00 00 01 53 3B 7E

svr_preAction: 40 0.0.25.9.0.255

sendPush 40 0.0.25.9.0.255
Thu Feb 2 17:23:00 2023
30 seconds before next invoke Thu Feb 2 17:23:30 2023

svr_preAction: 40 0.0.25.9.0.255

sendPush 40 0.0.25.9.0.255
Thu Feb 2 17:23:30 2023
30 seconds before next invoke Thu Feb 2 17:24:00 2023

svr_preAction: 40 0.0.25.9.0.255

sendPush 40 0.0.25.9.0.255
Thu Feb 2 17:24:00 2023
30 seconds before next invoke Thu Feb 2 17:24:30 2023

Image
  • 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