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. Error : GetObjects Failed Not Enough Memory Available

Error : GetObjects failed Not enough memory available

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 Techapirant , 19 December, 2019
Forums
Gurux.DLMS

Hello,

I am trying to communicate Apex 150 Energy Meter over TCP with ANSI C stack; I am getting below error In getting association view
GetObjects failed Not enough memory available.

Whereas with same settings DLMS Director is able to read.
What else I have to do to make it work ?

Profile picture for user Kurumi

Kurumi

6 years 5 months ago

Hi,

Hi,

Can you send GXDLMSSDirector trace to me by email. We can check this.

BR,
Mikko

Techapirant

6 years 5 months ago

Your mail Id Please.

Mail sent

Techapirant

6 years 5 months ago

Any updates sir ? Any

Any updates sir ? Any findings from log file ?

Profile picture for user Kurumi

Kurumi

6 years 5 months ago

Hi,

Hi,

We did run this against your trace file and there are no problems. We was able to read all 56 objects.
Are you running this on the microcontroller?

It might be that there is not enough heap to create all objects. If this is the problem, can you skip association view reading and create objects manually.

BR,
Mikko

Techapirant

6 years 5 months ago

Ok but trace file is of DLMS

Ok but trace file is of DLMS Director it works fine their where as when I use sample DLMS Client using C in that case I am getting error.
No Micro controller, I am testing on my Laptop only.
cnt = connection->data.capacity - connection->data.size;
Above line returns error as data capacity and data size comes 306

How can I create objects manually to read profile generic OBIS code by skipping association view ?

Techapirant

6 years 5 months ago

I am trying like below code

I am trying like below code
const unsigned char ln[] = { 1,0,99,1,0,255 };
gxProfileGeneric reg_profile;
cosem_init2((gxObject*)&reg_profile, DLMS_OBJECT_TYPE_PROFILE_GENERIC, ln);
ret = com_read(connection, (gxObject*)&reg_profile, 3);
ret = com_read(connection, (gxObject*)&reg_profile, 2);

still I am getting error as below
ReadObject failed Profile Generic 1.0.99.1.0.255:2 Not enough memory available.

Profile picture for user Kurumi

Kurumi

6 years 5 months ago

Hi,

Hi,

We was running this trace file in our simulator and then read data using ANSI C client.

Are you suing malloc? Have you made any changes for the code?

BR,
Mikko

Techapirant

6 years 5 months ago

I have only modified code of

I have only modified code of 'int com_readAllObjects(connection *connection)' by below code and passed connection settings statically as below
connection con;
gxByteBuffer item;
bb_init(&item);
con_init(&con, 0);
cl_init(&con.settings, 1, 32, 1, DLMS_AUTHENTICATION_LOW, "ABCD0001", DLMS_INTERFACE_TYPE_WRAPPER);
con.trace = GX_TRACE_LEVEL_VERBOSE;
con.data.capacity = 307;
int ret, opt = 0;
int port = 0;
char* address = NULL;
char* serialPort = NULL;
unsigned char iec = 0;
char* p, * readObjects = NULL;
int index, a, b, c, d, e, f;
if (readTcpIpConnection(&con, "192.168.0.1", 4059, readObjects) != 0)
{
printf("Error.");
}

ret = com_initializeConnection(connection);
if (ret != DLMS_ERROR_CODE_OK)
{
return ret;
}
const unsigned char ln[] = { 1,0,99,1,0,255 };
gxProfileGeneric reg_profile;
cosem_init2((gxObject*)&reg_profile, DLMS_OBJECT_TYPE_PROFILE_GENERIC, ln);
ret = com_read(connection, (gxObject*)&reg_profile, 3);

ret = com_read(connection, (gxObject*)&reg_profile, 2);

Profile picture for user Kurumi

Kurumi

6 years 5 months ago

Hi,

Hi,

Can you run GuruxDLMSClientExample with parameters:

GuruxDLMSClientExample.exe -h 192.168.0.1 -p 4059 -c 32 -a Low -P ABCD0001

It should succeed to read all the data from the meter.

BR,
Mikko

Techapirant

6 years 5 months ago

Without any changes

Without any changes downloaded latest code from github ad run as suggested still error

Profile picture for user Kurumi

Kurumi

6 years 5 months ago

Hi,

Hi,

We tested this with HDLC framing because it was in your log file. Now you have connected with WRAPPER.

I'll let you know as soon as I have more info.

BR,

Mikko

Profile picture for user Kurumi

Kurumi

6 years 5 months ago

Hi,

Hi,

This is now tested with WRAPPER.

Meter say that max PDU size is 255 bytes and it sends 901 bytes in PDU.
http://www.gurux.fi/GuruxDLMSTranslator?translate=000100010020002B6129A…

Can you ask them to fix this?

Find this
//Allocate 50 bytes more because some meters count this wrong and send few bytes too many.
con_initializeBuffers(connection, 50 + connection->settings.maxPduSize);

and change it to:
con_initializeBuffers(connection, 50 + 1024);

Now you can read it even there is an issue on the meter.

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