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. Decrypt DLMS Wrapper Response and Map All Values With Obiscode

Decrypt DLMS wrapper response and map all values with obiscode

By sethi.nitin9@g… , 3 November, 2023
Forums
Gurux DLMS for Java

Hi,

I received one frame from meter in DLMS WPDU form and i want some code which can decrypt it and bring values from it.

Pasting string below and able to decrypt it from DLMSDirector, but not working with code. So please provide decryption code.

Response String:

000100010040011FDB0848504C00003D57F782011220000025EE31D455890110C632987946B5585A49D53B938A0DE04ABE688CFD7E2318A4685C61D36A5BC7B2C95341727273CF0978C851A5E95752770EFB78E054D37C62C371C1740124238F68B162EA2F25CF4D0DBE2B31044D4EE6DE5301D7D5E955C62CE5B2E6B91A221B02859313406099FA9AD50F99264B19157F414F5A5E73FFDDA08596FF10C46EA0C9F65E2FAD16E501175351FD9CD4FFCB7F55E166748BB8EA0DDCDFBA35E490715DAD6E6CE41A60FA37460F34D961C2E7C00C4F9B4441B9A6C18790F1A260872D0F537961D4A7206178DC2E4AE100F5B59213CD8FE35F6884E4C79739D907A46071D361F5F0787271D16C7D5D77CCCDBDB124EBF8E9FAFEBD2288125539663C01B0B34CE5B9C23F

Profile picture for user Kurumi

Kurumi

2 years 7 months ago

Hi, You can convert it to…

Hi,

You can convert it to XML using GXDLMSTranslator. Something like this:

GXByteBuffer bb = new GXByteBuffer();
bb.setHexString("RECEIVED_DATA");
GXDLMSTranslator t = new GXDLMSTranslator();
t.setBlockCipherKey(YOUR_KEY);
t.setAuthenticationKey(YOUR_KEY);
String xml = t.messageToXml(bb);

BR,
Mikko

sethi.nitin9@g…

2 years 7 months ago

Hi Kurumi, Yes, I am able to…

Hi Kurumi,

Yes, I am able to translate it in xml but how can we parse the value under CipheredService element.

<WRAPPER len="127" >
<TargetAddress Value="1" />
<SourceAddress Value="40" />
<PDU>
<GeneralGloCiphering>
<SystemTitle Value="48504C00003D57F7" />
<CipheredService Value="20000025EE31D455890110C632987946B5585A49D53B938A0DE04ABE688CFD7E2318A4685C61D36A5BC7B2C95341727273CF0978C851A5E95752770EFB78E054D37C62C371C1740124238F68B162EA2F25CF4D0DBE2B31044D4EE6DE5301D7D5E955C62CE5B2E6B91A221B02859313406099FA9AD50F99264B19157F414F5A5E73FFDDA08596FF10C46EA0C9F65E2FAD16E501175351FD9CD4FFCB7F55E166748BB8EA0DDCDFBA35E490715DAD6E6CE41A60FA37460F34D961C2E7C00C4F9B4441B9A6C18790F1A260872D0F537961D4A7206178DC2E4AE100F5B59213CD8FE35F6884E4C79739D907A46071D361F5F0787271D16C7D5D77CCCDBDB124EBF8E9FAFEBD2288125539663C01B0B34CE5B9C23F" />
</GeneralGloCiphering>
</PDU>
</WRAPPER>

Can you please let me know.

Regards,
Nitin

Profile picture for user Kurumi

Kurumi

2 years 7 months ago

Hi, You need to set comments…

Hi,
You need to set comments to true and you can see the content of encrypted data.

t.setComments(true);

BR,
Mikko

sethi.nitin9@g…

2 years 7 months ago

I did that but it starts…

I did that but it starts giving me invalid frame, below is the response:

Tag exists: variablename
Tag exists: variablename
Tag exists: dataaccesserror
Tag exists: data
Tag exists: mechanismname
Tag exists: time
Tag exists: datetime
Nov 09, 2023 6:14:45 PM gurux.dlms.secure.GXDLMSChippering decryptAesGcm
INFO: Decrypt settings: Security: ENCRYPTION InvocationCounter: 9710 SystemTitle: 48 50 4C 00 00 3D 57 F7 AuthenticationKey: BlockCipherKey:
Nov 09, 2023 6:14:45 PM gurux.dlms.secure.GXDLMSChippering decryptAesGcm
INFO: Encrypted: 31D455890110C632987946B5585A49D53B938A0DE04ABE688CFD7E2318A4685C61D36A5BC7B2C95341727273CF0978C851A5E95752770EFB78E054D37C62C371C1740124238F68B162EA2F25CF4D0DBE2B31044D4EE6DE5301D7D5E955C62CE5B2E6B91A221B02859313406099FA9AD50F99264B19157F414F5A5E73FFDDA08596FF10C46EA0C9F65E2FAD16E501175351FD9CD4FFCB7F55E166748BB8EA0DDCDFBA35E490715DAD6E6CE41A60FA37460F34D961C2E7C00C4F9B4441B9A6C18790F1A260872D0F537961D4A7206178DC2E4AE100F5B59213CD8FE35F6884E4C79739D907A46071D361F5F0787271D16C7D5D77CCCDBDB124EBF8E9FAFEBD2288125539663C01B0B34CE5B9C23F
null
java.lang.IllegalArgumentException: Invalid DLMS framing.
at gurux.dlms.GXDLMSTranslator.messageToXml(GXDLMSTranslator.java:637)
at gurux.dlms.DecryptDlms.translate(DecryptDlms.java:66)
at gurux.dlms.DecryptDlms.main(DecryptDlms.java:75)

Profile picture for user Kurumi

Kurumi

2 years 7 months ago

Hi, Check your block cipher…

Hi,

Check your block cipher and authentication keys. I believe they are not correct.

BR,
Mikko

sethi.nitin9@g…

2 years 6 months ago

Hi Kurumi! I have received…

Hi Kurumi!

I have received block ciphering and authentication keys. Now I want to arrange the response in readable format, Can you please help me on this.

Received String : 000100010030021BCC8202173000000116EE94FD09F82D9427E9B945881811F53540C84C3C9648978ED85B252F2DCBA3BD8BD3BFBC275B777DC9E0FB50C9D62652CCB3CB637EAD9828ED5E95AE99EB7ACF780A9CB75AB52D4AFF23B7DD5B9278FF708A249BF69A4650333602898FAA0F1C1C88C1AD5843580541AEA8CF6F4D01DBD96C408E0D860B6409BD4DF3C9D42030536A318716B8FB8AAD449B5DFF418B262DA0430E34C873F06625164DDBE712BCBF2258035E55B3CAE23A3AB09F00FF3E2CDCEEF80A0972674B51C0AFBC9B827B870110559B02636AAC1FC3BF2E7EF87827AD5C17CF63792E6F535B9DA333CF97F6A0B187AD5AE371B370A51BAA82B4388E69C16BE7B5F1136B3AAEA314B4CEE8C35E8F1C77EDB3AD9CC6D6EC7A2AC1672608695D0619563DBDC5545F3ED01C0F86DBFEC4D78BE58750BF3EBAB0AF2D98589A19276EB5021C236BE2A7CB4CBFD41C6ED5A8589321D1A5BCD29F4AF8A35E42418400C95CAB0FB03A9A809097338B40EC865332FB3BB9BCA123E5A0D0C1A98B55F9081BCBE76923FE635A385C5E500CC5797FBFD790A66DF5ACE16999CFF576FFFDE85BB8E679585CA006B63AD67F9F941564E28E8BAD702FDBA862ACDF18CC5F5E1DDBBD2E06AAE698FE9F1D0D3809B86F5D71522F38AE440D29D8FCC75D3923518F8C226A1F5D6358F8D2CC43E1BE3E005CB5C23C782A805978129A78EC83F8AC24F027F8D1E37C59732A3B81C66867ED5EA6900DFD3CBBCDA0CFF7D5A54416

XML converted above string looks like:
SharedSecret:
<WRAPPER len="223" >
<TargetAddress Value="1" />
<SourceAddress Value="30" />
<PDU>
<!--Decrypt data:
<Data="A126EBD2E738616925DBC0CF6DB45D7EDBB1E4186A4502DFCCC3A69C5977BA4A6C8B9FEBCF22C8EC0F1A50C1E801D77C1447B7A8B5201A46B01070BD34F02664FE55EBA904F6B70C50C60AC6974355164BB060751CBCBBD8C590321FED69FB12C67AA464C80E8C6C9DFAC5E047D3D2DFC7F34EEB890EEAD91079091BADB0BF8F9E9B82DC4F9DEB3F40375D4360D5928AC81F4F36E349BED735E462E460CF015DF4E45A86A247763F9D521265B503C5AAB701CE7C47D43C90711904EE871EA20E6BDCE4AE583515C0347EBDC20D76312526344383EB2C986F2A6BFAA5EE18BDD07266F49D35593168F75D4A523B87D9C8C730CFED51CB684D5FB4F6BA9EEF4292364622BCE0B3B64ADE1CA3669ABAB5FD310157E3A1E796A40BA2048A33EBD09C1BF7D35268CFC359D1D00B5DF5562A74D38159E24BA4DDBFA8ED6783432128246209CB04B47941DBCBBAA8BE8BE8F6DC675A0DD0EB89D0CC076743D1A47CB4E4A9BB129163CD22E50ADA7676D032CBE9642838E5D9435243C6CBB186FCE2C3FCF83AED1060A0141E50269BEEEA7DA5B2F5DBABDE510A3181F67834A28EA53A2D3B817DA3FDA227796BB17876F2D283E415016953BB4D6A6C7E1D300C34738FA0A4BD28FF12ADF49902BDF86F1B4E3256220DC372D7F24800F5E823AFA22C043D1A958B5CA88E6241941C4A1E3A611D5F7A47134F83B6293FE11656B123E159D48491510191" />
-->
<glo_GetResponse Value="3000000116EE94FD09F82D9427E9B945881811F53540C84C3C9648978ED85B252F2DCBA3BD8BD3BFBC275B777DC9E0FB50C9D62652CCB3CB637EAD9828ED5E95AE99EB7ACF780A9CB75AB52D4AFF23B7DD5B9278FF708A249BF69A4650333602898FAA0F1C1C88C1AD5843580541AEA8CF6F4D01DBD96C408E0D860B6409BD4DF3C9D42030536A318716B8FB8AAD449B5DFF418B262DA0430E34C873F06625164DDBE712BCBF2258035E55B3CAE23A3AB09F00FF3E2CDCEEF80A0972674B51C0AFBC9B827B870110559B02636AAC1FC3BF2E7EF87827AD5C17CF63792E6F535B9DA333CF97F6A0B187AD5AE371B370A51BAA82B4388E69C16BE7B5F1136B3AAEA314B4CEE8C35E8F1C77EDB3AD9CC6D6EC7A2AC1672608695D0619563DBDC5545F3ED01C0F86DBFEC4D78BE58750BF3EBAB0AF2D98589A19276EB5021C236BE2A7CB4CBFD41C6ED5A8589321D1A5BCD29F4AF8A35E42418400C95CAB0FB03A9A809097338B40EC865332FB3BB9BCA123E5A0D0C1A98B55F9081BCBE76923FE635A385C5E500CC5797FBFD790A66DF5ACE16999CFF576FFFDE85BB8E679585CA006B63AD67F9F941564E28E8BAD702FDBA862ACDF18CC5F5E1DDBBD2E06AAE698FE9F1D0D3809B86F5D71522F38AE440D29D8FCC75D3923518F8C226A1F5D6358F8D2CC43E1BE3E005CB5C23C782A805978129A78EC83F8AC24F027F8D1E37C59732A3B81C66867ED5EA6900DFD3CBBCDA0CFF7D5A54416" />
</PDU>
</WRAPPER>

Now I want to create it in readable format(mean decode values from this DLMS string). Please let me know how I can do that.

Thanks,

Profile picture for user Kurumi

Kurumi

2 years 6 months ago

Hi, You can use the client…

Hi,

You can use the client example to read your meter if you have the correct keys.

https://github.com/Gurux/gurux.dlms.java/tree/master/gurux.dlms.client…

you need to give arguments like:
-h YOUR_HOST_NAME -p YOUR_IP-PORT -i WRAPPER -C AuthenticationEncryption -B YOUR_CLOCK_KEY -A YOUR_AUTHENTICATION KEY

BR,
Mikko

sethi.nitin9@g…

2 years 6 months ago

Hi, I have received the…

Hi,

I have received the response on MQTT, I just need to parse the DLMS string which I have pasted in above comment and fetch values from that DLMS string like obiscode and it's values.

Regards,
Nitin

Profile picture for user Kurumi

Kurumi

2 years 6 months ago

Hi, Because the content is…

Hi,

Because the content is encrypted, I don't know what data you have received. I believe that this is a push message that the meter has sent and you haven't read anything from the meter.

Try to convert this to XML as I told you before.
https://www.gurux.fi/comment/26952#comment-26952

BR,
Mikko

sethi.nitin9@g…

2 years 6 months ago

Hi Kurumi! As suggested I…

Hi Kurumi!

As suggested I have converted the received response from meter to XML first, Now can you please provide me some piece of code which can convert this Decrypt data to readable format.

Below Sample Received Response:

Clock Response:
0001000100300025CC2330000000F837BE8DC5559F1D05413035C32C033463FFA1CAFDE9EF92AD0D0DA5F1CBEF

Converted to XML:

Invocation Counter: 10420
Tag exists: variablename
Tag exists: variablename
Tag exists: dataaccesserror
Tag exists: data
Tag exists: mechanismname
Tag exists: time
Tag exists: datetime
Nov 20, 2023 2:28:29 PM gurux.dlms.secure.GXDLMSChippering decryptAesGcm
INFO: Decrypt settings: Security: AUTHENTICATION_ENCRYPTION InvocationCounter: 248 SystemTitle: 48 50 4C 32 30 32 31 35 AuthenticationKey: 31 32 33 34 41 42 43 44 31 32 33 34 41 42 43 44 BlockCipherKey: 31 32 33 34 41 42 43 44 31 32 33 34 41 42 43 44
Nov 20, 2023 2:28:29 PM gurux.dlms.secure.GXDLMSChippering decryptAesGcm
INFO: Encrypted: 37BE8DC5559F1D05413035C32C033463FFA1CAFDE9EF92AD0D0DA5F1CBEF
SharedSecret:
<WRAPPER len="2D" >
<TargetAddress Value="1" />
<SourceAddress Value="30" />
<PDU>
<!--Decrypt data:
<Data="FF3350749904A2EE048948186D8CA02C20" />
-->
<glo_GetResponse Value="30000000F837BE8DC5559F1D05413035C32C033463FFA1CAFDE9EF92AD0D0DA5F1CBEF" />
</PDU>
</WRAPPER>

Profile picture for user Kurumi

Kurumi

2 years 6 months ago

Hi, Because the push…

Hi,

Because the push notification succeeded (1st message), your meter is using a different block cipher key for broadcast messages, or your system title is different.

BR,
Mikko

sethi.nitin9@g…

2 years 6 months ago

Hi Kurumi! Right 1st message…

Hi Kurumi!

Right 1st message was the push message, last one was the clock DLMS string received on MQTT from meter. So I want to decode that.

Below are the credentials we are using:

GXDLMSSecureClient dlms3 = new GXDLMSSecureClient();
dlms3.setServerAddress(1);
dlms3.setClientAddress(48);
dlms3.setAuthentication(Authentication.HIGH); dlms3.setPassword("bbbbbbbbbbbbbbbb".getBytes("ASCII")); dlms3.getCiphering().setSecurity(Security.AUTHENTICATION_ENCRYPTION);
dlms3.setUseLogicalNameReferencing(true); dlms3.getCiphering().setSystemTitle("HPL20215".getBytes("ASCII")); dlms3.getCiphering().setBlockCipherKey("1234ABCD1234ABCD".getBytes("ASCII")); dlms3.getCiphering().setAuthenticationKey("1234ABCD1234ABCD".getBytes("ASCII"));
dlms3.setInterfaceType(InterfaceType.WRAPPER);

Profile picture for user Kurumi

Kurumi

2 years 6 months ago

Hi, Data parsing fails…

Hi,

Data parsing fails because the server system title is not set.

t.serverSystemTitle = METER_SYSTEM_TITLE

Each meter has its own system title, but you can get the meter system title from the AARE message.

BR,
Mikko

sethi.nitin9@g…

2 years 6 months ago

AARQ TX:…

AARQ
TX: 000100100001001f601da109060760857405080101be10040e01000000065f1f0400001e1dffff
RX: 000100010010002B6129A109060760857405080101A203020100A305A103020100BE10040E0800065F1F040000001002260007

power event values: index 2
TX: 0001003000010020C81E30000028C958A823EB2FE0ECD19355EB803860847849F12531B611EDDB14

RX: 0001000100300221CC82021D3000000138A245600FC33C9651896D10AF89ADFB7DEF8DCB6BF542005F305464CCB235DA9466F8C7C8BDF96A84537C3451012195714BBCD8E26279473F581430A8826F90370C724FA051C01596309EAB4AB17290A085BA624A28D1CA7900AEEDB4C0B2490B1FDC7CE81AD979ED49C008AA44F8A8A5E3CCEB4A1D5F0C1799A0EEDF9C200F135DA69E9E7414171F89FB7D7A34AE622FAE2BAC291E5B7485D6B48214B26FBC4EEBE93888923BD1BE8920266697C4285BCDC7229583E2467390A3A742F915D553CD723C3B262C50B03BA8E84675DAE4571CFBEAFE6767E5917AA8F08B4662DE11E9A9AE895345D00F2166B328F383A2AB888074143DFD35CC00C288C2771BAA9468E1B46FBD4A9A90AA17E902CCEBAC51D86105969326E022BB948E3FE2DCB2A0FAE5802CF545395C42F12E853D4D1445C25D9D84403E951B6ED834758B969A27734412BD028CAF6341C3CA4465F063F393AAB809F46582EC52834C7A737C42C56C3A350E0E01EEBD2524E28D1BE19B271F0046F4FF9F5309855FC8D18C2FC784E0EEE5E8744850323EE3EA04BFDBD9BE5AD18FC93BB6D4292DEC30D2F8FE856A47617D91450D27C4DD19B73CB10D471F6D46DF3A4DEFB529B1F6E03474E167801D031C7F7623B8570525F38C576602AF1CA33E56D36C44D36AEF4CF3FC1E242083060DC2FBFA7C2993EC441BE5B4A0D43B9BE520289796F59F32E551144F865C5EA9922956BE8353AB7D110BC67B40604B57751701C8C07E

Code Used:-

GXByteBuffer bb = new GXByteBuffer();
bb.setHexString(hexData);
GXDLMSTranslator t = new GXDLMSTranslator(TranslatorOutputType.SIMPLE_XML);
t.setSystemTitle("HPL20215".getBytes("ASCII"));
t.setAuthenticationKey("1234ABCD1234ABCD".getBytes("ASCII")); t.setBlockCipherKey("1234ABCD1234ABCD".getBytes("ASCII"));
t.setComments(true);
String xml = t.messageToXml(bb);
System.out.println(xml);

Parsed xml of power event from code:
SharedSecret:
<WRAPPER len="229" >
<TargetAddress Value="1" />
<SourceAddress Value="30" />
<PDU>
<!--Decrypt data:
<Data="A714654D8E83158D0F0F1DED880BB81ADBDF522EC7994D2435E83EF821853F2B60F1707E72ED4C6C9A4E8C1DC4CAC6D332608EF889DC4D96357B804A21BC0D442EBADF49B34720F60BC5622AD8BEA142C091AB2B7300A8F10DFC34F607E1EB81378274EF03C4308FCDC294CC6FABDAA0C4EF8DF9D2B96B4503BBF8CB808430478E16E3BFCC120D1875D09D94B1BDA316E77B67E697C3053A34D3A1B08024A19B991FB60EF42A203347FE0371C0D6E9B3554A4B38427B9DFEA0EC314B11AE547498F4830A91000D225F82BD94AEC4B2E1DCC477AA1EE9D8E0EA52092A7482677D1397316E0511CFA747FE342B6E38DBD405D375924E82560F46C9FE7F12BB1941F517EC28C9C3922C8E64A1E4CB52EC9F27D2463B61C18050C4065D93237D4DCE2821D70413DCA7ACF326803CC505F13A4895E0BCCEF8DB37CF718AE0DC9B861E8255060AA5AC4B90343DE44377C09CF155DFAC4836107C16A9443CE8D6FD6A83705497DE9C7441E7C672E5C7FEE9A55FD535A2850172F6803D369D802F766EE3D910516192327C28250E25C03CA88EE232D40EA8512E4010ED4C5BB81C11BCE213BE094B9847C85D1B3451B4A8E9501E69EAA1AB29654D2B3A0880A7CF2EEA3686FBE4481DD40C4913E0EDA50AAD5618A97B94E1207D0D7123D49C42619922D472B6204677D08F0C3445578E371C0A1559649C39E65E583E2BA2E6C53F1D3EE68EE2060EB4B9849E3D6E14" />
-->
<glo_GetResponse Value="3000000138A245600FC33C9651896D10AF89ADFB7DEF8DCB6BF542005F305464CCB235DA9466F8C7C8BDF96A84537C3451012195714BBCD8E26279473F581430A8826F90370C724FA051C01596309EAB4AB17290A085BA624A28D1CA7900AEEDB4C0B2490B1FDC7CE81AD979ED49C008AA44F8A8A5E3CCEB4A1D5F0C1799A0EEDF9C200F135DA69E9E7414171F89FB7D7A34AE622FAE2BAC291E5B7485D6B48214B26FBC4EEBE93888923BD1BE8920266697C4285BCDC7229583E2467390A3A742F915D553CD723C3B262C50B03BA8E84675DAE4571CFBEAFE6767E5917AA8F08B4662DE11E9A9AE895345D00F2166B328F383A2AB888074143DFD35CC00C288C2771BAA9468E1B46FBD4A9A90AA17E902CCEBAC51D86105969326E022BB948E3FE2DCB2A0FAE5802CF545395C42F12E853D4D1445C25D9D84403E951B6ED834758B969A27734412BD028CAF6341C3CA4465F063F393AAB809F46582EC52834C7A737C42C56C3A350E0E01EEBD2524E28D1BE19B271F0046F4FF9F5309855FC8D18C2FC784E0EEE5E8744850323EE3EA04BFDBD9BE5AD18FC93BB6D4292DEC30D2F8FE856A47617D91450D27C4DD19B73CB10D471F6D46DF3A4DEFB529B1F6E03474E167801D031C7F7623B8570525F38C576602AF1CA33E56D36C44D36AEF4CF3FC1E242083060DC2FBFA7C2993EC441BE5B4A0D43B9BE520289796F59F32E551144F865C5EA9922956BE8353AB7D110BC67B40604B57751701C8C07E" />
</PDU>
</WRAPPER>

I don't see any method in translator to set: t.serverSystemTitle = METER_SYSTEM_TITLE.

Can you please help me on this.

Profile picture for user Kurumi

Kurumi

2 years 6 months ago

Hi, The server system title…

Hi,

The server system title is coming only in ciphered connections. Your AARQ is without ciphering. System title HPL20215 is the client's system title. You can parse client messages using that, but you need the server system title to parse server messages.

BR,
Mikko

sethi.nitin9@g…

2 years 6 months ago

TX:…

TX: 000100300001005F605DA109060760857405080103A60A040848504C32303231358A0207808B0760857405080202AC128010191D103362491A676A6C6C382B304658BE230421211F300000288C066CA4672EB78A86ED4C291DCD32B4187E0A12901DEEE522D50B
RX: 000100010030006B6169A109060760857405080103A203020100A305A10302010EA40A040848504C00003D57F788020780890760857405080202AA1280106162636465666768696A6B6C6D6E6F70BE230421281F3000000114E2C1A9C07C856EF4671659211C29064BAD9E0BBB6988E7C83B42

Above one is ciphered one, now how can I extract value from this and where to set for parsing.

Profile picture for user Kurumi

Kurumi

2 years 6 months ago

Hi, You need to set the…

Hi,

You need to set the server system title like this:

GXDLMSTranslator t = new GXDLMSTranslator();
t.setSystemTitle(GXCommon.hexToBytes("48 50 4C 32 30 32 31 35"));
t.setServerSystemTitle(GXCommon.hexToBytes("48 50 4C 00 00 3D 57 F7"));
t.setBlockCipherKey(GXCommon
.hexToBytes("31 32 33 34 41 42 43 44 31 32 33 34 41 42 43 44"));
t.setAuthenticationKey(GXCommon
.hexToBytes("31 32 33 34 41 42 43 44 31 32 33 34 41 42 43 44"));
t.setComments(true);
String xml = t.messageToXml(YOUR_WRAPPER_FRAME);

BR,
Mikko

sethi.nitin9@g…

2 years 6 months ago

Hi, thanks kurumi, its…

Hi,

thanks kurumi, its worked to parse xml. It looks like below xml. Please let me know if it is correct. Now I want to extract values from that RAW Data.

<WRAPPER len="229" >
<TargetAddress Value="1" />
<SourceAddress Value="30" />
<PDU>
<!-- Decrypt data: C4 02 C1 00 00 00 00 01 00 82 02 00 01 1A 02 03 09 0C 07 E7 08 08 FF 10 39 00 FF 01 4A FF 12 00 65 0A 09 4D 45 34 30 32 30 32 31 35 02 03 09 0C 07 E7 08 08 FF 11 08 00 FF 01 4A FF 12 00 66 0A 09 4D 45 34 30 32 30 32 31 35 02 03 09 0C 07 E7 0A 08 FF 0E 28 00 FF 01 4A FF 12 00 65 0A 09 4D 45 34 30 32 30 32 31 35 02 03 09 0C 07 E7 0A 08 FF 0E 2F 00 FF 01 4A FF 12 00 66 0A 09 4D 45 34 30 32 30 32 31 35 02 03 09 0C 07 E7 0A 08 FF 0E 30 00 FF 01 4A FF 12 00 65 0A 09 4D 45 34 30 32 30 32 31 35 02 03 09 0C 07 E7 0A 08 FF 0F 0B 00 FF 01 4A FF 12 00 66 0A 09 4D 45 34 30 32 30 32 31 35 02 03 09 0C 07 E7 0A 08 FF 0F 0B 00 FF 01 4A FF 12 00 65 0A 09 4D 45 34 30 32 30 32 31 35 02 03 09 0C 07 E7 0A 08 FF 0F 11 00 FF 01 4A FF 12 00 66 0A 09 4D 45 34 30 32 30 32 31 35 02 03 09 0C 07 E7 0A 0D FF 11 05 00 FF 01 4A FF 12 00 65 0A 09 4D 45 34 30 32 30 32 31 35 02 03 09 0C 07 E7 0A 0D FF 11 0C 00 FF 01 4A FF 12 00 66 0A 09 4D 45 34 30 32 30 32 31 35 02 03 09 0C 07 E7 0A 0F FF 09 20 00 FF 01 4A FF 12 00 65 0A 09 4D 45 34 30 32 30 32 31 35 02 03 09 0C 07 E7 0A 0F FF 0D 16 00 FF 01 4A FF 12 00 66 0A 09 4D 45 34 30 32 30 32 31 35 02 03 09 0C 07 E7 0A 10 FF 08 2E 00 FF 01 4A FF 12 00 65 0A 09 4D 45 34 30 32 30 32 31 35 02 03 09 0C 07 E7 0A 13 FF 0E 37 00 FF 01 4A FF 12 00 66 0A 09 4D 45 34 30 32 30 32 31 35 02 03 09 0C 07 E7 08 16 FF 15 25 00 FF 01 4A FF 12 00 65 0A 09 4D 45 34 30 32 30 32 31 35 02 03 09 0C 07 E7 08 17 FF 09 37 00 FF 01 4A FF 12 00 66 0A 09 4D 45 34 30 32 30 32 31 35 02 03 09 0C 07 E7 08 17 FF 0B 01 00 FF 01 4A FF 12 00 65 0A 09 4D 45 34 30 32 30 32 31 35
<GetResponse>
<GetResponsewithDataBlock>
# Priority: HIGH ServiceClass: CONFIRMED InvokeID: 1
<InvokeIdAndPriority Value="C1" />
<Result>
<LastBlock Value="00" />
<BlockNumber Value="00000001" />
<Result>
<RawData Value="011A0203090C07E70808FF103900FF014AFF1200650A094D45343032303231350203090C07E70808FF110800FF014AFF1200660A094D45343032303231350203090C07E70A08FF0E2800FF014AFF1200650A094D45343032303231350203090C07E70A08FF0E2F00FF014AFF1200660A094D45343032303231350203090C07E70A08FF0E3000FF014AFF1200650A094D45343032303231350203090C07E70A08FF0F0B00FF014AFF1200660A094D45343032303231350203090C07E70A08FF0F0B00FF014AFF1200650A094D45343032303231350203090C07E70A08FF0F1100FF014AFF1200660A094D45343032303231350203090C07E70A0DFF110500FF014AFF1200650A094D45343032303231350203090C07E70A0DFF110C00FF014AFF1200660A094D45343032303231350203090C07E70A0FFF092000FF014AFF1200650A094D45343032303231350203090C07E70A0FFF0D1600FF014AFF1200660A094D45343032303231350203090C07E70A10FF082E00FF014AFF1200650A094D45343032303231350203090C07E70A13FF0E3700FF014AFF1200660A094D45343032303231350203090C07E70816FF152500FF014AFF1200650A094D45343032303231350203090C07E70817FF093700FF014AFF1200660A094D45343032303231350203090C07E70817FF0B0100FF014AFF1200650A094D4534303230323135" />
</Result>
</Result>
</GetResponsewithDataBlock>
</GetResponse>
-->
<glo_GetResponse Value="3000000138A245600FC33C9651896D10AF89ADFB7DEF8DCB6BF542005F305464CCB235DA9466F8C7C8BDF96A84537C3451012195714BBCD8E26279473F581430A8826F90370C724FA051C01596309EAB4AB17290A085BA624A28D1CA7900AEEDB4C0B2490B1FDC7CE81AD979ED49C008AA44F8A8A5E3CCEB4A1D5F0C1799A0EEDF9C200F135DA69E9E7414171F89FB7D7A34AE622FAE2BAC291E5B7485D6B48214B26FBC4EEBE93888923BD1BE8920266697C4285BCDC7229583E2467390A3A742F915D553CD723C3B262C50B03BA8E84675DAE4571CFBEAFE6767E5917AA8F08B4662DE11E9A9AE895345D00F2166B328F383A2AB888074143DFD35CC00C288C2771BAA9468E1B46FBD4A9A90AA17E902CCEBAC51D86105969326E022BB948E3FE2DCB2A0FAE5802CF545395C42F12E853D4D1445C25D9D84403E951B6ED834758B969A27734412BD028CAF6341C3CA4465F063F393AAB809F46582EC52834C7A737C42C56C3A350E0E01EEBD2524E28D1BE19B271F0046F4FF9F5309855FC8D18C2FC784E0EEE5E8744850323EE3EA04BFDBD9BE5AD18FC93BB6D4292DEC30D2F8FE856A47617D91450D27C4DD19B73CB10D471F6D46DF3A4DEFB529B1F6E03474E167801D031C7F7623B8570525F38C576602AF1CA33E56D36C44D36AEF4CF3FC1E242083060DC2FBFA7C2993EC441BE5B4A0D43B9BE520289796F59F32E551144F865C5EA9922956BE8353AB7D110BC67B40604B57751701C8C07E" />
</PDU>
</WRAPPER>

Now I want

sethi.nitin9@g…

2 years 6 months ago

Hi Kurumi, Thanks for all…

Hi Kurumi,

Thanks for all the help!!! I'm able to parse the data.

<WRAPPER len="57" >
<TargetAddress Value="1" />
<SourceAddress Value="30" />
<PDU>
<!-- Decrypt data: C4 01 C1 00 01 03 02 04 12 00 08 09 06 00 00 01 00 00 FF 0F 02 12 00 00 02 04 12 00 01 09 06 00 00 60 0B 02 FF 0F 02 12 00 00 02 04 12 00 01 09 06 00 00 60 01 00 FF 0F 02 12 00 00
<GetResponse>
<GetResponseNormal>
# Priority: HIGH ServiceClass: CONFIRMED InvokeID: 1
<InvokeIdAndPriority Value="C1" />
<Result>
<Data>
<Array Qty="03" >
<Structure Qty="04" >
<UInt16 Value="0008" />
# 0.0.1.0.0.255
<OctetString Value="0000010000FF" />
<Int8 Value="02" />
<UInt16 Value="0000" />
</Structure>
<Structure Qty="04" >
<UInt16 Value="0001" />
# 0.0.96.11.2.255
<OctetString Value="0000600B02FF" />
<Int8 Value="02" />
<UInt16 Value="0000" />
</Structure>
<Structure Qty="04" >
<UInt16 Value="0001" />
# 0.0.96.1.0.255
<OctetString Value="0000600100FF" />
<Int8 Value="02" />
<UInt16 Value="0000" />
</Structure>
</Array>
</Data>
</Result>
</GetResponseNormal>
</GetResponse>
-->
<glo_GetResponse Value="3000000137238FE35AF27CD0112CE74FD11D8D1BBEE6FDD144D9D097B095264525AA5224B7EAAB92524FDB10C2464EF01599B61F7FFBAB662C7982B0302A18BD7971E80FF37303C370D1226EAD" />
</PDU>
</WRAPPER>

[[[B@13fee20c, 101, ME4020215], [[B@4e04a765, 102, ME4020215], [[B@783e6358, 101, ME4020215], [[B@17550481, 102, ME4020215], [[B@735f7ae5, 101, ME4020215], [[B@180bc464, 102, ME4020215], [[B@1324409e, 101, ME4020215], [[B@2c6a3f77, 102, ME4020215], [[B@246ae04d, 101, ME4020215], [[B@62043840, 102, ME4020215], [[B@5315b42e, 101, ME4020215], [[B@2ef9b8bc, 102, ME4020215], [[B@5d624da6, 101, ME4020215], [[B@1e67b872, 102, ME4020215], [[B@60addb54, 101, ME4020215], [[B@3f2a3a5, 102, ME4020215], [[B@4cb2c100, 101, ME4020215]]

  • 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
RSS feed
Privacy FAQ GXDN Issues Contact
Follow Gurux on Twitter Follow Gurux on Linkedin