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

  • 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
RSS feed
Privacy FAQ GXDN Issues Contact
Follow Gurux on Twitter Follow Gurux on Linkedin