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. Reconnecting After Communication Error - Gurux.NET

Reconnecting after communication error - Gurux.NET

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 pstrejczek , 1 February, 2018
Forums
Gurux.DLMS

Hello,

I have a problem with reconnecting to the meter after communication error.

I'm using the code from the example with GXDLMSReader to connect to Landis Gyr ZMQ meter. I can open the connection, read data and then close - then every 20 seconds repeat - everything works fine.

The connection is via RS232 but with MOXA NPort converter in Real COM mode.

Sometimes there are some problems with the connection and the data read fails. When I want to reconnect after the error the connection is rejected and I have to wait for a few (about 5) minutes and then another connection is allowed.

Is there a way to overcome this ? Is there a way reconnect immediatelly after the communication error without waiting this 5 minutes ?

Thanks in advance for any help

Profile picture for user Kurumi

Kurumi

8 years 4 months ago

Reconnecting after communication error - Gurux.NET

Hi,

You should call DIsconnect when you close the connection. If a connection fails, you can call DIsconnect and try to connect again.

This is normal behavior if Disconnect is not called properly. There is an inactivity timeout that defines how long meter expects data from the client before it closes the connection. This might cause problems if the connection is not closed properly.
This inactivity timeout is defined on IEC HDLC setup object. You can try to decrease it.

BR,

Mikko

pstrejczek

8 years 4 months ago

In reply to Reconnecting after communication error - Gurux.NET by Kurumi

Thank you.

Thank you.

I will try to do disconnect before connect when the communication error occurs.
I will also check the timeout setting.

  • 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