Hi,
I have a problem with using secure connection using Gurux Java Library. My application (let's name it HESNG) seems to do everything in the same way that Gurux Director does, but somehow HESNG ends up with following exception after sending GLO Action Request:
2024-03-05 19:26:42.874 ERROR 260 --- [nio-8089-exec-9] ogy.hes.adapter.driver.dlms.GXDLMSReader : {device=G15-14088223} RX: 19:26:42.874 00 01 00 01 00 01 00 03 D8 01 01
2024-03-05 19:26:42.874 ERROR 135 --- [nio-8089-exec-9] nogy.hes.adapter.driver.dlms.MeterDriver : {device=G15-14088223} Could not initialize connection with meter, following error has occurred: Service not allowed. Operation not possible.
Below you can find comparison of transmissions - do you have any idea what HESNG is doing wrong?
Best wishes,
Piotr
Transmission:
Each line starts with number 1 or 2; 1 denotes HESNG, 2 denotes Gurux Director.
AARQ request
1 TX 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 42 1E 5D FF FF
2 TX 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 62 1E 5D FF FF
Values the same
AARQ response
1 RX 00 01 00 01 00 10 00 2B 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 10 10 02 00 00 07
2 RX 00 01 00 01 00 10 00 2B 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 10 10 02 00 00 07
Values the same
Invocation counter request
1 TX 00 01 00 10 00 01 00 0D C0 01 C1 00 01 00 00 2B 01 00 FF 02 00
2 TX 00 01 00 10 00 01 00 0D C0 01 C1 00 01 00 00 2B 01 00 FF 02 00
Values the same
Invocation counter response
1 RX 00 01 00 01 00 10 00 09 C4 01 C1 00 06 00 00 00 10
2 RX 00 01 00 01 00 10 00 09 C4 01 C1 00 06 00 00 00 79
Values differ by invocation counter value, which is expected
Release request
1 TX 00 01 00 10 00 01 00 05 62 03 80 01 00
2 TX 00 01 00 10 00 01 00 05 62 03 80 01 00
Release response
1 RX 00 01 00 01 00 10 00 05 63 03 80 01 00
2 RX 00 01 00 01 00 10 00 05 63 03 80 01 00
AARQ request
1 TX 00 01 00 01 00 01 00 5F 60 5D A1 09 06 07 60 85 74 05 08 01 03 A6 0A 04 08 4D 4D 4D 00 00 BC 61 4E 8A 02 07 80 8B 07 60 85 74 05 08 02 05 AC 12 80 10 61 0C 5A 39 68 63 2E 72 5F 40 6A 57 23 2D 4D 36 BE 23 04 21 21 1F 30 00 00 00 11 0C 82 9A DC 1E 1F 40 E3 60 A8 85 75 92 C6 41 39 EF AB E9 22 A0 57 40 89 7A C3
2 TX 00 01 00 01 00 01 00 5F 60 5D A1 09 06 07 60 85 74 05 08 01 03 A6 0A 04 08 4D 4D 4D 00 00 BC 61 4E 8A 02 07 80 8B 07 60 85 74 05 08 02 05 AC 12 80 10 64 55 53 79 2F 70 5A 21 33 56 5E 05 08 25 2C 30 BE 23 04 21 21 1F 30 00 00 00 7A 73 47 73 12 B3 FA CE 08 B8 9D ED D0 7A 88 BF B0 2C F4 65 86 32 21 3D 69 E0 33
Differences
HESNG
<CallingAuthentication Value="610C5A3968632E725F406A57232D4D36" />
<glo_InitiateRequest Value="30000000110C829ADC1E1F40E360A8857592C64139EFABE922A05740897AC3" />
Gurux Director
<CallingAuthentication Value="645553792F705A2133565E0508252C30" />
<glo_InitiateRequest Value="300000007A73477312B3FACE08B89DEDD07A88BFB02CF4658632213D69E033" />
AARQ response
1 RX 00 01 00 01 00 01 00 63 61 61 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 45 47 4D 66 30 D6 F8 1F 88 02 07 80 89 07 60 85 74 05 08 02 05 AA 0A 80 08 31 32 46 37 32 37 32 37 BE 23 04 21 28 1F 30 00 00 00 13 E0 C1 89 BB 3F 4C B7 BC 4E 9A 6D 2B 21 84 77 D3 60 8E D3 63 3F FA DA B8 0C F8
2 RX 00 01 00 01 00 01 00 63 61 61 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 45 47 4D 66 30 D6 F8 1F 88 02 07 80 89 07 60 85 74 05 08 02 05 AA 0A 80 08 30 35 32 38 30 30 42 33 BE 23 04 21 28 1F 30 00 00 00 7D 8F E0 72 DC 57 61 5C 56 8F 72 4F 0B 7B BD 4E 5D A8 07 E6 00 7A BA 71 30 3F 38
Differences
HESNG
<RespondingAuthentication Value="3132463732373237" />
<glo_InitiateResponse Value="3000000013E0C189BB3F4CB7BC4E9A6D2B218477D3608ED3633FFADAB80CF8" />
Gurux Director
<RespondingAuthentication Value="3035323830304233" />
<glo_InitiateResponse Value="300000007D8FE072DC57615C568F724F0B7BBD4E5DA807E6007ABA71303F38" />
GLO Action Request
1 TX 00 01 00 01 00 01 00 33 CB 31 30 00 00 00 11 CE 83 5B DC 17 40 5F CF 60 EA 64 29 6C 30 85 72 D3 72 EF 66 A5 6E 91 78 13 02 ED C7 70 B1 42 97 0B 44 82 79 9B 8C 68 16 A6 5B 37 3C
2 TX 00 01 00 01 00 01 00 33 CB 31 30 00 00 00 7B 41 80 EF 10 56 EF A8 EE 66 6B 97 CA 18 EC 1D AF 48 44 E4 31 E6 64 52 81 D2 FB 7D C2 C5 3B 05 64 A0 2C F8 0F 08 D0 27 75 7C 02 64 47
Different values
Then Gurux Director processes the GLO Action Response, whereas HESNG throws
2024-03-05 19:26:42.874 ERROR 260 --- [nio-8089-exec-9] ogy.hes.adapter.driver.dlms.GXDLMSReader : {device=G15-14088223} RX: 19:26:42.874 00 01 00 01 00 01 00 03 D8 01 01
2024-03-05 19:26:42.874 ERROR 135 --- [nio-8089-exec-9] nogy.hes.adapter.driver.dlms.MeterDriver : {device=G15-14088223} Could not initialize connection with meter, following error has occurred: Service not allowed. Operation not possible.
Further transmissions of Gurux Director
00 01 00 01 00 01 00 2c cf 2a 30 00 00 00 7f 0d 99 95 f9 0c b5 5a 7d 1b 28 e9 a8 ab 51 48 80 0c bb a4 c1 ee 26 34 2a 46 53 77 d3 f9 d5 b8 94 b7 ff 6e c4 2a
00 01 00 01 00 01 00 29 db 08 4d 4d 4d 00 00 bc 61 4e 1e 30 00 00 00 7c 76 17 4e 0f 67 b5 4d 19 e6 23 1e fd d0 ef 24 59 10 a6 5a 67 85 55 b8 49 3b
00 01 00 01 00 01 00 28 db 08 45 47 4d 66 30 d6 f8 1f 1d 30 00 00 00 80 36 31 c6 95 56 26 3f 74 e0 73 b4 40 4c e3 ad 6c f8 2b 81 12 5c 10 8a 4b
00 01 00 01 00 01 00 2a db 08 4d 4d 4d 00 00 bc 61 4e 1f 30 00 00 00 7d ae 16 96 7a 39 c8 97 50 13 7e 28 06 08 39 70 0e fe a6 0e 21 a3 4c 17 68 7c 84
00 01 00 01 00 01 00 26 db 08 45 47 4d 66 30 d6 f8 1f 1b 30 00 00 00 81 a8 84 57 8d 49 34 ae 6e 33 eb 65 ab 77 72 ca d9 04 60 d0 10 99 af
00 01 00 01 00 01 00 29 db 08 4d 4d 4d 00 00 bc 61 4e 1e 30 00 00 00 7e c9 5b 32 06 7f 41 03 4f 96 53 47 ed 9f c9 b4 a6 20 73 45 89 7c bb 1e 4f a0
00 01 00 01 00 01 00 25 db 08 45 47 4d 66 30 d6 f8 1f 1a 30 00 00 00 82 e6 18 a5 c8 af 3a 06 e5 cf 58 1b 83 3a 67 9f ef b8 e0 17 55 98
Hi Piotr, The connection is…
Hi Piotr,
The connection is ciphered. You need to share block cipher and authentication keys.
Without them I can't say what might be the reason for this.
BR,
Mikko
Mikko I’ve sent the keys to…
Mikko I’ve sent the keys to you via email
Hi Mikko, I've decrypted the…
Hi Mikko,
I've decrypted the transmistion for you. It looks weird - my system (HESNG) does the same that Gurux Director (GXDIR), but gets a failure from meter, whereas Gurux Director continues transmission... Any idea why I get "Service not allowed. Operation not possible." error?
HESNG
HESNG TX 00 01 00 01 00 01 00 5F 60 5D A1 09 06 07 60 85 74 05 08 01 03 A6 0A 04 08 4D 4D 4D 00 00 BC 61 4E 8A 02 07 80 8B 07 60 85 74 05 08 02 05 AC 12 80 10 57 14 33 0A 5D 60 5F 42 62 0B 1F 38 06 24 45 5A BE 23 04 21 21 1F 30 00 00 00 93 D6 A0 C5 B6 D7 6B 12 12 B7 BC 50 2E 23 0F 97 77 FF F1 EC B6 9C 6E 90 EC F3 A8
<WRAPPER len="67" >
<TargetAddress Value="1" />
<SourceAddress Value="1" />
<PDU>
<AssociationRequest>
<ApplicationContextName Value="LN_WITH_CIPHERING" />
<CallingAPTitle Value="4D4D4D0000BC614E" />
<SenderACSERequirements Value="1" />
<MechanismName Value="HighGMAC" />
<CallingAuthentication Value="5714330A5D605F42620B1F380624455A" />
<!-- Decrypted data:
Security: AuthenticationEncryption
Invocation Counter: 147
<InitiateRequest>
<ProposedDlmsVersionNumber Value="6" />
<ProposedConformance>
<ConformanceBit Name="GeneralProtection" />
<ConformanceBit Name="GeneralBlockTransfer" />
<ConformanceBit Name="DeltaValueEncoding" />
<ConformanceBit Name="BlockTransferWithGetOrRead" />
<ConformanceBit Name="BlockTransferWithSetOrWrite" />
<ConformanceBit Name="BlockTransferWithAction" />
<ConformanceBit Name="MultipleReferences" />
<ConformanceBit Name="Access" />
<ConformanceBit Name="Get" />
<ConformanceBit Name="Set" />
<ConformanceBit Name="SelectiveAccess" />
<ConformanceBit Name="Action" />
</ProposedConformance>
<ProposedMaxPduSize Value="65535" />
</InitiateRequest>
-->
<glo_InitiateRequest Value="3000000093D6A0C5B6D76B1212B7BC502E230F9777FFF1ECB69C6E90ECF3A8" />
</AssociationRequest>
</PDU>
</WRAPPER>
GXDIR
GXDIR TX 00 01 00 01 00 01 00 5F 60 5D A1 09 06 07 60 85 74 05 08 01 03 A6 0A 04 08 4D 4D 4D 00 00 BC 61 4E 8A 02 07 80 8B 07 60 85 74 05 08 02 05 AC 12 80 10 64 55 53 79 2F 70 5A 21 33 56 5E 05 08 25 2C 30 BE 23 04 21 21 1F 30 00 00 00 7A 73 47 73 12 B3 FA CE 08 B8 9D ED D0 7A 88 BF B0 2C F4 65 86 32 21 3D 69 E0 33
<WRAPPER len="67" >
<TargetAddress Value="1" />
<SourceAddress Value="1" />
<PDU>
<AssociationRequest>
<ApplicationContextName Value="LN_WITH_CIPHERING" />
<CallingAPTitle Value="4D4D4D0000BC614E" />
<SenderACSERequirements Value="1" />
<MechanismName Value="HighGMAC" />
<CallingAuthentication Value="645553792F705A2133565E0508252C30" />
<!-- Decrypted data:
Security: AuthenticationEncryption
Invocation Counter: 122
<InitiateRequest>
<ProposedDlmsVersionNumber Value="6" />
<ProposedConformance>
<ConformanceBit Name="GeneralProtection" />
<ConformanceBit Name="GeneralBlockTransfer" />
<ConformanceBit Name="DeltaValueEncoding" />
<ConformanceBit Name="BlockTransferWithGetOrRead" />
<ConformanceBit Name="BlockTransferWithSetOrWrite" />
<ConformanceBit Name="BlockTransferWithAction" />
<ConformanceBit Name="MultipleReferences" />
<ConformanceBit Name="Access" />
<ConformanceBit Name="Get" />
<ConformanceBit Name="Set" />
<ConformanceBit Name="SelectiveAccess" />
<ConformanceBit Name="Action" />
</ProposedConformance>
<ProposedMaxPduSize Value="65535" />
</InitiateRequest>
-->
<glo_InitiateRequest Value="300000007A73477312B3FACE08B89DEDD07A88BFB02CF4658632213D69E033" />
</AssociationRequest>
</PDU>
</WRAPPER>
HESNG
HESNG RX 00 01 00 01 00 01 00 63 61 61 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 45 47 4D 66 30 D6 F8 1F 88 02 07 80 89 07 60 85 74 05 08 02 05 AA 0A 80 08 30 31 44 35 46 42 41 46 BE 23 04 21 28 1F 30 00 00 00 97 1B B5 00 D3 20 D2 8D 13 97 6E B2 A8 A8 9C 81 A1 26 F7 F5 A2 78 B8 3E C0 2D 90
<WRAPPER len="6B" >
<TargetAddress Value="1" />
<SourceAddress Value="1" />
<PDU>
<AssociationResponse>
<ApplicationContextName Value="LN_WITH_CIPHERING" />
<AssociationResult Value="0" />
<ResultSourceDiagnostic>
<!-- AuthenticationRequired -->
<ACSEServiceUser Value="14" />
</ResultSourceDiagnostic>
<!-- IDIS system title:
Manufacturer Code: EGM
Device type: IDIS package2 IP single phase meter
Function type: Disconnector, Load Management
Serial number: 14088223
-->
<RespondingAPTitle Value="45474D6630D6F81F" />
<ResponderACSERequirement Value="1" />
<MechanismName Value="HighGMAC" />
<RespondingAuthentication Value="3031443546424146" />
<!-- Decrypted data:
Security: AuthenticationEncryption
Invocation Counter: 151
<InitiateResponse>
<NegotiatedDlmsVersionNumber Value="6" />
<NegotiatedConformance>
<ConformanceBit Name="GeneralProtection" />
<ConformanceBit Name="GeneralBlockTransfer" />
<ConformanceBit Name="BlockTransferWithGetOrRead" />
<ConformanceBit Name="BlockTransferWithSetOrWrite" />
<ConformanceBit Name="MultipleReferences" />
<ConformanceBit Name="Get" />
<ConformanceBit Name="Set" />
<ConformanceBit Name="SelectiveAccess" />
<ConformanceBit Name="Action" />
</NegotiatedConformance>
<NegotiatedMaxPduSize Value="512" />
<VaaName Value="7" />
</InitiateResponse>
-->
<glo_InitiateResponse Value="30000000971BB500D320D28D13976EB2A8A89C81A126F7F5A278B83EC02D90" />
</AssociationResponse>
</PDU>
</WRAPPER>
GXDIR
GXDIR RX 00 01 00 01 00 01 00 63 61 61 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 45 47 4D 66 30 D6 F8 1F 88 02 07 80 89 07 60 85 74 05 08 02 05 AA 0A 80 08 30 35 32 38 30 30 42 33 BE 23 04 21 28 1F 30 00 00 00 7D 8F E0 72 DC 57 61 5C 56 8F 72 4F 0B 7B BD 4E 5D A8 07 E6 00 7A BA 71 30 3F 38
<WRAPPER len="6B" >
<TargetAddress Value="1" />
<SourceAddress Value="1" />
<PDU>
<AssociationResponse>
<ApplicationContextName Value="LN_WITH_CIPHERING" />
<AssociationResult Value="0" />
<ResultSourceDiagnostic>
<!-- AuthenticationRequired -->
<ACSEServiceUser Value="14" />
</ResultSourceDiagnostic>
<!-- IDIS system title:
Manufacturer Code: EGM
Device type: IDIS package2 IP single phase meter
Function type: Disconnector, Load Management
Serial number: 14088223
-->
<RespondingAPTitle Value="45474D6630D6F81F" />
<ResponderACSERequirement Value="1" />
<MechanismName Value="HighGMAC" />
<RespondingAuthentication Value="3035323830304233" />
<!-- Decrypted data:
Security: AuthenticationEncryption
Invocation Counter: 125
<InitiateResponse>
<NegotiatedDlmsVersionNumber Value="6" />
<NegotiatedConformance>
<ConformanceBit Name="GeneralProtection" />
<ConformanceBit Name="GeneralBlockTransfer" />
<ConformanceBit Name="BlockTransferWithGetOrRead" />
<ConformanceBit Name="BlockTransferWithSetOrWrite" />
<ConformanceBit Name="MultipleReferences" />
<ConformanceBit Name="Get" />
<ConformanceBit Name="Set" />
<ConformanceBit Name="SelectiveAccess" />
<ConformanceBit Name="Action" />
</NegotiatedConformance>
<NegotiatedMaxPduSize Value="512" />
<VaaName Value="7" />
</InitiateResponse>
-->
<glo_InitiateResponse Value="300000007D8FE072DC57615C568F724F0B7BBD4E5DA807E6007ABA71303F38" />
</AssociationResponse>
</PDU>
</WRAPPER>
HESNG
HESNG TX 00 01 00 01 00 01 00 33 CB 31 30 00 00 00 93 14 A1 04 B6 DE 34 0D 3E B7 DE B1 72 DD F9 0D 6A E9 89 91 DE 40 52 E7 B3 3E 73 22 EC 51 93 92 68 3D DF FD DE C1 82 D6 34 04 BD 87 3F
<WRAPPER len="3B" >
<TargetAddress Value="1" />
<SourceAddress Value="1" />
<PDU>
<!-- Invocation Counter: 147 -->
<!-- Decrypt data: C3 01 C1 00 0F 00 00 28 00 00 FF 01 01 09 11 10 00 00 00 93 B8 F1 81 3D A3 FB D3 31 D6 3A B0 A8
<ActionRequest>
<ActionRequestNormal>
# Priority: High, ServiceClass: Confirmed, Invoke ID: 1
<InvokeIdAndPriority Value="193" />
<MethodDescriptor>
# AssociationLogicalName
<ClassId Value="15" />
# 0.0.40.0.0.255
<InstanceId Value="0000280000FF" />
<MethodId Value="1" />
</MethodDescriptor>
<MethodInvocationParameters>
<OctetString Value="1000000093B8F1813DA3FBD331D63AB0A8" />
</MethodInvocationParameters>
</ActionRequestNormal>
</ActionRequest>
-->
<glo_ActionRequest Value="300000009314A104B6DE340D3EB7DEB172DDF90D6AE98991DE4052E7B33E7322EC519392683DDFFDDEC182D63404BD873F" />
</PDU>
</WRAPPER>
GXDIR
GXDIR TX 00 01 00 01 00 01 00 33 CB 31 30 00 00 00 7B 41 80 EF 10 56 EF A8 EE 66 6B 97 CA 18 EC 1D AF 48 44 E4 31 E6 64 52 81 D2 FB 7D C2 C5 3B 05 64 A0 2C F8 0F 08 D0 27 75 7C 02 64 47
<WRAPPER len="3B" >
<TargetAddress Value="1" />
<SourceAddress Value="1" />
<PDU>
<!-- Invocation Counter: 123 -->
<!-- Decrypt data: C3 01 C1 00 0F 00 00 28 00 00 FF 01 01 09 11 10 00 00 00 7B EF 0E 13 B8 1C 58 A4 48 C1 1D 00 00
<ActionRequest>
<ActionRequestNormal>
# Priority: High, ServiceClass: Confirmed, Invoke ID: 1
<InvokeIdAndPriority Value="193" />
<MethodDescriptor>
# AssociationLogicalName
<ClassId Value="15" />
# 0.0.40.0.0.255
<InstanceId Value="0000280000FF" />
<MethodId Value="1" />
</MethodDescriptor>
<MethodInvocationParameters>
<OctetString Value="100000007BEF0E13B81C58A448C11D0000" />
</MethodInvocationParameters>
</ActionRequestNormal>
</ActionRequest>
-->
<glo_ActionRequest Value="300000007B4180EF1056EFA8EE666B97CA18EC1DAF4844E431E6645281D2FB7DC2C53B0564A02CF80F08D027757C026447" />
</PDU>
</WRAPPER>
HESNG
HESNG RX 00 01 00 01 00 01 00 03 D8 01 01
<WRAPPER len="B" >
<TargetAddress Value="1" />
<SourceAddress Value="1" />
<PDU>
<ExceptionResponse>
<StateError Value="ServiceNotAllowed" />
<ServiceError Value="OperationNotPossible" />
</ExceptionResponse>
</PDU>
</WRAPPER>
GXDIR
GXDIR RX 00 01 00 01 00 01 00 2C CF 2A 30 00 00 00 7F 0D 99 95 F9 0C B5 5A 7D 1B 28 E9 A8 AB 51 48 80 0C BB A4 C1 EE 26 34 2A 46 53 77 D3 F9 D5 B8 94 B7 FF 6E C4 2A
<WRAPPER len="34" >
<TargetAddress Value="1" />
<SourceAddress Value="1" />
<PDU>
<glo_ActionResponse Value="300000007F0D9995F90CB55A7D1B28E9A8AB5148800CBBA4C1EE26342A465377D3F9D5B894B7FF6EC42A" />
</PDU>
</WRAPPER>