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. Node
  3. WaitTime Not Working For Media.Open()

WaitTime not working for Media.Open()

By hhkx , 4 June, 2024
Forums
Gurux.Net

Hi Kurumi,

I need to increase the connection timeout for socket opening. However, it always waits for around 20 seconds and throw "target machine actively refuses it" exception. This wait time is only working after sending commands. But I think it needs to wait for socket connection as well.

Media = new GXNet()
{
HostName = ipAddress,
Port = port,
Protocol = NetworkType.Tcp,
Server = false,
Trace = TraceLevel.Verbose,
WaitTime = 300 * 1000,
};

Media.Open();

hhkx

2 years 5 months ago

I also tried from…

I also tried from GXDlmsDirector and it is the same.

Profile picture for user Kurumi

Kurumi

2 years 5 months ago

Hi, "Target machine actively…

Hi,

"Target machine actively refuses it" error means that there is no server listening in that TCP/IP port. Check that your TCP/IP address and port are correct.

BR,
Mikko

hhkx

2 years 5 months ago

Hi, Still, doesn't it have…

Hi,

Still, doesn't it have to wait until WaitTime? For instance, when connection is very slow..

Profile picture for user Kurumi

Kurumi

2 years 5 months ago

Hi, Open uses the default…

Hi,

Open uses the default wait time set by the operating system.

BR,
Mikko

hhkx

2 years 5 months ago

Hi, Then what is it GXNet…

Hi,

Then what is it GXNet.WaitTime for?

Is there any way to make it programmatically using a variable rather than operating system default?

Profile picture for user Kurumi

Kurumi

2 years 5 months ago

Hi, You can use WaitTime for…

Hi,

You can use WaitTime for connection wait time in the C# code. That is legacy code for Windows phones and that is not planned to be added for other programming languages.

BR,
Mikko

hhkx

2 years 4 months ago

Hi, That is what I am…

Hi,

That is what I am talking about. It doesn't. I change the WaitTime value in GXNet, but it always waits for 21 seconds.

Profile picture for user Kurumi

Kurumi

2 years 4 months ago

Hi, The server returns this…

Hi,

The server returns this error and wait time doesn't affect it.
It means the machine exists but has no services listening on the specified port.

BR,

Mikko

  • Create new account
  • Reset your password

Hire Us!

Latest Releases

  • Tue, 10/13/2026 - 12:00
    gurux.dlms.java 4.0.97
  • Tue, 09/22/2026 - 14:02
    Gurux.DLMS.Net 9.0.2609.2201
  • Mon, 09/21/2026 - 10:18
    Gurux.DLMS.Net 9.0.2609.2101
  • Wed, 08/26/2026 - 09:04
    Gurux.DLMS.Python 1.0.203
  • Mon, 08/17/2026 - 11:28
    Gurux.DLMS.Python 1.0.202

New forum topics

  • Need RJ45 pin configuration for Saral 300 and Saral 305 Secure meters
  • Query Regarding Class 63 Status Mapping Support in Gurux DLMS Python
  • Inhemeter
  • DLMS Server - Profile Generic - can't add too many items to profile generic capture object - how to set maximum profile entries
  • HDLC Frames sequencing
More
RSS feed
Privacy FAQ GXDN Issues Contact
Follow Gurux on Twitter Follow Gurux on Linkedin