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?
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.
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.
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.
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 >"
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
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.
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
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
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
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.
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