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. Instantiations of GXDLMSServer

Instantiations of GXDLMSServer

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 danilodesouzapereira , 16 May, 2016
Forums
Gurux.DLMS

Hi,
I need to create a large number of objects from GXDLMSServer, trying to simulate a real metering system. If the servers are set to different ports of the same IP address, can a real DLMS client (Meter Data Colector, for example) communicate with those objects ?

Profile picture for user Kurumi

Kurumi

10 years ago

Instantiations of GXDLMSServer

Hi,

You should create own GXDLMSServer for each port and after that it's working.

BR,

Mikko

danilodesouzapereira

10 years ago

In reply to Instantiations of GXDLMSServer by Kurumi

Thank you Mikko,

Thank you Mikko,

I was really able to do it. But I still have a problem. It worked well for 1000 servers (from ports 4059 to 5058). But our system will have 40.000 (40 thousands) servers/meters. When I instantiate more than 1225 GXDLMSServer objects (with their corresponding ports), GXDLMSDirector communicates with only the first 1225 objects (I also tried with GXDLMSClient). I think I am facing tcp ports congestion. Using netstat prompt command, the assigned ports seem to be listenning, but I can't connect to those "high ports" servers.

Please, do you know a way to solve this? I'm now thinking of:

1) Creating a data concentrator or coordinator. It would receive dlms messages from the client and send them to the correct meter/server.

2) Alternatively, I could keep the servers disconnected from the network. Would it be possible to create a network listener to identify the first connection packet attempt from a client and then switch the correct server on? That would work such as a "server switcher".

You see, the problem here is that I have problems while keeping thousands of listening tcp ports.

Please, I urgently need your comment on this. I've got to make this work.

BR,
Danilo

Profile picture for user Kurumi

Kurumi

10 years ago

In reply to Thank you Mikko, by danilodesouzapereira

GXDLMSServer

Hi,

Is problem on the TCP/IP listening or DLMS part? Are you using HDLC or WRAPPER? We have made apps like this without problems.

BR,

Mikko

danilodesouzapereira

10 years ago

In reply to GXDLMSServer by Kurumi

I'm using wrapper and I think

I'm using wrapper and I think it's a tcp/ip listening problem.

The thousands of servers are created, the console prompt shows the servers being created since the first port. Using netstat command I confirm: the assigned ports have the "listening" status. But actually the dlms client can only connect with the first 1225 servers. When I try to connect to the last server created, for instance, gxdlmsdirector just can't connect, as if the server wasn't listening in that port.

Would that be a restriction of my computer, in particular? My OS is Windows 7.

Profile picture for user Kurumi

Kurumi

10 years ago

GXDLMSServer

Hi,

We can test this tomorrow with 10.000 servers. Are you using Java or C#?

BR,

Mikko

danilodesouzapereira

10 years ago

In reply to GXDLMSServer by Kurumi

I'm using c++ actually.

I'm using c++ actually.

Glad for your attention.

BR

Profile picture for user Kurumi

Kurumi

10 years ago

In reply to I'm using c++ actually. by danilodesouzapereira

GXDLMSServer

Hi,

This is good to know. Usually we are making simulator apps like this with C# or java.

BR,

Mikko

Profile picture for user Kurumi

Kurumi

10 years ago

GXDLMSServer

Hi,

If you want to implement so many TCP/IP connections you should create server using IOCP.
We have done it, but we do not have example for that at the moment. I suggest that you use Java or C# to implement server pool or then you create own example using IOCP.

BR,

Mikko

danilodesouzapereira

10 years ago

In reply to GXDLMSServer by Kurumi

Ok Mikko, I appreciate it.

Ok Mikko, I appreciate it.

I don't want to be boring. But what you think about this: I could implement only few servers (1000, lets say), make them active from ports 2000 to 2999. Each server would "manage" 40 other server objects which would be disconnected (no listening port associated). Then, the client sends packets to the connected server, that would identify the desired disconnected server and load its objects.

If this were possible, I could solve my whole problem. What you think about it?

Thanks in advance,
Danilo.

Profile picture for user Kurumi

Kurumi

10 years ago

GXDLMSServer

Hi,

We are using this functionality in gateways. After GW there are several meters and we are communicating with GW and GW sends packets to right meter. You do not need to create servers after GW. GW can generate data for them. Only problem is that you can connect only one GW at the time. So problem stays.

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