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 Can I Make Control Field One Byte Hex Value?????

How can i make control field one byte hex value?????

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 chang2 , 14 October, 2018
Forums
General discussion

I am using obis code to construct a dlms frame.

our test device is NJ12-210-GEN made by NamJun Co,Ltd in korea

we send broadcast packet by using python pyserial module, but we don't know how control field is set..

For example, we want to know date/time information, then we send dlms data included OBIS Code(08 00 00 01 00 00 FF)

In this case, full dlms data are set to "7E A0 1A 02 FF 23 54 DA 6D E6 E6 00 C0 01 81 00 08 00 00 01 00 00 FF 02 00 65 D7 7E"

when i translate they by using DLMS Translator, i can get xml code

<HDLC len="25" >
<TargetAddress Value="255" />
<SourceAddress Value="17" />
<!--I frame.-->
<FrameType Value="54" />
<PDU>
<GetRequest>
<GetRequestNormal>
<InvokeIdAndPriority Value="129" />
<AttributeDescriptor>
<!--CLOCK-->
<ClassId Value="8" />
<!--0.0.1.0.0.255-->
<InstanceId Value="0000010000FF" />
<AttributeId Value="2" />
</AttributeDescriptor>
</GetRequestNormal>
</GetRequest>
</PDU>
</HDLC>

But I don't know how Frame Type(A.K.A control field, 0x54) is set.

please teach me how to make control field byte...

Profile picture for user Kurumi

Kurumi

7 years 8 months ago

How can i make control field one byte hex value?????

Hi,

HDLC frame is described on the standard. Its value is changed all the time. I believe that the best and fastest way is if you use our open source libraries to read your meter.

BR,
Mikko

Charaniya

1 year 9 months ago

not need to use your library…

not need to use your library just share how we make control frame for any hex string?

Profile picture for user Kurumi

Kurumi

1 year 9 months ago

Hi, DLMS is a complicated…

Hi,

DLMS is a complicated protocol and the control frame is part of HDLC framing.
It's not possible to describe shortly. You need the "IEC 62056-46 Data link layer using HDLC protocol" standard to handle the HDLC frames.

https://gurux.fi/DLMSCOSEMFAQ

BR,
Mikko

  • Create new account
  • Reset your password

Hire Us!

Latest Releases

  • Mon, 07/27/2026 - 12:37
    gurux.dlms.cpp 9.0.2607.2701
  • Thu, 07/23/2026 - 16:19
    gurux.dlms.java 4.0.96
  • Thu, 07/09/2026 - 14:34
    Gurux.DLMS.Python 1.0.201
  • Fri, 06/26/2026 - 16:32
    Gurux.Service 3.0.2606.2601
  • Wed, 06/24/2026 - 08:36
    Gurux.DLMS.Python 1.0.200

New forum topics

  • Service not known error on gprs communication
  • Help Needed: Interfacing Saral 100 Energy Meter with Microcontroller via RS232
  • Connecting Meter to Agent via serial
  • Reading block profile with Compact array
  • DLMS server - serving multiple similar datasets gathered from multiple meters across distinct logical addresses
More

Who's new

  • Thomasqto
  • Uka Ibe
  • CTKNhZElptjSlOrpkXl
  • YCbccqfLGRMnlCWoJhXP
  • Malcolmactig
RSS feed
Privacy FAQ GXDN Issues Contact
Follow Gurux on Twitter Follow Gurux on Linkedin