Is there any setting which enables frame logging in encrypted connections? I use standard logging from GDLMSReader example and when connection is encrypted, bytes are not visible in logs.
Hi Mikko, I found the reason for this empty logs. There is a bug in Gurux Example, GXDLMSReader.java.
The reason for empty logs is that there are empty frames being sent during updateFrameCounter method execution. When using WRAPPER interface, GXDLMSClient::snrmRequest returns empty byte array, which is then transmitted to the meter. Meter does not respond to such transmission, which causes the timeout excetpion in client app.
Empty transmission is performed because there is incorrect 'if' condition in the code. It checks whether the 'data' byte array is null, but it actually never is. Instead, when using WRAPPER interface, 'date' byte array is empty.
So the condition should be
if (data.length > 0)
instead of
if (data != null)
After this change, transmission is processed correctly within updateFrameCounter() method.
Hi, If you add -t Verbose…
Hi,
If you add -t Verbose argument, you can see sent and received bytes.
Logging doesn't depend on the authentication level.
BR,
Mikko
My bad, I meant encrypted…
My bad, I meant encrypted connection, not HLS. Does logging depend on encryption?
Hi, Used encryption doesn't…
Hi,
Used encryption doesn't affect logging. Send and receive bytes are shown on the console when verbose mode is used.
I believe that you have made changes for the reader and logging is ignored.
BR,
Mikko
Hi Mikko, I found the reason…
Hi Mikko, I found the reason for this empty logs. There is a bug in Gurux Example, GXDLMSReader.java.
The reason for empty logs is that there are empty frames being sent during updateFrameCounter method execution. When using WRAPPER interface, GXDLMSClient::snrmRequest returns empty byte array, which is then transmitted to the meter. Meter does not respond to such transmission, which causes the timeout excetpion in client app.
Empty transmission is performed because there is incorrect 'if' condition in the code. It checks whether the 'data' byte array is null, but it actually never is. Instead, when using WRAPPER interface, 'date' byte array is empty.
So the condition should be
if (data.length > 0)
instead of
if (data != null)
After this change, transmission is processed correctly within updateFrameCounter() method.
Hi Piotr, Thank you for…
Hi Piotr,
Thank you for pointing this out. This is now fixed and updated to the GitHub.
BR,
Mikko