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 3 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 3 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 3 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

  • Mon, 07/27/2026 - 12:37
    gurux.dlms.cpp 9.0.2607.2701
  • Thu, 07/23/2026 - 16:19
    gurux.dlms.java 4.0.96
  • Thu, 07/09/2026 - 14:34
    Gurux.DLMS.Python 1.0.201
  • Fri, 06/26/2026 - 16:32
    Gurux.Service 3.0.2606.2601
  • Wed, 06/24/2026 - 08:36
    Gurux.DLMS.Python 1.0.200

New forum topics

  • Service not known error on gprs communication
  • Help Needed: Interfacing Saral 100 Energy Meter with Microcontroller via RS232
  • Connecting Meter to Agent via serial
  • Reading block profile with Compact array
  • DLMS server - serving multiple similar datasets gathered from multiple meters across distinct logical addresses
More

Who's new

  • QDeYZLrphMziQF…
  • sharrongm69
  • agize
  • BioTips
  • Vital479
RSS feed
Privacy FAQ GXDN Issues Contact
Follow Gurux on Twitter Follow Gurux on Linkedin