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. DLMS ARDUINO - RECOVER VALUE

DLMS ARDUINO - RECOVER VALUE

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 Matias Ferri , 25 September, 2019
Forums
Gurux.Serial

Thanks for the answer, that works perfectly. Once one makes the query, where does it recover the value that the OBI returns ???

ret = com_read(&gn.base, 2);

I have that query configured to give me the voltage. When I print the response from the serial port, the value reaches me perfectly. But I don't know what method of the object has that value saved, to use in the program.

THANK YOU!

Profile picture for user Kurumi

Kurumi

6 years 8 months ago

Hi,

Hi,

It depends what object type you try to read. If the object type is gxData or gxRegister read value is found from the gn.value parameter. In register there are also scaler and unit parameters.

BR,

Mikko

Matias Ferri

6 years 8 months ago

In reply to Hi, by Kurumi

Hello, I am reading those

Hello, I am reading those objects, but all the variables return me zero. I made a modification in the arduino code after this happens and comment on the line that interprets the serial port input. When I comment and redirect the traffic to the console, I see that the packages that arrive to me have the requested data. But when I leave the normal program flow, this answers me:

<HDLC len="17" >
<TargetAddress Value="1" />
<SourceAddress Value="16401" />
<!--AARE frame.-->
<FrameType Value="30" />
<PDU>
<Data="0102" />
</PDU>
</HDLC>
***********************************************************************************

Will it be that in this part of the Client.ino code you are not saving the data in the objects? (function int readDLMSPacket)

do
{
if (com_readSerialPort(0x7E) != 0)
{
return DLMS_ERROR_CODE_SEND_FAILED;
}
ret = cl_getData(&meterSettings, &frameData, reply);
if (ret != 0 && ret != DLMS_ERROR_CODE_FALSE)
{
break;
}
} while (reply->complete == 0);

greetings and thanks for the prompt response!

Image
Profile picture for user Kurumi

Kurumi

6 years 8 months ago

Hi,

Hi,

You should check to ret-value to make sure that read has succeeded.

From the AARE message that you post, it seems that your connection has failed. Check the password.

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