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. Reading LGZ, Double Trouble

Reading LGZ, double trouble

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 hernan , 6 September, 2019
Forums
Gurux DLMS for Java

Hello

While trying to read some obis code from a LGZ meter, two problems

FIRST
With OLD version of Gurux Java to read "1.1.1.8.0.255"

-------- Reading GXDLMSRegister 1.1.1.8.0.255
<- 11:27:00.890 7E A0 19 03 21 76 4F DC E6 E6 00 C0 01 C1 00 03 01 01 01 08 00 FF 02 00 E7 F7 7E
-> 11:27:00.952 7E A0 19 21 03 96 41 9D E6 E7 00 C4 01 C1 00 14 00 00 00 00 00 01 75 5D ED 57 7E

Seems reads OK!... BUT, just other codes fails, example "1.1.1.8.1.255"

Reading GXDLMSExtendedRegister 1.1.1.8.1.255
<- 11:27:01.703 7E A0 19 03 21 DC 1F D6 E6 E6 00 C0 01 C1 00 04 01 01 01 08 01 FF 02 00 BE 02 7E
-> 11:27:01.765 7E A0 11 21 03 FC C5 B4 E6 E7 00 C4 01 C1 01 03 73 82 7E
Error! at index: 2 Access Error : Device reports Read-Write denied.
11:27:01.765 [main] DEBUG guruxeingeclient.Common - error
gurux.dlms.GXDLMSException: Access Error : Device reports Read-Write denied.
at gurux.dlms.client.GXCommunicate.readDLMSPacket(GXCommunicate.java:259) ~[classes/:na]
at gurux.dlms.client.GXCommunicate.readDataBlock(GXCommunicate.java:281) ~[classes/:na]
at gurux.dlms.client.GXCommunicate.readObject(GXCommunicate.java:453) ~[classes/:na]

SECOND

So I try Latest version on github (also really slower somehow)

-------- Reading GXDLMSRegister 1.1.1.8.0.255
<- 11:15:09.186 7E A0 19 03 21 76 4F DC E6 E6 00 C0 01 C1 00 03 01 01 01 08 00 FF 02 00 E7 F7 7E
Invalid HDLC Frame: 96 Expected: 72
Data send failed. Try to resend 1/3
Invalid HDLC Frame: 96 Expected: 72
Data send failed. Try to resend 2/3
Invalid HDLC Frame: 96 Expected: 72
-> 11:16:03.283 A0 22 21 03 74 BA D5 E6 E7 00 C4 01 C1 00 09 10 4C 47 5A 31 32 39 37 31 31 37 00 65 00 00 00 00 52 C4 7E 7E A0 19 21 03 96 41 9D E6 E7 00 C4 01 C1 00 14 00 00 00 00 00 01 74 FB 09 8E 7E
Error! at index: 2 Failed to receive reply from the device in given time.

hernan

6 years 9 months ago

One of the problems solved,

One of the problems solved, at least in the Old version of Gurux, this meter uses GXDLMSRegister for 1.1.1.8.1.255, and NOT the GXDLMSExtendedRegister.

Profile picture for user Kurumi

Kurumi

6 years 9 months ago

Hi,

Hi,

I can't say anything without a full trace, but the frame counter is wrong for some reason.
Are you calling read withour sending it?

BR,
Mikko

hernan

6 years 9 months ago

With Java older versions I

With Java older versions I get connected at least, and I can read some codes, the biggest problem I've got with new versions (Java, also python version!) is that it reads no answer, even though the meter do answer..

I've recorded the behavior for you to see, with a byte counter (attached gif)

Image

hernan

6 years 9 months ago

To see animated

To see animated
https://media.giphy.com/media/UqFpBwgrlnnirPgG4Y/giphy.gif

hernan

6 years 9 months ago

To see animated

.

Profile picture for user Kurumi

Kurumi

6 years 8 months ago

Hi hernan,

Hi hernan,

What is the version number of the old version? Can you send a textual log from received data?

BR,
Mikko

hernan

6 years 8 months ago

Sorry I haven't got the

Sorry I haven't got the number of "old" version, because it's a mix of source codes, but I can tell you it uses GXCommunicate instead of GXDLMSReader

Backing to the github version, here is the full log: (please look for the TIME of waiting, it's about ONE MINUTE waiting for an answer that the meter already sent)

WITH LATEST VERSION
============================================

Authentication: None
ClientAddress: 0x10
ServerAddress: 0x1
TX: 13:51:02.002 7E A0 07 03 21 93 0F 01 7E
RX: 13:51:02.065 7E A0 1E 21 03 73 C3 7A 81 80 12 05 01 80 06 01 3E 07 04 00 00 00 01 08 04 00 00 00 01 07 22 7E
TX: 13:51:02.065 7E A0 2B 03 21 10 FB AF E6 E6 00 60 1D A1 09 06 07 60 85 74 05 08 01 01 BE 10 04 0E 01 00 00 00 06 5F 1F 04 00 00 1E 1D FF FF C5 E4 7E
Data send failed. Try to resend 1/3
TX: 13:52:02.195 7E A0 2B 03 21 10 FB AF E6 E6 00 60 1D A1 09 06 07 60 85 74 05 08 01 01 BE 10 04 0E 01 00 00 00 06 5F 1F 04 00 00 1E 1D FF FF C5 E4 7E
RX: 13:52:02.242 7E A0 37 21 03 30 6C 7C E6 E7 00 61 28 A1 09 06 07 60 85 74 05 08 01 01 A2 03 02 01 00 A3 05 A1 03 02 01 00 BE 0F 04 0D 08 00 06 5F 1F 04 00 00 02 18 13 88 00 07 38 2F 7E
13:52:02.273 [main] DEBUG guruxclient.LandisGyr - READING TIME
TX: 13:52:02.273 7E A0 19 03 21 32 6F D8 E6 E6 00 C0 01 C1 00 08 00 00 01 00 00 FF 02 00 60 1A 7E
RX: 13:52:02.320 7E A0 0C 21 03 97 3E 21 10 22 08 29 D6 7E
13:52:02.320 [main] ERROR guruxclient.LandisGyr - ex::
gurux.dlms.GXDLMSException: Access Error : Unknown error.
at gurux.dlms.client.GXDLMSReader.readDLMSPacket(GXDLMSReader.java:297) ~[guruxGithubMaven-1.0-SNAPSHOT-jar-with-dependencies.jar:na]
at gurux.dlms.client.GXDLMSReader.readDataBlock(GXDLMSReader.java:320) ~[guruxGithubMaven-1.0-SNAPSHOT-jar-with-dependencies.jar:na]
at gurux.dlms.client.GXDLMSReader.read(GXDLMSReader.java:493) ~[guruxGithubMaven-1.0-SNAPSHOT-jar-with-dependencies.jar:na]

WITH OLD VERSION
============================================

Authentication: None
ClientAddress: 0x10
ServerAddress: 0x1
<- 14:20:32.954 7E A0 07 03 21 93 0F 01 7E
-> 14:20:33.032 7E A0 1E 21 03 73 C3 7A 81 80 12 05 01 80 06 01 3E 07 04 00 00 00 01 08 04 00 00 00 01 07 22 7E
<- 14:20:33.267 7E A0 2B 03 21 10 FB AF E6 E6 00 60 1D A1 09 06 07 60 85 74 05 08 01 01 BE 10 04 0E 01 00 00 00 06 5F 1F 04 00 40 1E 1D FF FF E7 25 7E
-> 14:20:33.376 7E A0 37 21 03 30 6C 7C E6 E7 00 61 28 A1 09 06 07 60 85 74 05 08 01 01 A2 03 02 01 00 A3 05 A1 03 02 01 00 BE 0F 04 0D 08 00 06 5F 1F 04 00 00 02 18 13 88 00 07 38 2F 7E
14:20:33.391 [main] DEBUG guruxclient.Common - man.getName():Landis+Gyr
14:20:33.407 [main] DEBUG guruxclient.LandisGyr - READING TIME
<- 14:20:33.626 7E A0 19 03 21 32 6F D8 E6 E6 00 C0 01 C1 00 08 00 00 01 00 00 FF 02 00 60 1A 7E
-> 14:20:33.704 7E A0 1E 21 03 52 48 4A E6 E7 00 C4 01 C1 00 09 0C 07 E3 09 10 01 0E 10 11 FF 80 00 00 36 C8 7E

============================================
PD: About python version, it it only gives this answer (note 15 seconds between send and reply, even though meter responds immediately)
============================================

Gurux.DLMS.Client.Example.python>python main.py -t Verbose -r sn -c 16 -s 1 -S COM99
Authentication: Authentication.NONE
ClientAddress: 0x10
ServerAddress: 0x1
TX: 15:28:08 7E A0 07 03 21 93 0F 01 7E
RX: 15:28:23 7E A0 1E 21 03 73 C3 7A 81 80 12 05 01 80 06 01 3E 07 04 00 00 00 01 08 04 00 00 00 01 07 22 7E
DisconnectRequest

Profile picture for user Kurumi

Kurumi

6 years 8 months ago

Hi,

Hi,

We'll check python. You need to decrease the wait time. The message is lost and I believe it's causing the problem. Change wait time example to 10 seconds and try again.

Data is correct. GeneralProtection flag is set on a new version, but otherwise generated data is same.

BR,

Mikko

Profile picture for user Kurumi

Kurumi

6 years 8 months ago

Hi,

Hi,

There is a new version from Python (1.0.26) where are fixed few Short Name referencing issues.
You can now read your LGZ using Python.

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