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. Problem While Debugging

Problem while Debugging

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 poojash , 12 April, 2021
Forums
Known problems

Hi,
I am trying to port Atmel's GuruxDLMSClientExample into MPLAB X IDE Using XC32 compiler. I am sending
uint8_t test_lnt_command[] = {0x7E,0xA0,0x07,0x03,0x21,0x93,0x0F,0x01,0x7E};
this through USART then I got reply from meter but when I call
"cl_init(&meterSettings, 1, 32, 1, DLMS_AUTHENTICATION_LOW, "lnt1", DLMS_INTERFACE_TYPE_HDLC);"
then debugger is stops at
"memset(settings->preEstablishedSystemTitle, 0, 8); "
Please help us to solve this problem.

Profile picture for user Kurumi

Kurumi

5 years 2 months ago

Hi,

Hi,

I believe that there is no space allocated for preEstablishedSystemTitle. You are not using malloc and you need to do it by yourself or use malloc.

BR,
Mikko

poojash

5 years 1 month ago

Hello,

Hello,
Could you please help me where to and how to add Malloc.

Profile picture for user Kurumi

Kurumi

5 years 1 month ago

Hi,

Hi,

You have defined this line:
DLMS_IGNORE_MALLOC

Just make sure that it's not defined and malloc is used.

BR,
Mikko

poojash

5 years 1 month ago

hello,

hello,
I am Using Atmel code from gurux. when com_initializeConnection() is called but SNRM request not sending by controller. How to solve this?

Profile picture for user Kurumi

Kurumi

5 years 1 month ago

Hi,

Hi,

Is the message generated? Is the problem that the message is not sent with UART?

BR,
Mikko

poojash

5 years 1 month ago

In reply to Hi, by Kurumi

Hi,

Hi,
when I uncomment the DLmS_IGNORE_MALLOC then I got lots of errors.

poojash

5 years 1 month ago

Hi,

Hi,
I want to know that, Is there usart configuration/connection settings required in cl_init() function. Means I want to know is there any configuration to send data through USART.

Profile picture for user Kurumi

Kurumi

5 years 1 month ago

Hi,

Hi,

The stack will only generate and parse the bytes. You can send data as you need and you don't need to config UART for the stack.

BR,
Mikko

poojash

5 years 1 month ago

Hello

Hello
Sir do you have Gurux code for SAME54 Xplained pro board to read all objects of meter ?
Please help us

Profile picture for user Kurumi

Kurumi

5 years 1 month ago

Hi,

Hi,

You can use the default library to read the data. The only thing you need to change is how you send and receive bytes from the serial port.

https://github.com/Gurux/GuruxDLMS.c

BR,
Mikko

poojash

5 years 1 month ago

hello sir,

hello sir,
I can now send SNRM request got response from meter. When I send AARQ request I receive response that I can seen on Docklight but it controller receives only last 24 bytes of AARQ Response.

Profile picture for user Kurumi

Kurumi

5 years 1 month ago

Hello,

Hello,

I believe that your UART buffer is overridden. Check if that is the reason. Try to listen to UART events and handle data when it arrives

BR,
Mikko

poojash

5 years 1 month ago

Hello,

Hello,
Now I can Receives whole frame and process it. Now my AARQ Failed And closed connection.

Profile picture for user Kurumi

Kurumi

5 years 1 month ago

Hi,

Hi,

If your ARQ send fails, the reason might be the size of the UART buffer. Make sure that all data that you write to the buffer can fit it.

BR,
Mikko

poojash

5 years 1 month ago

Hello,

Hello,
I can send AARQ Request and I get response from meter. I am using Low Authentication
following are frames it generates....
TX: 7E A0 3C 03 41 10 2E 5E E6 E6 00 60 2E A1 09 06 07 60 85 74 05 08 01 01 8A 02 07 80 8B 07 60 85 74 05 08 02 01 AC 02 80 00 BE 10 04 0E 01 00 00 00 06 5F 1F 04 00 00 1E 1D FF FF 43 3C 7E
RX: 7E A0 37 41 03 30 21 79 E6 E7 00 61 29 A1 09 06 07 60 85 74 05 08 01 01 A2 03 02 01 01 A3 05 A1 03 02 01 0D BE 10 04 0E 08 00 06 5F 1F 04 00 00 10 1C 04 00 00 07 15 2D 7E
TX: 7E A0 07 03 41 53 56 A2 7E
RX: 7E A0 1E 41 03 73 8E 7F 81 80 12 05 01 80 06 01 80 07 04 00 00 00 01 08 04 00 00 00 01 53 3B 7E
So where I have to change it

Profile picture for user Kurumi

Kurumi

5 years 1 month ago

Hi,

Hi,

Meter rejects the connection. Your password is empty. Check also client address. Not it's 32 (0x32).

BR,
Mikko

poojash

5 years ago

Hi sir ,

Hi sir ,
I want know about "pushObjectList".
Where and how I can create object list.

Profile picture for user Kurumi

Kurumi

5 years ago

Hi sir,

Hi sir,

Please, create a topic if you have a new question.

See attribute #2.
https://www.gurux.fi/Gurux.DLMS.Objects.GXDLMSPushSetup
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