By Mohanraj, 13 January, 2020 Forums General discussion Hi Mikko, I would like to read meter which is encrypted with below settings Security ------------------------- 1.Security : GMAC 2.System title : ABCDEFGH 3.Clock Cipher Key : ABC1234567890ABC Authentication Key : ABC1234567890ABC Read Automatically -------------------------- Invocation Counter : 0 Frame Counter LN : 0.0.43.1.2.255 How to to do using ANSI C client connection. DLMS Client application does not take any argument related to these pramater. please help. Thanks Mohanraj Hi Mohanraj, Hi Mohanraj, con.settings.authentication = DLMS_AUTHENTICATION_HIGH_GMAC; bb_clear(&con.settings.cipher.systemTitle); bb_addHexString(&con.settings.cipher.systemTitle, "ABCDEFGH"); bb_clear(&con.settings.cipher.blockCipherKey); bb_addHexString(&con.settings.cipher.blockCipherKey, "ABC1234567890ABC"); bb_clear(&con.settings.cipher.authenticationKey); bb_addHexString(&con.settings.cipher.authenticationKey, "ABC1234567890ABC"); BR, Mikko Hi, Hi, followed your instruction. Trace from DLMSDirector 20:59:36 Send SNRM request. TX: 7E A0 07 03 21 93 0F 01 7E 20:59:37 RX: 7E A0 1E 21 03 73 C3 7A 81 80 12 05 01 80 06 01 80 07 04 00 00 00 01 08 04 00 00 00 01 53 3B 7E 20:59:37 Send AARQ request. TX: 7E A0 2B 03 21 10 FB AF 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 00 1E 1D FF FF C5 E4 7E 20:59:37 RX: 7E A0 37 21 03 30 6C 7C 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 30 00 07 B2 6C 7E 20:59:37 RX: 7E A0 15 21 03 52 5D 8A E6 E7 00 C4 01 C1 00 06 80 08 D9 4A AC 96 7E 20:59:37 Disconnect request TX: 7E A0 07 03 21 53 03 C7 7E 20:59:37 RX: 7E A0 1E 21 03 73 C3 7A 81 80 12 05 01 80 06 01 80 07 04 00 00 00 01 08 04 00 00 00 01 53 3B 7E 20:59:37 Send SNRM request. TX: 7E A0 07 03 41 93 5A 64 7E 20:59:38 RX: 7E A0 1E 41 03 73 8E 7F 81 80 12 05 01 80 06 01 80 07 04 00 00 00 01 08 04 00 00 00 01 53 3B 7E 20:59:38 Send AARQ request. TX: 7E A0 53 03 41 10 33 75 E6 E6 00 60 45 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 01 AC 06 80 04 6C 6E 74 31 BE 17 04 15 21 13 20 80 08 D9 4B 22 EA 95 92 31 90 01 26 04 43 5D 19 43 2E EC 96 7E 20:59:38 RX: 7E A0 4A 41 03 30 EB A8 E6 E7 00 61 3C A1 09 06 07 60 85 74 05 08 01 03 A2 03 02 01 00 A3 05 A1 03 02 01 00 A4 0A 04 08 4C 4E 54 39 30 38 33 34 BE 17 04 15 28 13 20 00 02 34 C9 48 A1 00 CF C0 D9 68 6E 3E DD A6 A2 E9 5C 93 32 7E My Code cl_init(&con.settings,1,16,1,DLMS_AUTHENTICATION_HIGH_LOW,"lnt1",DLMS_INTERFACE_TYPE_HDLC); /*High authentication*/ FACE_TYPE_HDLC); con.settings.cipher.security = DLMS_SECURITY_ENCRYPTION; con.settings.priority = DLMS_PRIORITY_HIGH; con.settings.serviceClass = DLMS_SERVICE_CLASS_CONFIRMED; con.settings.useLogicalNameReferencing = 0; bb_clear(&con.settings.cipher.systemTitle); bb_addString(&con.settings.cipher.systemTitle,"ABCDEFGH"); bb_clear(&con.settings.cipher.blockCipherKey); bb_addString(&con.settings.cipher.blockCipherKey,"1234567890123456"); bb_clear(&con.settings.cipher.authenticationKey); bb_addString(&con.settings.cipher.authenticationKey,"1234567890123456"); ret = com_initializeConnection(&con); Trace from my code TX: 7E A0 07 03 21 93 0F 01 7E RX: 7E A0 1E 21 03 73 C3 7A 81 80 12 05 01 80 06 01 80 07 04 00 00 00 01 08 04 00 00 00 01 53 3B 7E TX: 7E A0 4E 03 21 10 48 58 60 43 A1 09 06 07 60 85 74 05 08 01 04 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 70 38 9C CE 67 B3 59 AC 56 AB 55 2A 15 8A 45 22 BE 09 04 07 21 05 20 00 00 00 00 DE 32 7E DLMSDirector sends release request at the beginning after connect. But my code does not send and it is struck. what is the change required. Please help. Thanks Mohanraj Hi Mohanraj, Hi Mohanraj, We'll update the client example today so it'll read the invocation counter. BR, Mikko Hi Mikko, Hi Mikko, once client code gets updated please provide some inputs what are all the changes and in which file. Thanks Mohanraj Hi Mohanraj, Hi Mohanraj, Get the latest version. There are two new command line parameters. -C and -v You can try with those: -C AuthenticationEncryption -v 0.0.43.1.0.255 The logical name of frame counter might be something else. BR, Mikko BR, Mikko Log in or register to post comments
Hi Mohanraj, Hi Mohanraj, con.settings.authentication = DLMS_AUTHENTICATION_HIGH_GMAC; bb_clear(&con.settings.cipher.systemTitle); bb_addHexString(&con.settings.cipher.systemTitle, "ABCDEFGH"); bb_clear(&con.settings.cipher.blockCipherKey); bb_addHexString(&con.settings.cipher.blockCipherKey, "ABC1234567890ABC"); bb_clear(&con.settings.cipher.authenticationKey); bb_addHexString(&con.settings.cipher.authenticationKey, "ABC1234567890ABC"); BR, Mikko
Hi, Hi, followed your instruction. Trace from DLMSDirector 20:59:36 Send SNRM request. TX: 7E A0 07 03 21 93 0F 01 7E 20:59:37 RX: 7E A0 1E 21 03 73 C3 7A 81 80 12 05 01 80 06 01 80 07 04 00 00 00 01 08 04 00 00 00 01 53 3B 7E 20:59:37 Send AARQ request. TX: 7E A0 2B 03 21 10 FB AF 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 00 1E 1D FF FF C5 E4 7E 20:59:37 RX: 7E A0 37 21 03 30 6C 7C 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 30 00 07 B2 6C 7E 20:59:37 RX: 7E A0 15 21 03 52 5D 8A E6 E7 00 C4 01 C1 00 06 80 08 D9 4A AC 96 7E 20:59:37 Disconnect request TX: 7E A0 07 03 21 53 03 C7 7E 20:59:37 RX: 7E A0 1E 21 03 73 C3 7A 81 80 12 05 01 80 06 01 80 07 04 00 00 00 01 08 04 00 00 00 01 53 3B 7E 20:59:37 Send SNRM request. TX: 7E A0 07 03 41 93 5A 64 7E 20:59:38 RX: 7E A0 1E 41 03 73 8E 7F 81 80 12 05 01 80 06 01 80 07 04 00 00 00 01 08 04 00 00 00 01 53 3B 7E 20:59:38 Send AARQ request. TX: 7E A0 53 03 41 10 33 75 E6 E6 00 60 45 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 01 AC 06 80 04 6C 6E 74 31 BE 17 04 15 21 13 20 80 08 D9 4B 22 EA 95 92 31 90 01 26 04 43 5D 19 43 2E EC 96 7E 20:59:38 RX: 7E A0 4A 41 03 30 EB A8 E6 E7 00 61 3C A1 09 06 07 60 85 74 05 08 01 03 A2 03 02 01 00 A3 05 A1 03 02 01 00 A4 0A 04 08 4C 4E 54 39 30 38 33 34 BE 17 04 15 28 13 20 00 02 34 C9 48 A1 00 CF C0 D9 68 6E 3E DD A6 A2 E9 5C 93 32 7E My Code cl_init(&con.settings,1,16,1,DLMS_AUTHENTICATION_HIGH_LOW,"lnt1",DLMS_INTERFACE_TYPE_HDLC); /*High authentication*/ FACE_TYPE_HDLC); con.settings.cipher.security = DLMS_SECURITY_ENCRYPTION; con.settings.priority = DLMS_PRIORITY_HIGH; con.settings.serviceClass = DLMS_SERVICE_CLASS_CONFIRMED; con.settings.useLogicalNameReferencing = 0; bb_clear(&con.settings.cipher.systemTitle); bb_addString(&con.settings.cipher.systemTitle,"ABCDEFGH"); bb_clear(&con.settings.cipher.blockCipherKey); bb_addString(&con.settings.cipher.blockCipherKey,"1234567890123456"); bb_clear(&con.settings.cipher.authenticationKey); bb_addString(&con.settings.cipher.authenticationKey,"1234567890123456"); ret = com_initializeConnection(&con); Trace from my code TX: 7E A0 07 03 21 93 0F 01 7E RX: 7E A0 1E 21 03 73 C3 7A 81 80 12 05 01 80 06 01 80 07 04 00 00 00 01 08 04 00 00 00 01 53 3B 7E TX: 7E A0 4E 03 21 10 48 58 60 43 A1 09 06 07 60 85 74 05 08 01 04 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 70 38 9C CE 67 B3 59 AC 56 AB 55 2A 15 8A 45 22 BE 09 04 07 21 05 20 00 00 00 00 DE 32 7E DLMSDirector sends release request at the beginning after connect. But my code does not send and it is struck. what is the change required. Please help. Thanks Mohanraj
Hi Mohanraj, Hi Mohanraj, We'll update the client example today so it'll read the invocation counter. BR, Mikko
Hi Mikko, Hi Mikko, once client code gets updated please provide some inputs what are all the changes and in which file. Thanks Mohanraj
Hi Mohanraj, Hi Mohanraj, Get the latest version. There are two new command line parameters. -C and -v You can try with those: -C AuthenticationEncryption -v 0.0.43.1.0.255 The logical name of frame counter might be something else. BR, Mikko BR, Mikko
Hi Mohanraj,
Hi Mohanraj,
con.settings.authentication = DLMS_AUTHENTICATION_HIGH_GMAC;
bb_clear(&con.settings.cipher.systemTitle);
bb_addHexString(&con.settings.cipher.systemTitle, "ABCDEFGH");
bb_clear(&con.settings.cipher.blockCipherKey);
bb_addHexString(&con.settings.cipher.blockCipherKey, "ABC1234567890ABC");
bb_clear(&con.settings.cipher.authenticationKey);
bb_addHexString(&con.settings.cipher.authenticationKey, "ABC1234567890ABC");
BR,
Mikko
Hi,
Hi,
followed your instruction.
Trace from DLMSDirector
20:59:36 Send SNRM request.
TX: 7E A0 07 03 21 93 0F 01 7E
20:59:37
RX: 7E A0 1E 21 03 73 C3 7A 81 80 12 05 01 80 06 01 80 07 04 00 00 00 01 08 04 00 00 00 01 53 3B 7E
20:59:37 Send AARQ request.
TX: 7E A0 2B 03 21 10 FB AF 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 00 1E 1D FF FF C5 E4 7E
20:59:37
RX: 7E A0 37 21 03 30 6C 7C 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 30 00 07 B2 6C 7E
20:59:37
RX: 7E A0 15 21 03 52 5D 8A E6 E7 00 C4 01 C1 00 06 80 08 D9 4A AC 96 7E
20:59:37 Disconnect request
TX: 7E A0 07 03 21 53 03 C7 7E
20:59:37
RX: 7E A0 1E 21 03 73 C3 7A 81 80 12 05 01 80 06 01 80 07 04 00 00 00 01 08 04 00 00 00 01 53 3B 7E
20:59:37 Send SNRM request.
TX: 7E A0 07 03 41 93 5A 64 7E
20:59:38
RX: 7E A0 1E 41 03 73 8E 7F 81 80 12 05 01 80 06 01 80 07 04 00 00 00 01 08 04 00 00 00 01 53 3B 7E
20:59:38 Send AARQ request.
TX: 7E A0 53 03 41 10 33 75 E6 E6 00 60 45 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 01 AC 06 80 04 6C 6E 74 31 BE 17 04 15 21 13 20 80 08 D9 4B 22 EA 95 92 31 90 01 26 04 43 5D 19 43 2E EC 96 7E
20:59:38
RX: 7E A0 4A 41 03 30 EB A8 E6 E7 00 61 3C A1 09 06 07 60 85 74 05 08 01 03 A2 03 02 01 00 A3 05 A1 03 02 01 00 A4 0A 04 08 4C 4E 54 39 30 38 33 34 BE 17 04 15 28 13 20 00 02 34 C9 48 A1 00 CF C0 D9 68 6E 3E DD A6 A2 E9 5C 93 32 7E
My Code
cl_init(&con.settings,1,16,1,DLMS_AUTHENTICATION_HIGH_LOW,"lnt1",DLMS_INTERFACE_TYPE_HDLC);
/*High authentication*/
FACE_TYPE_HDLC);
con.settings.cipher.security = DLMS_SECURITY_ENCRYPTION;
con.settings.priority = DLMS_PRIORITY_HIGH;
con.settings.serviceClass = DLMS_SERVICE_CLASS_CONFIRMED;
con.settings.useLogicalNameReferencing = 0;
bb_clear(&con.settings.cipher.systemTitle);
bb_addString(&con.settings.cipher.systemTitle,"ABCDEFGH");
bb_clear(&con.settings.cipher.blockCipherKey);
bb_addString(&con.settings.cipher.blockCipherKey,"1234567890123456");
bb_clear(&con.settings.cipher.authenticationKey);
bb_addString(&con.settings.cipher.authenticationKey,"1234567890123456");
ret = com_initializeConnection(&con);
Trace from my code
TX: 7E A0 07 03 21 93 0F 01 7E
RX: 7E A0 1E 21 03 73 C3 7A 81 80 12 05 01 80 06 01 80 07 04 00 00 00 01 08 04 00 00 00 01 53 3B 7E
TX: 7E A0 4E 03 21 10 48 58 60 43 A1 09 06 07 60 85 74 05 08 01 04 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 70 38 9C CE 67 B3 59 AC 56 AB 55 2A 15 8A 45 22 BE 09 04 07 21 05 20 00 00 00 00 DE 32 7E
DLMSDirector sends release request at the beginning after connect. But my code does not send and it is struck.
what is the change required.
Please help.
Thanks
Mohanraj
Hi Mohanraj,
Hi Mohanraj,
We'll update the client example today so it'll read the invocation counter.
BR,
Mikko
Hi Mikko,
Hi Mikko,
once client code gets updated please provide some inputs what are all the changes and in which file.
Thanks
Mohanraj
Hi Mohanraj,
Hi Mohanraj,
Get the latest version. There are two new command line parameters.
-C and -v
You can try with those:
-C AuthenticationEncryption -v 0.0.43.1.0.255
The logical name of frame counter might be something else.
BR,
Mikko
BR,
Mikko