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. How To Parse Decrypted MBUS Data Package

How to parse decrypted MBUS data package

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 Norbert , 21 September, 2022
Forums
Gurux.DLMS

Hello
below you can find the data from "Vorarlberg Netz", decryption was done by GXDLMSTranslator.
Is this a valid message ? And how are the next steps to get the OBIS values for voltage, current and active power ?
Thanks
Norbert

<WiredMBus len="FE" >
<TargetAddress Value="67" />
<SourceAddress Value="1" />
</WiredMBus>
<WiredMBus len="76" >
<TargetAddress Value="67" />
<SourceAddress Value="1" />
<GeneralGloCiphering>
<SystemTitle Value="4B464D102002385E" />
<CipheredService Value="21000609674A1A6FA3D7C480FC3B42F96052E6D2435E3E97DB281C887929B2ED09A1C0C5EB7C64DFE791BD7E41EF209D8F3D90A16E60FB46C41CEE5B4BDF7E4D588C20EAD72A0859AAA444D62118E102AB0AD2F46DB919400523899B4E3660B11955ECB7B6B8041FED91B3B0CAD088807FACBE4F371489D4FD392064D77DFDE392F355D996613039F959DB594F3F2D326D8AFB1C6455CECEB046870FB5A2D5AABCB9DC54456F7FCA82E87BA29880AAFB25DA557B8DF7ACE4D4DEA778575756E52BA413EF4ABF80463B69A832A42CF5EF3E2D2DBD6E758D9C128BC7B5CB628C1C32C13DC3FC3BC2442F102830C6B3E2257463CD49A82DFF9CEE7D9D14C3780F8A2CB3AC071C330A6CD6EDA52D55D5365453C1AB48CEC452CE56A45C523260F5CBEBAB7AF966AE21FF9BB8F38A31AB4B588E9FD70BE" />
</GeneralGloCiphering>
</WiredMBus>

Profile picture for user Kurumi

Kurumi

3 years 8 months ago

Hi Norbert,

Hi Norbert,

You need to ask block cipher key from Vorarlberg Netz. Block cipher key is 32 bytes long value that is needed to decrypt the message. Without that key, you can't decrypt the message.

When you have the key, select the "Ciphering" tab and set it for the "Block cipher key" field.
Then press the Translate button again and you can see the values if the key is correct.

BR,
Mikko

Norbert

3 years 8 months ago

Hi Mikko,

Hi Mikko,
sorry for being unclear. the message above is the output from the translator (see code below).
For another smartmeter (EVN) it's working. But I don't get it working for Vorarlberg Netz. Any idea ?
thanks
Norbert

msg = GXDLMSTranslatorMessage()
msg.message = GXByteBuffer(self._buffer)
xml = ""
pdu = GXByteBuffer()
translator.completePdu = True
while translator.findNextFrame(msg, pdu):
pdu.clear()
xml += translator.messageToXml(msg)

Profile picture for user Kurumi

Kurumi

3 years 8 months ago

Hi Norbert,

Hi Norbert,

You were very clear. Translated XML means that data is ciphered (encrypted). You need to correct block cipher key from the Vorarlberg Netz to decrypt the received data. Do you have it? It's 16 bytes long hex value. Without that, you can't decrypt the received data.

BR,
Mikko

Norbert

3 years 8 months ago

Hi Mikko

Hi Mikko
I do this for a member of the community. He has the cipher key from Vorarlberg Netz. I have running your Python code for EVN successfully. The message from the Vorarlberg Netz smartmeter is longer than from EVN. Is the XML above a valid result from the decryption using the cipher key from Vorarlberg Netz ?
Thanks
Norbert

Profile picture for user Kurumi

Kurumi

3 years 8 months ago

Hi Norbert,

Hi Norbert,

The XML is encrypted data. Decryption fails and I believe that your block cipher key is not correct. You can see parsed data when decryption succeeded.

If you can send the block cipher key to me by email I can check why it fails.

BR,
Mikko

Profile picture for user Kurumi

Kurumi

3 years 8 months ago

Hi Norbert,

Hi Norbert,

PDU is coming in two WirelessMBus frames. You need to get them both before data can be decrypted.

Get example from the Github. Change Interface type from HDLC to WirelessMBus and set Block cipher key.
client.Ciphering.BlockCipherKey = YOUR_KEY;

If you send your hex messages as raw bytes for the port 4059 it will show the received data as below.

https://github.com/Gurux/Gurux.DLMS.Net/blob/f28f4989c6253f0fe872cabd16…

BR,
Mikko

<!-- DLMS system title:
Manufacturer Code: KFM
Serial number: [REMOVED]
-->
<!-- Invocation Counter: 395623 -->
<DataNotification>
# Invoke ID: 391826
<LongInvokeIdAndPriority Value="0005FA92" />
# 29.8.2022 11.51.45
<DateTime Value="07E6081D010A332D00FF8880" />
<NotificationBody>
<DataValue>
<Structure Qty="10" >
# 0.0.1.0.0.255
<OctetString Value="0000010000FF" />
# 29.8.2022 10.51.45+02:00
<OctetString Value="07E6081D010A332D00FF8880" />
<Structure Qty="02" >
# 0.0.96.1.0.255
<OctetString Value="0000600100FF" />
<OctetString Value="[REMOVED]" />
</Structure>
<Structure Qty="02" >
# 0.0.42.0.0.255
<OctetString Value="00002A0000FF" />
<OctetString Value="[REMOVED]" />
</Structure>
<Structure Qty="03" >
# 1.0.32.7.0.255
<OctetString Value="0100200700FF" />
<UInt16 Value="0925" />
<Structure Qty="02" >
<Int8 Value="FFFFFFFFFFFFFFFF" />
<Enum Value="23" />
</Structure>
</Structure>
<Structure Qty="03" >
# 1.0.52.7.0.255
<OctetString Value="0100340700FF" />
<UInt16 Value="0911" />
<Structure Qty="02" >
<Int8 Value="FFFFFFFFFFFFFFFF" />
<Enum Value="23" />
</Structure>
</Structure>
<Structure Qty="03" >
# 1.0.72.7.0.255
<OctetString Value="0100480700FF" />
<UInt16 Value="091A" />
<Structure Qty="02" >
<Int8 Value="FFFFFFFFFFFFFFFF" />
<Enum Value="23" />
</Structure>
</Structure>
<Structure Qty="03" >
# 1.0.31.7.0.255
<OctetString Value="01001F0700FF" />
<UInt16 Value="0169" />
<Structure Qty="02" >
<Int8 Value="FFFFFFFFFFFFFFFE" />
<Enum Value="21" />
</Structure>
</Structure>
<Structure Qty="03" >
# 1.0.51.7.0.255
<OctetString Value="0100330700FF" />
<UInt16 Value="012A" />
<Structure Qty="02" >
<Int8 Value="FFFFFFFFFFFFFFFE" />
<Enum Value="21" />
</Structure>
</Structure>
<Structure Qty="03" >
# 1.0.71.7.0.255
<OctetString Value="0100470700FF" />
<UInt16 Value="0102" />
<Structure Qty="02" >
<Int8 Value="FFFFFFFFFFFFFFFE" />
<Enum Value="21" />
</Structure>
</Structure>
<Structure Qty="03" >
# 1.0.1.7.0.255
<OctetString Value="0100010700FF" />
<UInt32 Value="00000000" />
<Structure Qty="02" >
<Int8 Value="00" />
<Enum Value="1B" />
</Structure>
</Structure>
<Structure Qty="03" >
# 1.0.2.7.0.255
<OctetString Value="0100020700FF" />
<UInt32 Value="00000738" />
<Structure Qty="02" >
<Int8 Value="00" />
<Enum Value="1B" />
</Structure>
</Structure>
<Structure Qty="03" >
# 1.0.1.8.0.255
<OctetString Value="0100010800FF" />
<UInt32 Value="0011928A" />
<Structure Qty="02" >
<Int8 Value="00" />
<Enum Value="1E" />
</Structure>
</Structure>
<Structure Qty="03" >
# 1.0.2.8.0.255
<OctetString Value="0100020800FF" />
<UInt32 Value="00216330" />
<Structure Qty="02" >
<Int8 Value="00" />
<Enum Value="1E" />
</Structure>
</Structure>
<Structure Qty="03" >
# 1.0.3.8.0.255
<OctetString Value="0100030800FF" />
<UInt32 Value="00012FA5" />
<Structure Qty="02" >
<Int8 Value="00" />
<Enum Value="20" />
</Structure>
</Structure>
<Structure Qty="03" >
# 1.0.4.8.0.255
<OctetString Value="0100040800FF" />
<UInt32 Value="0019286B" />
<Structure Qty="02" >
<Int8 Value="00" />
<Enum Value="20" />
</Structure>
</Structure>
</Structure>
</DataValue>
</NotificationBody>
</DataNotification>
-->
<GeneralGloCiphering>
<SystemTitle Value="4B464D102002385E" />
<CipheredService Value="21000609674A1A6FA3D7C480FC3B42F96052E6D2435E3E97DB281C887929B2ED09A1C0C5EB7C64DFE791BD7E41EF209D8851811655C768F3D90A16E60FB46C41CEE5B4BDF7E4D588C20EAD72A0859AAA444D62118E102AB0AD2F46DB919400523899B4E3660B11955ECB7B6B8041FED91B3B0CAE37991F7A04B8D088807FACBE4F371489D4FD392064D77DFDE392F355D996613039F959DB594F3F2D326D8AFB1C6455CECEB046870FB5A2D5AABCB9DC54456F7FCA82E8B75CBED569DFB7BA29880AAFB25DA557B8DF7ACE4D4DEA778575756E52BA413EF4ABF80463B69A832A42CF5EF3E2D2DBD6E758D9C128BC7B5CB628C1C32C13DC3FC3BC2FBAB30D9BAF4F442F102830C6B3E2257463CD49A82DFF9CEE7D9D14C3780F8A2CB3AC071C330A6CD6EDA52D55D5365453C1AB48CEC452CE56A45C523260F5CBEBAB7AF961BED547311BB66AE21FF9BB8F38A31AB4B588E9FD70BE" />
</GeneralGloCiphering>

Norbert

3 years 8 months ago

Hi Mikko

Hi Mikko
thanks for your explanation.
The smartmeter provides the data over serial MBus, and the format is WirelessMBus ...
Do you have a Python code snippet for this ? What have to be changed based on the code of item #3 ?
Thanks
Norbert

Profile picture for user Kurumi

Kurumi

3 years 8 months ago

Hi,

Hi,

My bad. Your meter is using wired MBus, Not wireless.
You can use this to receive the data from your meter. You need to do the changes as I described earlier.

https://github.com/Gurux/Gurux.DLMS.Python/tree/master/Gurux.DLMS.Push…

BR,
Mikko

greenMike

3 years 7 months ago

Hello Norbert

Hello Norbert
I think i write the code you post here #3.

I am also interessted to find a solution.
Please write me an email (mreitbauer@gmx.net) and i try to help you.
BR Michael

  • 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