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. Logical Name, Can Be Nullified/corrupted

Logical name, can be nullified/corrupted

By enemy235 , 13 November, 2025
Project
gurux.dlms.java
Status
Closed (works as designed)

I’ve encountered an issue where the meter can send an incorrect response to the request for first attribute and after that local LN is changed.

Current Behavior:
When parsing the response for the first attribute, the Logical Name of a local object is being updated based on the meter’s response. This can cause problems if the response is incorrect. I’ve observed cases where the LN becomes null or changes to a different one entirely. (I've seen a meter to respond with two PDUs in one TCP message, or meter closed the TCP connection before responding.)
Once this happens, further communication with that object is impossible. The only way to recover is to refresh the association or manually correct the Logical Name.

Example:
In one instance, the meter responded to the current security setup 0.0.43.0.0.255 with the real instance of currently connected security setup: 0.0.43.0.5.255. That changed the local object from 0.0.43.0.0.255 to 0.0.43.0.5.255.

Suggested Solution:
The Logical Name should never be modified based on responses from the meter.
A possible solution would be to maintain an internal copy of the LN that remains immutable and is used for all requests, while a secondary copy could reflect any changes reported by the meter.

Currently it should be handled by this method. But the check can be skipped, if the value is not a byte[]. If it is a null, it will return a null. This check needs some work and also the setLogicalName in each object can be adjusted, to not to change the LN. But the LN needs to be changed when loading the object from xml or i think when reading the associacion list, it uses this method also.

public static String toLogicalName(final Object value) {
if (value instanceof byte[]) {
byte[] buff = (byte[]) value;
if (buff.length == 0) {
buff = new byte[6];
}
if (buff.length == 6) {
return (buff[0] & 0xFF) + "." + (buff[1] & 0xFF) + "." + (buff[2] & 0xFF) + "." + (buff[3] & 0xFF) + "."
+ (buff[4] & 0xFF) + "." + (buff[5] & 0xFF);
}
throw new IllegalArgumentException("Invalid Logical name.");
}
return (String) value;
}

Priority
Normal
Category
Bug report
  • 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

  • Possible memory leak in file dlms.c, getCompactArrayItem(), getCompactArrayItem2()
  • Official Gurux.DLMS.Client.Example.Net fails during High GMAC secure association (Invalid PDU), while Gurux Director connects successfully
  • gurux_dlms.GXDateTime.GXDateTime object Error in Python
  • T_APPL_DATA_LN_N1 subtest 3 fails on an LN-only server regardless of the response to a non-existing-object GET
  • Version mismatch between Gurux.DLMS 9.x and Gurux.Common/Gurux.Serial 8.x
More
RSS feed
Privacy FAQ GXDN Issues Contact
Follow Gurux on Twitter Follow Gurux on Linkedin