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. D2 FrameType Not Parsed Correctly [HDLC, LN=0]

D2 FrameType not parsed correctly [HDLC, LN=0]

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 lukasm , 21 February, 2022
Forums
Gurux DLMS for Java

Hello,
I am facing the issue with incorrect translation of register's scaller & unit values during profile read process.
We have two identical example meters which only differ by content of profile.
I will mark them as meter A and meter B.
Both of them are read through HDLC interface with Logical Name Referencing = 0.
Meter A has a profile programmed with 9 registers, meter B has 17 registers.
I have observed that, when the amount of registers is higher than some value, then the Meter sends data in different frame type.

Transmission logs:
meter A:

TX: 7E A0 2C 00 02 68 47 41 FA D4 CB E6 E6 00 05 09 02 48 B0 02 25 E8 02 1D A8 02 1E 50 02 1F 08 02 24 88 02 25 38 02 2E D0 02 2E 20 64 4C 7E
RX: 7E A0 50 41 00 02 68 47 [DE] 30 44 E6 E7 00 0C 09 00 02 02 0F 00 16 FF 00 02 02 0F FE 16 1E 00 02 02 0F FE 16 1E 00 02 02 0F FE 16 20 00 02 02 0F FE 16 20 00 02 02 0F FE 16 20 00 02 02 0F FE 16 20 00 02 02 0F FE 16 1E 00 02 02 0F FE 16 1E 24 CF 7E
frameType: DE

Meter B:
TX: 7E A0 44 00 02 80 51 41 3A AF 75 E6 E6 00 05 11 02 48 B0 02 25 E8 02 1D A8 02 1E 50 02 1F 08 02 24 88 02 25 38 02 9A F8 02 9B 88 02 9C 18 02 9C A8 02 9D 38 02 9D C8 02 2C C0 02 2D 70 02 A8 78 02 AA B8 08 68 7E
RX: 7E A8 50 41 00 02 80 51 [D2] C2 AD E6 E7 00 0C 11 00 02 02 0F 00 16 FF 00 02 02 0F FE 16 1E 00 02 02 0F FE 16 1E 00 02 02 0F FE 16 20 00 02 02 0F FE 16 20 00 02 02 0F FE 16 20 00 02 02 0F FE 16 20 00 02 02 0F FE 16 23 00 02 02 0F FE 16 23 72 A9 7E
TX: 7E A0 0A 00 02 80 51 41 51 5D E9 7E
RX: 7E A0 44 41 00 02 80 51 [D4] F7 3F 00 02 02 0F FE 16 23 00 02 02 0F FD 16 21 00 02 02 0F FD 16 21 00 02 02 0F FD 16 21 00 02 02 0F FE 16 1E 00 02 02 0F FE 16 1E 00 02 02 0F FD 16 FF 00 02 02 0F FD 16 FF C8 E4 7E

frameType: D2/D4

Translated with GuruxDLMSTranslator:

meter A:
<HDLC len="43" >
<TargetAddress Value="23075" />
<SourceAddress Value="32" />
<!--I frame.-->
<FrameType Value="FA" />
<PDU>
<ReadRequest Qty="9" >
<VariableName Value="18608" />
<VariableName Value="9704" />
<VariableName Value="7592" />
<VariableName Value="7760" />
<VariableName Value="7944" />
<VariableName Value="9352" />
<VariableName Value="9528" />
<VariableName Value="11984" />
<VariableName Value="11808" />
</ReadRequest>
</PDU>
</HDLC>
<HDLC len="79" >
<TargetAddress Value="32" />
<SourceAddress Value="23075" />
<!--I frame.-->
<FrameType Value="DE" />
<PDU>
<ReadResponse Qty="9" >
<Data>
<Structure Qty="2" >
<Int8 Value="0" />
<Enum Value="255" />
</Structure>
</Data>
<Data>
<Structure Qty="2" >
<Int8 Value="-2" />
<Enum Value="30" />
</Structure>
</Data>
<Data>
<Structure Qty="2" >
<Int8 Value="-2" />
<Enum Value="30" />
</Structure>
</Data>
<Data>
<Structure Qty="2" >
<Int8 Value="-2" />
<Enum Value="32" />
</Structure>
</Data>
<Data>
<Structure Qty="2" >
<Int8 Value="-2" />
<Enum Value="32" />
</Structure>
</Data>
<Data>
<Structure Qty="2" >
<Int8 Value="-2" />
<Enum Value="32" />
</Structure>
</Data>
<Data>
<Structure Qty="2" >
<Int8 Value="-2" />
<Enum Value="32" />
</Structure>
</Data>
<Data>
<Structure Qty="2" >
<Int8 Value="-2" />
<Enum Value="30" />
</Structure>
</Data>
<Data>
<Structure Qty="2" >
<Int8 Value="-2" />
<Enum Value="30" />
</Structure>
</Data>
</ReadResponse>
</PDU>
</HDLC>

Meter B:
<HDLC len="67" >
<TargetAddress Value="24616" />
<SourceAddress Value="32" />
<!--I frame.-->
<FrameType Value="3A" />
<PDU>
<ReadRequest Qty="17" >
<VariableName Value="18608" />
<VariableName Value="9704" />
<VariableName Value="7592" />
<VariableName Value="7760" />
<VariableName Value="7944" />
<VariableName Value="9352" />
<VariableName Value="9528" />
<VariableName Value="39672" />
<VariableName Value="39816" />
<VariableName Value="39960" />
<VariableName Value="40104" />
<VariableName Value="40248" />
<VariableName Value="40392" />
<VariableName Value="11456" />
<VariableName Value="11632" />
<VariableName Value="43128" />
<VariableName Value="43704" />
</ReadRequest>
</PDU>
</HDLC>
<HDLC len="79" >
<TargetAddress Value="32" />
<SourceAddress Value="24616" />
<!--I frame.-->
<FrameType Value="D2" />
<NextFrame Value="0C110002020F0016FF0002020FFE161E0002020FFE161E0002020FFE16200002020FFE16200002020FFE16200002020FFE16200002020FFE16230002020FFE1623" />
</HDLC>
<HDLC len="12" >
<TargetAddress Value="24616" />
<SourceAddress Value="32" />
<!--S frame.-->
<FrameType Value="51" />
<Command Value="NextFrame" />
</HDLC>
<HDLC len="67" >
<TargetAddress Value="32" />
<SourceAddress Value="24616" />
<!--I frame.-->
<FrameType Value="D4" />
<NextFrame Value="0002020FFE16230002020FFD16210002020FFD16210002020FFD16210002020FFE161E0002020FFE161E0002020FFD16FF0002020FFD16FF" />
</HDLC>

Could You verify if there is any issue with translation done by GX library?
Frames recevied from both meters look very similar but the outcome from the library is totally different and I'm not able to parse it correctly.

Thanks,
Lukasm

Mariusz Jędrzejewski

4 years 3 months ago

Please treat this request as

Please treat this request as duplicate of http://www.gurux.fi/node/19716 - it's the same case (my colleague wrote this independently :)

  • 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