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?
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.
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?
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
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
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
Hi Fred,
Hi Fred,
Yes, by highest bit in byte after CC.
BR,
Mikko
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
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