Skip to main content
Home
for DLMS smart meters

Main navigation

  • Home
  • Products
  • About us
  • Open Source
  • Community
  • Forum
  • Downloads
User account menu
  • Log in

Breadcrumb

  1. Home
  2. Forums
  3. HLS Security Response Control Byte Location

HLS Security Response Control Byte Location

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 FredC, 26 September, 2019
Forums
General discussion

Hi,
I am trying to parse HLS data from COSEM Meter to obtain Invocation Counter. The problem is I do not understand where to look for it. Some simple reponse examples from my meter:

before Decrypt or Authentication: CF 2A 10 00 00 00 96 ...... position 3
before Decrypt: CC 81 E0 30 00 00 0F ......... position 4
before Decrypt: CC 1A 30 00 00 00 BF.......... position 3
before Decrypt: CC 82 01 F8 30 00 00 00 C0........ position 5

As you can see the control byte is in a different location. Can some one tell me what comes after the glo-get-response CC? I can see the length before the byte but what are the other bytes? I tried to find an example in the Green Book but I could not find one that resembles my data?

Thanks for any help,

Fred

Profile picture for user Kurumi

Kurumi

6 years 8 months ago

Hi Fred,

Hi Fred,

You'll save a lot of time if you just use our Open Souce libraries. DLMS is a very complicated protocol.
There is a length of data after CC. If the highest bit is set, byte describes amount of the length bytes.

BR,
Mikko

FredC

6 years 8 months ago

Hi Mikko,

Hi Mikko,

I am almost finished reading and writing data to this meter (Date and Time, Billing Registers, Load Profile, Events, Alarms) except for this case for utilizing HLS. I am using an open source AES-GCM algorithm which works great too... I am too close to go back and start over.
When you say the highest bit what byte are you referring to the byte after the CC?

Thanks,

Fred

Profile picture for user Kurumi

Kurumi

6 years 8 months ago

Hi Fred,

Hi Fred,

Yes, by highest bit in byte after CC.

BR,
Mikko

FredC

6 years 8 months ago

Hi Miko,

Hi Miko,

How do I determine if there are 2 bytes for the length or 1 byte? 0x81 or 0x82 both have the high bit set but see below:
before Decrypt: CC 81 E0 30 00 00 0F ......... position 4 , length = 0xE0
before Decrypt: CC 82 01 F8 30 00 00 00 C0........ position 5, length = 0x01 0xF8

Thanks,

Fred

Profile picture for user Kurumi

Kurumi

6 years 8 months ago

Hi,

Hi,

If highest bit is set, rest of the bits tell the amount of the length bytes.

If you check your length above and compare it to the encrypted data, you can see what I mean.

BR,

Mikko

  • Create new account
  • Reset your password

Hire Us!

Latest Releases

  • 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
  • Thu, 05/28/2026 - 13:16
    Gurux.DLMS.Net 9.0.2605.2801
  • Thu, 05/28/2026 - 13:14
    Gurux.DLMS.Python 1.0.198
  • Tue, 05/26/2026 - 11:37
    gurux.dlms.c 9.0.2605.2601

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