How to get clock from meter

9 posts / 0 new
Last post
poojash
How to get clock from meter

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.

Kurumi
Kurumi's picture

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

________________________________________
Mikko Kurunsaari
Gurux Ltd
http://www.gurux.fi

poojash

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.

pooja

Kurumi
Kurumi's picture

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

________________________________________
Mikko Kurunsaari
Gurux Ltd
http://www.gurux.fi

poojash

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

pooja

Kurumi
Kurumi's picture

Hi,

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

BR,
Mikko

________________________________________
Mikko Kurunsaari
Gurux Ltd
http://www.gurux.fi

poojash

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

pooja

poojash

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.

pooja

Kurumi
Kurumi's picture

Hi,

Is function returning an error or is returned value zero?

BR,
Mikko

________________________________________
Mikko Kurunsaari
Gurux Ltd
http://www.gurux.fi