Skip to main content
Home
for DLMS smart meters

Main navigation

  • Home
  • Products
  • About us
  • Open Source
  • Community
  • Forum
  • Downloads
User account menu
  • Log in

Breadcrumb

  1. Home
  2. Com_read Getting Failed For Billing Profile and Instantaneous Profile

com_read getting failed for billing profile and instantaneous profile

By Somesh_8073, 22 May, 2025
Forums
Gurux.DLMS

hello,
below code is for to read instantaneous and billing profile - - >

void
read_meter_instantaneous_profile()
{
gxProfileGeneric profile;
char * data = NULL;
cosem_init(&profile.base, DLMS_OBJECT_TYPE_PROFILE_GENERIC, "1.0.94.91.0.255");

com_read(&profile.base, 2);

/* Read rows by entry */
com_readRowsByEntry(&profile, 1, 2);

/* Read rows by Range */
// gxtime start_time;
// gxtime end_time;
// end_time.value = 1742302940; //EPOCH time
// start_time.value = end_time.value - 1 * 60 * 60;
// com_readRowsByRange(&profile, &start_time, &end_time);

obj_toString(&profile.base, &data);
obj_clear(&profile.base);
printk("DEBUG_METER_DATA : Meter Instantaneous Profile --- %s", data);

obj_clearProfileGenericBuffer(&profile.captureObjects);
obj_clearProfileGenericBuffer(&profile.buffer);
free(data);
}

-------------------------------------------------------------------------------------------------

void
read_meter_billing_profile()
{
gxProfileGeneric profile;
char * data = NULL;
cosem_init(&profile.base, DLMS_OBJECT_TYPE_PROFILE_GENERIC, "1.0.98.1.0.255");

com_read(&profile.base, 2);

/* Read rows by entry */
com_readRowsByEntry(&profile, 1, 1);

/* Read rows by Range */
// gxtime start_time;
// gxtime end_time;
// end_time.value = 1741768215; //EPOCH time
// start_time.value = end_time.value - 1 * 60 * 60; /* 12 hours */
// com_readRowsByRange(&profile, &start_time, &end_time);

obj_toString(&profile.base, &data);
obj_clear(&profile.base);
printk("DEBUG_METER_DATA : Meter Billing --- %s", data);

obj_clearProfileGenericBuffer(&profile.captureObjects);
obj_clearProfileGenericBuffer(&profile.buffer);
free(data);
}

we are able to read,
/* Read Logical Name "0.0.42.0.0.255" */
read_logical_name();

/* Read Serial No "0.0.96.1.0.255" */
read_meter_serial_no();

/* Read Device ID "0.0.96.1.2.25" */
read_deviceID_meter();

/* Read Meter Manufacturer "0.0.96.1.1.255" */
read_meter_manufacturer();

/* Read Meter Type "0.0.94.91.9.255" */
read_meter_type();

/* Read Meter Category "0.0.94.91.11.255" */
read_meter_category();

/* Read Firmware Version "1.0.0.2.0.255" */
read_meter_firmware_version();

/* Read Manufacturing Date "0.0.96.1.4.255" */
read_meter_manufacturing_date();

/*Read clock and set micro controller to use meter time if it's not set. "0.0.1.0.0.255" */
read_meter_clock();

/* Read Meter Daily Load Profile "1.0.99.2.0.255" */
read_meter_daily_load_profile();

/* Read Meter Block Load Profile "1.0.99.1.0.255" */
read_meter_block_load_profile();
-------------------------------------------------------------

com_read is getting failed , showing Invalid Object on terminal logs,
but when i connect with DLMSDirector, able to read data for billing and instantaneous profile.

Profile picture for user Kurumi

Kurumi

5 months 2 weeks ago

Hi, Some meters don't…

Hi,

Some meters don't implement read rows by range to instantaneous and billing profile; you need to do it with a normal read.

BR,
Mikko

Somesh_8073

5 months 2 weeks ago

hi, i got stuck,since very…

hi,

i got stuck,since very long time in it.

can you just help me out with the piece of code, (how to do normal read for instantaneous and billing profile data)
so it is better for me to do further implementation.

Somesh_8073

5 months 2 weeks ago

hi, i tried with com_read,…

hi,

i tried with com_read, but it's getting failed.

Profile picture for user Kurumi

Kurumi

5 months 2 weeks ago

Hi, com_read works for…

Hi,

com_read works for instantaneous profile. Make sure that you have connected with an authentication level that can access those objects.

BR,
Mikko

  • Create new account
  • Reset your password

Hire Us!

Latest Releases

  • Wed, 10/29/2025 - 08:51
    gurux.dlms.c 9.0.2510.2901
  • Thu, 10/16/2025 - 09:59
    gurux.dlms.java 4.0.83
  • Wed, 10/08/2025 - 10:21
    gurux.dlms.c 9.0.2510.0801
  • Fri, 09/26/2025 - 10:02
    gurux.dlms.cpp 9.0.2509.2601
  • Fri, 09/26/2025 - 09:45
    gurux.dlms.c 9.0.2509.2601

New forum topics

  • How to get/convert user readable format data from readRowsByRange
  • Insufficient memory to continue the execution of the program.
  • The client instance code failed to connect to the electricity meter for authentication
  • Unable to Release Request when closing connection with meter.
  • Failed to receive reply from the device in given time.
More
RSS feed
Privacy FAQ GXDN Issues Contact
Follow Gurux on Twitter Follow Gurux on Linkedin