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. Block Profile Read Request Query Structure Is Differ.

Block profile read request query structure is differ.

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 pradson , 3 December, 2020
Forums
Gurux.DLMS

Hi,

I got difference in request structure of read block profile for a given range-
The request and response when I read block profile from a device using DLMSDirector tool-
Query:
###Request:
00 01 00 20 00 11 00 40 C0 01 C1 00 07 01 00 63 01 00 FF 02 01 01 02 04 02 04 12 00 08 09 06 00 00 01 00 00 FF 0F 02 12 00 00 09 0C 07 E4 0C 02 FF 10 1E 00 FF 01 4A 00 09 0C 07 E4 0C 02 FF 10 1E 00 FF 01 4A 00 01 00
###Response:
00 01 00 11 00 20 00 7F C4 01 C1 00 01 01 02 16 09 0C 07 E4 0C 02 FF 10 1E FF FF 01 4A 00 06 00 00 13 86 06 00 00 E1 51 06 00 00 E1 39 06 00 00 E1 45 06 00 00 00 00 05 FF FE 15 6E 06 00 01 EA 92 06 00 00 00 00 06 00 00 00 00 06 00 01 03 6F 06 00 00 00 00 06 00 00 E1 45 06 FF FF FF FF 05 FF FE FC 91 06 00 00 01 46 06 00 00 01 48 06 00 00 01 48 05 00 00 00 00 05 FF FE FC 91 06 00 00 00 00 06 00 00 03 73

The request and response when I read block profile from a device using my sample application-
###Request:
00 01 00 20 00 11 00 40 C0 01 C1 00 07 01 00 63 01 00 FF 02 01 01 02 04 02 04 12 00 08 09 06 00 00 01 00 00 FF 0F 02 12 00 00 09 0C 07 E4 0C 02 07 10 1E 00 FF FE B6 00 09 0C 07 E4 0C 02 07 10 1E 00 FF FE B6 00 01 00
### Response:
00 01 00 11 00 20 00 06 C4 01 C1 00 01 00

I have checked that the octed string of date-time ranges are differ in both query.

Kindly suggest.

Thanks

Profile picture for user Kurumi

Kurumi

5 years 6 months ago

Hi,

Hi,
You need to set GXDLMSCLient.UseUtc2NormalTime to true.

BR,
Mikko

pradson

5 years 6 months ago

In reply to Hi, by Kurumi

Hi Mikko,

Hi Mikko,

Currently I am using old version of Gurux.DLMS.cpp-master based on Visual Studio 2012. This method ( GXDLMSCLient.UseUtc2NormalTime) is not available here. I have downloaded the latest version of Gurux.DLMS.cpp-master but it based on visual studio 2019. I am unable to use visual-studio-2019. I can use use visual studio 2017 max.

Could this matter resolve in visual studio 2017?
If yes, then how will I get Gurux.DLMS.cpp-master based on visual studio 2017?

Thanks,
Pradson

Profile picture for user Kurumi

Kurumi

5 years 6 months ago

Hi Pradson,

Hi Pradson,

You can use the old project and solution file. Just update *.h and *.cpp files to the latest one.

BR,
Mikko

pradson

5 years 6 months ago

In reply to Hi Pradson, by Kurumi

Hi Mikko,

Hi Mikko,

I did as suggested by you but facing a lots of complier errors.
I am using visual-studio-2012 to build the same.

Kindly suggest any other solution?

Thanks & Regards,
Pradson

Profile picture for user Kurumi

Kurumi

5 years 6 months ago

Hi,

Hi,

You need to add all header and cpp files to the project. There are no reasons why it shouldn't compile with VS 2012.

BR,
Mikko

pradson

5 years 6 months ago

In reply to Hi, by Kurumi

HI Mikko,

HI Mikko,

How will I get older version Gurux.DLMS.cpp-master which could build in visual studio 2017?

Thanks

Profile picture for user Kurumi

Kurumi

5 years 6 months ago

Hi,

Hi,

Try to get this and then add all new header and cpp files.
https://github.com/Gurux/Gurux.DLMS.cpp/commit/b45e49be4bb9f4c1a50d0ccc…

BR,
Mikko

pradson

5 years 6 months ago

In reply to Hi, by Kurumi

Hi Mikko,

Hi Mikko,

I have migrated to latest version (Gurux.DLMS.cpp-master-Version 20201127.1 ). I have tried this (GXDLMSCLient.UseUtc2NormalTime) as suggested by you but filtered data data records are same.

Kindly check.

Thanks,
Pradson

pradson

5 years 6 months ago

In reply to Hi, by Kurumi

HI Mikko,

HI Mikko,

As I was facing the issue between the input time range and out put time range for block profile object is differ. But if I check the same scenario with DLMSDirector tool, then the result set is ok.

I have checked the above scenario with latest code as you had suggested me to add "cl.SetUseUtc2NormalTime(true)" but still I am getting the differences in result set.

Kindly find the below mentioned sample code and attached screenshot of DLMSDirector tool.

which line have I missed in the sample code? Kindly check.

//---------------------------------------------------------------------
// ------------------- sample Code ---------------------
//---------------------------------------------------------------------

cl.SetUseUtc2NormalTime(true); // As suggest

/*********** read clock ***********/
CGXDLMSClock *objClock = new CGXDLMSClock("0.0.1.0.0.255");
std::string sValues;

if ((ret = comm.Read(objClock, 2, sValues)) != 0) {
printf("err! failed to read clock object register: %s \n", CGXDLMSConverter::GetErrorMessage(ret));
}
else {
printf("sValues: %s\n", (char*)sValues.c_str());
}

CGXDLMSProfileGeneric *objLP1 = new CGXDLMSProfileGeneric("1.0.99.1.0.255");//Block profile
ret = 0;
std::string sCapObj;
if ((ret = comm.Read(objLP1, 3, sCapObj)) != 0)
{
printf("err! failed to readCaptureObjects: %s \n", CGXDLMSConverter::GetErrorMessage(ret));
}

CGXDateTime startLP1 = CGXDateTime(2020, 11, 26, 22, 0, 0, 0);
CGXDateTime endLP1 = CGXDateTime(2020, 11, 26, 23, 0, 0, 0);

CGXDLMSVariant rows;
if ((ret = comm.ReadRowsByRange(objLP1, startLP1, endLP1, rows)) != 0) {
printf("err! failed to read register: %s \n", CGXDLMSConverter::GetErrorMessage(ret));
}
else {
printf("sValues:\n%s", (char*)rows.ToString().c_str());
}

//---------------------------------------------------------------------
// ------------------- Out put of sample Code ---------------------
//---------------------------------------------------------------------
sValues: 07-12-2020 16:43:52
sValues:
27-11-2020 09:00 | 4998 | 57845 | 57820 | 57833 | 0 | -86158 | 86158 | 0 | 0 | 75434 | 0 | 57832 | 4294967295 | -75434 | 264 | 264 | 264 | 0 | -75434 | 0 | 752 |
27-11-2020 09:15 | 4998 | 57897 | 57876 | 57887 | 0 | -37670 | 37670 | 0 | 0 | 32234 | 0 | 57886 | 4294967295 | -32234 | 114 | 114 | 114 | 0 | -32234 | 0 | 759 |
27-11-2020 09:30 | 4998 | 57932 | 57907 | 57918 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 57919 | 4294967295 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
27-11-2020 09:45 | 4998 | 57917 | 57898 | 57912 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 57909 | 4294967295 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
27-11-2020 10:00 | 4998 | 57913 | 57892 | 57906 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 57903 | 4294967295 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |

Thanks,
Pradson

Image
Profile picture for user Kurumi

Kurumi

5 years 6 months ago

Hi,

Hi,

Can you add a trace from the request bytes in hex string to here so I can check the bytes?
Your code seems correct for the first sign, but I need the bytes to verify this.

BR,
Mikko

pradson

5 years 6 months ago

Hi Mikko,

Hi Mikko,

Kindly find the text of trace file-

//------------------------------------------------
TX: 15:36:44 00 01 00 20 00 11 00 35 60 33 A1 09 06 07 60 85 74 05 08 01 01 8A 02 07 80 8B 07 60 85 74 05 08 02 01 AC 07 80 05 73 73 73 30 31 BE 10 04 0E 01 00 00 00 06 5F 1F 04 00 00 1E 1D FF FF
RX: 15:36:44 00 01 00 11 00 20 00 2A 61 28 A1 09 06 07 60 85 74 05 08 01 01 A2 03 02 01 00 A3 05 A1 03 02 01 00 BE 0F 04 0D 08 00 06 5F 04 00 00 10 1D 20 00 00 07
TX: 15:36:46 00 01 00 20 00 11 00 0D C0 01 81 00 08 00 00 01 00 00 FF 02 00
RX: 15:36:46 00 01 00 11 00 20 00 12 C4 01 81 00 09 0C 07 E4 0C 08 02 0F 25 0E 16 01 4A 00
TX: 15:36:47 00 01 00 20 00 11 00 0D C0 01 81 00 07 01 00 63 01 00 FF 03 00
RX: 15:36:47 00 01 00 11 00 20 01 92 C4 01 81 00 01 16 02 04 12 00 08 09 06 00 00 01 00 00 FF 0F 02 12 00 00 02 04 12 00 03 09 06 01 00 0E 1B 00 FF 0F 02 12 00 00 02 04 12 00 03 09 06 01 00 20 1B 00 FF 0F 02 12 00 00 02 04 12 00 03 09 06 01 00 34 1B 00 FF 0F 02 12 00 00 02 04 12 00 03 09 06 01 00 48 1B 00 FF 0F 02 12 00 00 02 04 12 00 03 09 06 01 00 01 1D 00 FF 0F 02 12 00 00 02 04 12 00 03 09 06 01 00 10 1D 00 FF 0F 02 12 00 00 02 04 12 00 03 09 06 01 00 02 1D 00 FF 0F 02 12 00 00 02 04 12 00 03 09 06 01 00 05 1D 00 FF 0F 02 12 00 00 02 04 12 00 03 09 06 01 00 06 1D 00 FF 0F 02 12 00 00 02 04 12 00 03 09 06 01 00 07 1D 00 FF 0F 02 12 00 00 02 04 12 00 03 09 06 01 00 08 1D 00 FF 0F 02 12 00 00 02 04 12 00 03 09 06 01 00 80 07 0E FF 0F 02 12 00 00 02 04 12 00 01 09 06 01 00 80 07 59 FF 0F 02 12 00 00 02 04 12 00 03 09 06 01 00 80 07 6E FF 0F 02 12 00 00 02 04 12 00 03 09 06 01 00 1F 1B 00 FF 0F 02 12 00 00 02 04 12 00 03 09 06 01 00 33 1B 00 FF 0F 02 12 00 00 02 04 12 00 03 09 06 01 00 47 1B 00 FF 0F 02 12 00 00 02 04 12 00 03 09 06 01 00 5E 5B 01 FF 0F 02 12 00 00 02 04 12 00 03 09 06 01 00 5E 5B 02 FF 0F 02 12 00 00 02 04 12 00 03 09 06 01 00 0D 1B 00 FF 0F 02 12 00 00 02 04 12 00 03 09 06 01 00 54 1B 00 FF 0F 02 12 00 00
TX: 15:36:47 00 01 00 20 00 11 00 40 C0 01 81 00 07 01 00 63 01 00 FF 02 01 01 02 04 02 04 12 00 08 09 06 00 00 01 00 00 FF 0F 02 12 00 00 09 0C 07 E4 0B 1A 07 16 00 00 FF FE B6 00 09 0C 07 E4 0B 1A 07 17 00 00 FF FE B6 00 01 00
RX: 15:36:47 00 01 00 11 00 20 02 63 C4 01 81 00 01 05 02 16 09 0C 07 E4 0B 1B FF 09 00 FF FF 01 4A 00 06 00 00 13 86 06 00 00 E1 F5 06 00 00 E1 DC 06 00 00 E1 E9 06 00 00 00 00 05 FF FE AF 72 06 00 01 50 8E 06 00 00 00 00 06 00 00 00 00 06 00 01 26 AA 06 00 00 00 00 06 00 00 E1 E8 06 FF FF FF FF 05 FF FE D9 56 06 00 00 01 08 06 00 00 01 08 06 00 00 01 08 05 00 00 00 00 05 FF FE D9 56 06 00 00 00 00 06 00 00 02 F0 02 16 09 0C 07 E4 0B 1B FF 09 0F FF FF 01 4A 00 06 00 00 13 86 06 00 00 E2 29 06 00 00 E2 14 06 00 00 E2 1F 06 00 00 00 00 05 FF FF 6C DA 06 00 00 93 26 06 00 00 00 00 06 00 00 00 00 06 00 00 7D EA 06 00 00 00 00 06 00 00 E2 1E 06 FF FF FF FF 05 FF FF 82 16 06 00 00 00 72 06 00 00 00 72 06 00 00 00 72 05 00 00 00 00 05 FF FF 82 16 06 00 00 00 00 06 00 00 02 F7 02 16 09 0C 07 E4 0B 1B FF 09 1E FF FF 01 4A 00 06 00 00 13 86 06 00 00 E2 4C 06 00 00 E2 33 06 00 00 E2 3E 06 00 00 00 00 05 00 00 00 00 06 00 00 00 00 06 00 00 00 00 06 00 00 00 00 06 00 00 00 00 06 00 00 00 00 06 00 00 E2 3F 06 FF FF FF FF 05 00 00 00 00 06 00 00 00 00 06 00 00 00 00 06 00 00 00 00 05 00 00 00 00 05 00 00 00 00 06 00 00 00 00 06 00 00 00 00 02 16 09 0C 07 E4 0B 1B FF 09 2D FF FF 01 4A 00 06 00 00 13 86 06 00 00 E2 3D 06 00 00 E2 2A 06 00 00 E2 38 06 00 00 00 00 05 00 00 00 00 06 00 00 00 00 06 00 00 00 00 06 00 00 00 00 06 00 00 00 00 06 00 00 00 00 06 00 00 E2 35 06 FF FF FF FF 05 00 00 00 00 06 00 00 00 00 06 00 00 00 00 06 00 00 00 00 05 00 00 00 00 05 00 00 00 00 06 00 00 00 00 06 00 00 00 00 02 16 09 0C 07 E4 0B 1B FF 0A 00 FF FF 01 4A 00 06 00 00 13 86 06 00 00 E2 39 06 00 00 E2 24 06 00 00 E2 32 06 00 00 00 00 05 00 00 00 00 06 00 00 00 00 06 00 00 00 00 06 00 00 00 00 06 00 00 00 00 06 00 00 00 00 06 00 00 E2 2F 06 FF FF FF FF 05 00 00 00 00 06 00 00 00 00 06 00 00 00 00 06 00 00 00 00 05 00 00 00 00 05 00 00 00 00 06 00 00 00 00 06 00 00 00 00
TX: 15:36:50 00 01 00 20 00 11 00 05 62 03 80 01 00
RX: 15:36:50 00 01 00 11 00 20 00 02 63 00

//------------------------------------------------

Thanks,
Pradson

Profile picture for user Kurumi

Kurumi

5 years 6 months ago

Hi Pradson,

Hi Pradson,

There was an error with UseUtc2NormalTime. This is now fixed. Get the latest version.

BR,
Mikko

pradson

5 years 6 months ago

In reply to Hi Pradson, by Kurumi

Hi Mikko,

Hi Mikko,

Yes, it working now.
Thanks a lot for your kind help.

Thanks & Regards,
Pradson

  • 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