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. General Block Transfer (GBT) Dosen't Work For Encrypted Push Messages

General Block Transfer (GBT) dosen't work for encrypted push messages

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 pramodahanya , 12 December, 2018
Forums
Gurux DLMS for Java

I am using Gurux to read COSEM messages from an electric meter. Whenever the meter sends cyphered GBT messages the library treats each message as a complete message instead of waiting for the complete block transfer.
In my listener class extends GXDLMSSecureNotify implements IGXMediaListener, AutoCloseable, InitializingBean. In "onReceived" function when I call the "getdata" function to extract GXDLMSData from the reply, it goes to "GXDLMS.getPdu" reads the command as 224(GENERAL_BLOCK_TRANSFER) and the if condition in line 3028(GXDLMS) fails hence the handleGbt function in line 3031 is never called.
Below are the values at the if condition in line 3031:
data.getXml() = null
settings.isServer() = true
data.getMoreData().getValue() = 0
RequestTypes.FRAME.getValue() = 2

when I check data.isComplete() && !data.isMoreData() after calling "getData" method in my listner it always returns true even if there is more data.
For example, when I send On Installation push message I get 4 packets of length (115B*3 and 55B). the condition data.isComplete() && !data.isMoreData() is true for all the packets.
Is this a bug or am I doing something wrong?

pramodahanya

7 years 6 months ago

additional details

When I copy paste the received bytes in the Gurux DLMS Translator it shows Last block: true for the last block message. Is there any way to extract this info from the Gurux DLMS java library.

"<GeneralBlockTransfer>
<!--Last block: true-->
<!--Streaming: false-->
<!--Window size: 0-->
<BlockControl Value="128" />
<BlockNumber Value="3" />
<BlockNumberAck Value="0" />
<BlockData >"

Profile picture for user Kurumi

Kurumi

7 years 6 months ago

General Block Transfer (GBT) dosen't work for encrypted push mes

Hi,
What version you are using? Try with the latest one (2.2.19).
Can you send trace to me by email?
BR,

Mikko

pramodahanya

7 years 6 months ago

I have sent you an email with

I have sent you an email with trace data. I have tried with V2.2.19 and I still have the problem.

Profile picture for user Kurumi

Kurumi

7 years 6 months ago

General Block Transfer (GBT) dosen't work for encrypted push mes

Hi,

Push listener example is now updated. It was using the old way.
Get the latest version from GitHub.

BR,

Mikko

pramodahanya

7 years 5 months ago

Still not working :(

Hi Mikko,
I took the new code from GitHub. The new code is not even receiving the push messages.
I also tried by changing the client id from 1 to 102 "client = new GXDLMSClient(true, 1, 102, Authentication.NONE, null, InterfaceType.WRAPPER);" but still the "onReceived" method is not executed. In Wireshark, I could see the packets for TCP connection from the meter but no reply sent.
From the old code, I was able to receive the messages and parse them if the whole message was in a single packet. If GBT is used then I couldn't parse the messages.

BR,
Pramod

Profile picture for user Kurumi

Kurumi

7 years 5 months ago

General Block Transfer (GBT) dosen't work for encrypted push mes

Hi,

If onReceived is not called, then you are listening to different TCP/IP port that where meter sends data.
There are no ACK reply for Push messages,

BR,

Mikko

tallbada

2 years 5 months ago

Hi I have the same problem…

Hi
I have the same problem like pramodahanya in his last message.
In Wireshark, I could see the packets for TCP connection from the meter but no data receive. In non-encrypted association (low) the gbt work well.

If you have any idea.
Regards.

Profile picture for user Kurumi

Kurumi

2 years 5 months ago

Hi tallbada, Create a new…

Hi tallbada,

Create a new topic and I'll answer your question there.

https://www.gurux.fi/ForumRules

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