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. Doubt In Release and Disconnection Thread At The End

Doubt in Release and disconnection thread at the end

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 juvinagrawal , 22 August, 2022
Forums
Gurux.Serial

I am able to read meter, successfully able to read the data but since I am not closing the connection after each read, data I am receiving every-time is same.

I have to reset my controller to read the latest value.
And it is working perfectly but as per my application requirement, I cannot reset it everytime.

I tried to get it from DLMSDirector:
I got the thread:
7E A0 07 03 41 53 56 A2 7E

When I am sending this to meter via serial port, it is not disconnecting and I am getting same repeated meter values when I read the meter again.

Please suggest me a connection release and disconnect hex thread so that I can close the connection and then again make connection to read the latest value.
Basically I want to know the hex code need to send to release and disconnect connection with meter.

Profile picture for user Kurumi

Kurumi

3 years 9 months ago

Hi,

Hi,

You don't need to close the connection to re-read the data. The reason is somewhere else.
Because you didn't add the meter reply, I don't know is meter sending an error or acknowledge message.
Your disconnect message is correct.

I have to say that there is a sequence counter for each message. You can read simple data sending hex data, but that will cause problems if you want to read complex data. For example historical data.

BR,
Mikko

juvinagrawal

3 years 9 months ago

Ok means we need to send back

Ok means we need to send back next hex code string by adding meter reply in it.

Can you give me one small example so that I can get the idea of how to add the reply in response string.

juvinagrawal

3 years 9 months ago

Hello Mikko,

Hello Mikko,

char snmq[]={0x7E,0xA0,0x20,0x03,0x41,0x93,0x28,0xBC,0x81,0x80,0x14,0x05,0x02,0x02,0x00,0x06,0x02,0x02,0x00,0x07,0x04,0x00,0x00,0x00,0x01,0x08,0x04,0x00,0x00,0x00,0x01,0x6F,0xEF,0x7E};
char aarq[]={0x7E,0xA0,0x48,0x03,0x41,0x10,0x87,0x76,0xE6,0xE6,0x00,0x60,0x3A,0x80,0x02,0x02,0x84,0xA1,0x09,0x06,0x07,0x60,0x85,0x74,0x05,0x08,0x01,0x01,0x8A,0x02,0x07,0x80,0x8B,0x07,0x60,0x85,0x74,0x05,0x08,0x02,0x01,0xAC,0x0A,0x80,0x08,0x41,0x42,0x43,0x44,0x30,0x30,0x30,0x31,0xBE,0x10,0x04,0x0E,0x01,0x00,0x00,0x00,0x06,0x5F,0x1F,0x04,0x00,0x00,0x18,0x19,0xFF,0xFF,0xEB,0xAB,0x7E};
char td[]={0x7E,0xA0,0x19,0x03,0x41,0x32,0x3A,0xBD,0xE6,0xE6,0x00,0xC0,0x01,0x81,0x00,0x08,0x00,0x00,0x01,0x00,0x00,0xFF,0x02,0x00,0x65,0xD7,0x7E};
char prfG[] = {0x7E,0xA0,0x4C,0x03,0x41,0x54,0x4B,0x00,0xE6,0xE6,0x00,0xC0,0x01,0xC1,0x00,0x07,0x01,0x00,0x5E,0x5B,0x00,0xFF,0x02,0x01,0x01,0x02,0x04,0x02,0x04,0x12,0x00,0x08,0x09,0x06,0x00,0x00,0x01,0x00,0x00,0xFF,0x0F,0x02,0x12,0x00,0x00,0x09,0x0C,0x07,0xE6,0x08,0x10,0xFF,0x00,0x00,0x00,0xFF,0xFE,0xB6,0x00,0x09,0x0C,0x07,0xE6,0x08,0x11,0xFF,0x00,0x00,0x00,0xFF,0xFE,0xB6,0x00,0x01,0x00,0x1A,0xEC,0x7E};

i am sending above hex in sequence and bale to receive data correctly but only once,
updated data i am receiving only by reset the controller.

what should be next command to read the updated data.

or it will be good if you can give me idea about how to add meter reply so that i can get updated data from meter.

thanks

Profile picture for user Kurumi

Kurumi

3 years 9 months ago

Hi,

Hi,

Sorry to say, but that is not so easy. There is a HDLC sequence number that is increased for each frame. There is also a checksum in each frame.

Because you want to read profile generic object this comes complicated. You need to check if all data is received and if not you need to send block ACK or HDLC framing ACK.

All this means that you can't just send hard-coded hex strings. You need to really understand HDLC framing and DLMS.

I really propose that you use Gurux Open Source libraries.

BR,
Mikko

  • 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