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 To Get Clock From Meter

How to get clock from meter

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 poojash , 30 March, 2021
Forums
Known problems

Hello
I am using your Atmel code for ATSAME54 Xplained pro board. My code compiled and debugged it connected to meter
TX: 7E A0 07 03 41 93 5A 64 7E
RX: 7E A0 1E 41 03 73 8E 7F 81 80 12 05 01 80 06 01 80 07 04 00 00 00 01 08 04 00 00 00 01 53 3B 7E

but following code is not exicuting
gxClock clock;
ret = cosem_init(&clock.base, DLMS_OBJECT_TYPE_CLOCK, "0.0.1.0.0.255");

//Initialize connection.
ret = com_initializeConnection(&con);
if (ret != DLMS_ERROR_CODE_OK)
{
return ret;
}
Read clock.
ret = com_read(&con, &clock.base, 2);
if (ret != DLMS_ERROR_CODE_OK)
{
return ret;
}

When I run It I got Following Reply
TX: 7E A0 19 03 41 10 2A BF E6 E6 00 C0 01 81 00 08 00 00 01 00 00 FF 02 00 65 D7 7E
RX: 7E A0 10 41 03 30 53 A1 E6 E7 00 0E 01 03 02 94 A8 7E

Please help how to solve this problem.

Profile picture for user Kurumi

Kurumi

5 years 2 months ago

Hi,

Hi,

You don't call AARQ for some reason. Only SNRM is called. You need to check this.
Because the connection is not established the read fails.

BR,
Mikko

poojash

5 years 2 months ago

HI,

HI,
Could you please help me how can I do this I am new to this dlms. Also it is possible please tell me flow of code. I dont understand how this instructions sent through UART.

Profile picture for user Kurumi

Kurumi

5 years 2 months ago

Hi,

Hi,

com_initializeConnection generates AARQ automatically. You need only send generated bytes as you have done with SNRM.

Check that parsing UA is not failed and your buffer is big enough to save generated AARQ message.

BR,
Mikko

poojash

5 years 2 months ago

Hello

Hello
I want to read all objects from meter using Atmel. Where I can get it

poojash

5 years 2 months ago

hello

hello
Please update I want code to read all object from meter please help

poojash

5 years 2 months ago

Hello

Hello
I am working on Atmel code my client initialization is done i got reply from meter but there is problem when com_initializeConnection() is called. When debugged It goes upto cl_snrmRequest() function after it is not working. What shoul I do further.

Profile picture for user Kurumi

Kurumi

5 years 2 months ago

In reply to Hello by poojash

Hi,

Hi,

Reading association view will return all the objects that the meter can offer in that association.

BR,
Mikko

Profile picture for user Kurumi

Kurumi

5 years 2 months ago

Hi,

Hi,

Is function returning an error or is returned value zero?

BR,
Mikko

poojash

5 years ago

Hello,

Hello,
I have completed communication with meter. I am using SAME54 Xplained board. When I sent clock read frame i got correct response(checked on Gurux translator) but I what to print it on serial how can i do this to print it in "2021-05-12 12:25:29" this format

Profile picture for user Kurumi

Kurumi

5 years ago

Hi,

Hi,

Date-time is coming in octet-string and you need to convert it to gxtime. Then you can use time_toString2 to convert it to the string.

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