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. Node
  3. Question: How To Read Objects Using LN and The Object List On a SN Meter?

Question: how to read objects using LN and the object list on a SN 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 Jeroen88 , 10 April, 2021
Forums
Gurux.DLMS

Hi Mikko,

I finally succeeded in reading the Object List of a Landis Gyr E650 using the Arduino GuruxDLMS.c library. Next I was able to read the clock and registers, like 1.8.1 and 32.7.0, by explicitly setting the SN found in the object list.

I also have a question. I was able to read the registers using SN directly by setting the object’s shortName. I did:
//Read register
gxRegister register1;
cosem_init(BASE(register1), DLMS_OBJECT_TYPE_REGISTER, "1.1.1.8.1.255");
register1.base.shortName = 0x0b20;
com_read(BASE(register1), 3);
com_read(BASE(register1), 2);
obj_toString(BASE(register1), &data);
GXTRACE(PSTR("Register"), data);

Now that I am able to read the object list for this SN meter, there must be an easy way to retrieve the short name from the Object List. I retrieved the object list like this:
ret = com_getAssociationView();
if(ret != DLMS_ERROR_CODE_OK) {
GXTRACE_INT(PSTR("com_getAssociationView failed"), ret);
return ret;
}
GXTRACE_INT(PSTR("com_getAssociationView SUCCEEDED"), ret);

Could you help me how to read a register using it’s Logical Name by looking up it’s Short Name in the object list?

Best Jeroen

Profile picture for user Kurumi

Kurumi

5 years 5 months ago

Hi,

Hi,

This is the only way to do it. You need to read the association view and then save a short name so you can use it later. There is no formula, etc to count short name from the logical name. You can think short name as a memory address and it might be different even the same meter between the firmware versions.

You can get short name from the shortName of the base object. Something like this:

gxRegister reg;
//INIT, etc...
reg.base.shortName

BR,
Mikko

Jeroen88

5 years 5 months ago

Hi Mikko,

Hi Mikko,

Thanks for your reaction. My question is: is there any functions in the Gurux.c library to look up a LN in the object list to find the SN? Or do I just have to loop the object list like this:

gxObject* obj;
for (size_t pos = 0; pos != Client.GetObjects()->size; ++pos) {
ret = oa_getByIndex(Client.GetObjects(), pos, &obj);
}

Profile picture for user Kurumi

Kurumi

5 years 5 months ago

Hi,

Hi,

You can find objects by logical name using oa_findByLN-method.

BR,
Mikko

  • Create new account
  • Reset your password

Hire Us!

Latest Releases

  • Wed, 08/26/2026 - 09:04
    Gurux.DLMS.Python 1.0.203
  • Mon, 08/17/2026 - 11:28
    Gurux.DLMS.Python 1.0.202
  • Mon, 08/17/2026 - 09:47
    gurux.dlms.cpp 9.0.2608.1701
  • Mon, 08/17/2026 - 09:25
    gurux.dlms.c 9.0.2608.1701
  • Mon, 07/27/2026 - 12:37
    gurux.dlms.cpp 9.0.2607.2701

New forum topics

  • Security vulnerability report — request for a private contact (GuruxDLMS.c / ANSI C)
  • Topic: Insufficient Memory Error When Reading Class 7 Profile Generic Objects
  • SN ReadResponse returns all-null values when response spans multiple HDLC frames
  • Gurux.Serial.Android 3.0.6 – CH340 (HL-340) USB-Serial Adapter Not Working,
  • Trying to talk to a L&G E360 meter (Using Python Gurux)
More

Who's new

  • Anaglyfos Trading CC
  • cyby
  • Metin Onan
  • ssv007
  • 3nzol3dur
RSS feed
Privacy FAQ GXDN Issues Contact
Follow Gurux on Twitter Follow Gurux on Linkedin