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. 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 2 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 2 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 2 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

  • 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