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.
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.
Hello,
I am new with DLMS.Any help would be great !!
I am trying to read data from L&T smart meter(Manufactured by:Schneider Electric india pvt ltd)) using optical cable.
I get response for SNRM Frame, but there is error response in AARE when i send the AARQ Frame.
The password is correct,i have been ensured by the manufacturer as well as the list of default password as documented by gurux.
I have tried sending frame with none/low/high as mechanism name in combination with with ciphering/without ciphering ACSE tags and have checked each frame with gurux translator for its correct frame format.
In all the cases initiate response comes from LN with ciphering, even if i am not using it in my AARQ. More over the connection is Permanently rejected(01)(Authentication Failure(13))
Considering this, i have tried using various(lower/higher) version ,standard (indian standard/generalised meter standard) dest address as 21,22,23,41,61,81 as hex but response was almost same. (for 81 it was different -Vaa name error)
I have tried using few iterations on conformance block to ask services which are offered by the meter,if thats the issue.Alongwith max PDU size. but nothing has worked so far.
I have tested these input, using both python and gurux director.
I am attaching the log of gurux director,following the result of AARQ/AARE i got while using python serial communication.
=> Without password read clock of meter using Gurux successfully.
GXDLMSDirector 8.2.2202.0901
Log created 13:30:50
13:30:55 Initializing serial connection.
13:30:56 Send SNRM request.
7E A0 07 03 21 93 0F 01 7E
13:30:56
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
13:30:56 Parsing UA reply succeeded.
13:30:56 Send AARQ request.
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 20 1E 5D FF FF 22 82 7E
13:30:56
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
13:30:57 Parsing AARE reply succeeded.
13:30:58 --- Collecting objects. ---
13:30:58 Collecting objects
7E A0 19 03 21 32 6F D8 E6 E6 00 C0 01 C1 00 0F 00 00 28 00 00 FF 02 00 91 53 7E
13:30:59
7E A8 89 21 03 52 86 A9 E6 E7 00 C4 01 C1 00 01 0B 02 04 12 00 08 11 00 09 06 00 00 01 00 00 FF 02 02 01 09 02 03 0F 01 16 01 00 02 03 0F 02 16 01 00 02 03 0F 03 16 00 00 02 03 0F 04 16 00 00 02 03 0F 05 16 00 00 02 03 0F 06 16 00 00 02 03 0F 07 16 00 00 02 03 0F 08 16 00 00 02 03 0F 09 16 00 00 01 06 02 02 0F 01 16 00 02 02 0F 02 16 00 02 02 0F 03 16 00 02 02 0F 04 16 00 02 02 0F 05 16 00 02 02 0F 06 16 DF 97 7E
#Using Low security
GXDLMSDirector 8.2.2202.0901
Log created 18:00:54
18:01:00 Initializing serial connection.
18:01:01 Send SNRM request.
7E A0 07 03 41 93 5A 64 7E
18:01:01
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
18:01:01 Parsing UA reply succeeded.
18:01:01 Send AARQ request.
7E A0 40 03 41 10 5F 93 E6 E6 00 60 32 A1 09 06 07 60 85 74 05 08 01 01 8A 02 07 80 8B 07 60 85 74 05 08 02 01 AC 06 80 04 6C 6E 74 31 BE 10 04 0E 01 00 00 00 06 5F 1F 04 00 20 1E 5D FF FF DE 42 7E
18:01:01
7E A0 2D 41 03 30 2E 66 E6 E7 00 61 1F A1 09 06 07 60 85 74 05 08 01 03 A2 03 02 01 01 A3 05 A1 03 02 01 0D BE 06 04 04 0E 01 06 00 3D 0E 7E
18:01:01 Disconnect request
18:01:01
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
Gurux.DLMS.GXDLMSException: Connection is permanently rejected. The application context name is not supported.
Meter expects Logical Name referencing with secured connection.
at GXDLMSDirector.GXDLMSCommunicator.InitializeConnection(Boolean force)
at GXDLMSDirector.GXDLMSDevice.InitializeConnection()
at GXDLMSDirector.MainForm.Connect(Object sender, GXAsyncWork work, Object[] parameters)
Few combinations that should work,as fellow members have tested it(like:http://www.gurux.fi/node/18816) also failed, i tried using LN with no ciphering but the response came from LN with ciphering :
Using Python:
##No ciphering
SentSNRM Frame:7EA0070341935A647E
Recieved SNRM:7ea01e4103738e7f818012050180060180070400000001080400000001533b7e
SentAARQ:7EA02B034110AECAE6E600601DA109060760857405080101BE10040E01000000065F1F0400201E5DFFFF22827E
RecievedAARQ:7ea02d4103302e66e6e700611fa109060760857405080103a203020101a305a10302010dbe0604040e0106003d0e7e
##No ciphering/none mechanism
SentSNRM :7EA0070341935A647E
RecievedSNRM :7ea01e4103738e7f818012050180060180070400000001080400000001533b7e7ea01e4103738e7f818012050180060180070400000001080400000001533b7e
SentAARQ:7EA0400341105F93E6E6006032A1090607608574050801(01)8A0207808B07608574050802(02)AC0680046C6E7431BE10040E01000000065F1F0400001E1FFFFF59677E
RecievedAARQ:7ea02d4103302e66e6e700611fa109060760857405080103a203020101a305a10302010dbe0604040e0106003d0e7e
#####No ciphering/low mechanism
SentSNRM :7EA0070341935A647E
RecievedSNRM:7ea01e4103738e7f818012050180060180070400000001080400000001533b7e7ea01e4103738e7f818012050180060180070400000001080400000001533b7e
SentAARQ:7EA0400341105F93E6E6006032A1090607608574050801(03)8A0207808B07608574050802(02)AC0680046C6E7431BE10040E01000000065F1F0400001E1FFFFF2D7B7E
RecievedAARQ:7ea02d4103302e66e6e700611fa109060760857405080103a203020101a305a10302010dbe0604040e0106003d0e7e
Does this means that meter is telling me what it supports?i.e LN with ciphering?
Any direction/help highlighting what i am doing wrong and how to correct myself would be appreciable,
Thank you in advance.
Hi,
Hi,
Try to change the client address to 1 when you try to connect with Low authentication. If that doesn't help try to change the physical server address to 0x20.
Your public read for python fails, because your client address is 0x20 and not 0x10.
BR,
Mikko
Hello,
Hello,
I have attached the log of result ,when i use client address as x1 and x20 respectively
##client add: x01
GXDLMSDirector 8.2.2202.0901
Log created 14:47:02
14:47:20 Initializing serial connection.
14:47:21 Send SNRM request.
7E A0 07 03 03 93 8C 11 7E
14:47:26 Data send failed. Try to resend 1/3
14:47:31 Data send failed. Try to resend 2/3
14:47:36 Failed to receive reply from the device in given time.
14:47:36 Disconnect request
14:47:36 Send Disconnect request.
7E A0 07 03 03 53 80 D7 7E
14:47:41 Data send failed. Try to resend 1/3
14:47:46 Data send failed. Try to resend 2/3
14:47:51 Failed to receive reply from the device in given time.
System.TimeoutException: Failed to receive reply from the device in given time.
at GXDLMSDirector.GXDLMSCommunicator.ReadDLMSPacket(Byte[] data, Int32 tryCount, GXReplyData reply)
at GXDLMSDirector.GXDLMSCommunicator.ReadDataBlock(Byte[] data, String text, Int32 multiplier, Int32 tryCount, GXReplyData reply)
##Client add: x20
18:01:00 Initializing serial connection.
18:01:01 Send SNRM request.
7E A0 07 03 41 93 5A 64 7E
18:01:01
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
18:01:01 Parsing UA reply succeeded.
18:01:01 Send AARQ request.
7E A0 40 03 41 10 5F 93 E6 E6 00 60 32 A1 09 06 07 60 85 74 05 08 01 01 8A 02 07 80 8B 07 60 85 74 05 08 02 01 AC 06 80 04 6C 6E 74 31 BE 10 04 0E 01 00 00 00 06 5F 1F 04 00 20 1E 5D FF FF DE 42 7E
18:01:01
7E A0 2D 41 03 30 2E 66 E6 E7 00 61 1F A1 09 06 07 60 85 74 05 08 01 03 A2 03 02 01 01 A3 05 A1 03 02 01 0D BE 06 04 04 0E 01 06 00 3D 0E 7E
18:01:01 Disconnect request
18:01:01
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
Gurux.DLMS.GXDLMSException: Connection is permanently rejected. The application context name is not supported.
Meter expects Logical Name referencing with secured connection.
at GXDLMSDirector.GXDLMSCommunicator.InitializeConnection(Boolean force)
at GXDLMSDirector.GXDLMSDevice.InitializeConnection()
at GXDLMSDirector.MainForm.Connect(Object sender, GXAsyncWork work, Object[] parameters)
I have tried what you said,
correct me if i misunderstood something, thanks.
Hi,
Hi,
Try with this:
Try to connect with GXDLMSDirector. Set physical server address to 1. The authentication level is Low and the Client address is 0x20.
Select "Supported Services" and un-check "General block transfer". Your settings look correct. It might be that the meter is configured to use ciphering with a low authentication level. You can try a secured connection if you have block cipher and authentication keys.
BR,
Mikko
Hello,
Hello,
GXDLMSDirector 8.2.2202.0901
Log created 17:06:48
17:06:51 Initializing serial connection.
17:06:52 Send SNRM request.
7E A0 07 03 41 93 5A 64 7E
17:06:52
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
17:06:52 Parsing UA reply succeeded.
17:06:52 Send AARQ request.
7E A0 40 03 41 10 5F 93 E6 E6 00 60 32 A1 09 06 07 60 85 74 05 08 01 01 8A 02 07 80 8B 07 60 85 74 05 08 02 01 AC 06 80 04 6C 6E 74 31 BE 10 04 0E 01 00 00 00 06 5F 1F 04 00 00 1E 5D FF FF 4F 22 7E
17:06:52
7E A0 2D 41 03 30 2E 66 E6 E7 00 61 1F A1 09 06 07 60 85 74 05 08 01 03 A2 03 02 01 01 A3 05 A1 03 02 01 0D BE 06 04 04 0E 01 06 00 3D 0E 7E
17:06:52 Disconnect request
17:06:52
This is log i get when i use the settings as you said.
I dont have block cipher and authentication keys, but i have been ensured by the manufacturer that i can read without those. If nothings works i will search for those.
Thank You
Hi,
Hi,
Your settings are now exactly the same as in http://www.gurux.fi/node/18816
It looks like your meter expects ciphered connection.
BR,
Mikko
Hello sir,
Hello sir,
As it was convenient with python for now, I have tried communicating with the meter using block cipher and authentication keys
below is the log of that,
Sent snrm::7EA0070341935A647E
Recieved Snrm::7ea01e4103738e7f818012050180060180070400000001080400000001533b7e
SentAARQ:7EA070034110ADDFE6E6006062A109060760857405080103A60A04084C4E434C49454E548A0207808B0760857405080201AC0680046C6E7431BE340432213030000014F48E9888721E49AEF89B0C4D245E8042B80AFA04C9ECA058009589240CC7C7B8F66779F44850D1E75246F53AC5C87E
RecievedAARE::7ea0564103307efce6e7006148a109060760857405080103a203020100a305a103020100a40a04084c4e543937343236be230421281f300000005ac121db49c8d69a81b18a859e5776b597a1320cae2064a294a08e1b937e
This was the response i got for two attempts, then it stopped responding for sent AARQ,(is there a limit for attempts?)?
when i sent the next frame the next there was no reply for AARQ but a (error i guess) S frame with some value of it
Recieved AARQ::
NextFrame:7EA02C0341329F9FE6E600D01E30000014F6D497F3DE5A20F30B22A7FAB2168DC9DA2F26944782B048C0DB9EF07E
Response:7ea00741031f26ec7e
can you direct me in the right direction?
why it stopped responding,
and which standard or book(colour) to follow to understand "S Frame(value)" in this packet :> 7ea00741031f26ec7e
or simply serial communication using ciphering.
Thank you for all your time and help. !
Hi,
Hi,
Can you share the block cipher and authentication keys so I can check what the meter returns?
Without that information, there is not much to do.
DLMS is a very complicated protocol and there are lots of reasons why the meter doesn't reply.
BR,
Mikko
BR,
Mikko
Hello,
Hello,
can you help me understand about this reply/frame i get from meter when i send aarq frame with cipher details
SentAARQ with key and block cipher
7EA070034110ADDFE6E6006062A109060760857405080103A60A04084C4E434C49454E548A0207808B0760857405080201AC0680046C6E7431BE340432213030000014F48E9888721E49AEF89B0C4D245E8042B80AFA04C9ECA058009589240CC7C7B8F66779F44850D1E75246F53AC5C87E
Recieved o/p from meter:
7ea0564103307efce6e7006148a109060760857405080103a203020100a305a103020100a40a04084c4e543937343236be230421281f300000005ac121db49c8d69a81b18a859e5776b597a1320cae2064a294a08e1b937e
is this frame an indication of error in some sense?
Thank you
Hi,
Hi,
DLMS is a very complicated protocol and it's possible to just explain the content of the PDU, especially when PDU is ciphered. You can find this information from the DLMS Green Book if you are interested.
BR,
Mikko
Hello,
Hello,
Now, i am able to communicate with the meter.Indeed ciphering was required.
I do have the keys,iv,ic and block cipher, but I am unable to decrypt cyphertext back to plaintext, if I am not using guruxdirector.
I want to read data continuously, can you help me with this AAD part,
I am sharing the log below :
15:28:43 Initializing serial connection.
15:28:44 Send SNRM request.
7E A0 07 03 41 93 5A 64 7E
15:28:44
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
15:28:44 Parsing UA reply succeeded.
15:28:44 Send AARQ request.
7E A0 5F 03 41 10 07 E2 E6 E6 00 60 51 A1 09 06 07 60 85 74 05 08 01 03 A6 0A 04 08 4C 4E 43 4C 49 45 4E 54 8A 02 07 80 8B 07 60 85 74 05 08 02 01 AC 06 80 04 6C 6E 74 31 BE 23 04 21 21 1F 30 01 23 46 D2 C1 18 B3 48 31 02 2F FA 74 F7 0B DF 33 95 F8 5A E4 5D B5 1E BB 6E 30 12 4E B1 2F D2 7E
15:28:44
7E A0 56 41 03 30 7E FC E6 E7 00 61 48 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 37 34 32 36 BE 23 04 21 28 1F 30 00 00 01 C7 42 01 4F 4C 94 47 81 FD 19 F7 32 9E AB 7B BC FB AE 1F AE E4 62 45 96 D7 E5 B1 12 65 7E
15:28:44 Parsing AARE reply succeeded.
15:28:49 Read object type Data index: 2
7E A0 2C 03 41 32 9F 9F E6 E6 00 C8 1E 30 01 23 46 D3 86 36 36 34 14 78 73 5C 38 76 14 A9 05 BC 62 7A C5 BA 3F 6D 39 E7 0A 66 21 21 32 7E
If i can decrypt my AARQ plaintext back from ciphertext,
key=31323334353637383930313233343536
ic = 012346D0
systemTitle:4C4E434C49454E54
ciphertext=C1 18 B3 48 31 02 2F FA 74 F7 0B DF 33 95
tag=F8 5A E4 5D B5 1E BB 6E 30 12 4E B1
what should be the AAD? in my case
Thank you
Hi,
Hi,
This is not an easy task. I propose that you use our open source libraries to read your meter. You can make application you wish using C#, Java, Python ANSI C or ANSI C++.
BR,
Mikko
If you tell me the AAD, for
If you tell me the AAD, for this one message(above message) using your implementation/library, it can make things pretty easy for me and will search my way afterwards. security control byte=0x30
Looking forward to your positive reply.
Thank you
Hi,
Hi,
AAD is:
security control byte + authentication key.
BR,
Mikko
Hello sir,
Hello sir,
Thank you for all your time and response it was of great help and it all worked.
Amit Tiwari