Skip to main content
Home
for DLMS smart meters

Main navigation

  • Home
  • Products
  • About us
  • Open Source
  • Community
  • Forum
  • Downloads
  • Gurux Club
User account menu
  • Log in

Breadcrumb

  1. Home
  2. Forums
  3. Multiple meter reading with one port

Multiple meter reading with one port

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 dlmsDeveloper, 29 December, 2022
Forums
Gurux.Net

Dear Gurux Manager
Hi

I use gurux.net and gurux.dlms C# for Read my devices
but i cant handle multiple meter read with an open port

i use this for open port :

GXNet server = new GXNet(NetworkType.Tcp, 777);
server.HostName = "x.x.x.x";
server.Port = 5060;
server.Open();
server.OnClientConnected += OnClientConnected;

and OnClientConnected method is:

GXNet server = (GXNet)sender;
try
{
using (GXNet cl = server.Attach(e.Info))
{
ReadMeter(cl, e.Info))
}
}
catch (Exception ex)
{
}

in this case when the second meter is connected, it waits until the first meter is disconnected.
How can I read all these together?

thanks.

Profile picture for user Kurumi

Kurumi

8 months 4 weeks ago

Hi,

Hi,

You need to create a thread in OnClientConnected that then reads the meter. In that way, it's not blocking the connection.

Something like this:
GXNet media = server.Attach(e);
Thread thread = new Thread(new ParameterizedThreadStart(ReadMeter));
thread.Start(media);

BR,
Mikko

  • Log in or register to post comments
  • Create new account
  • Reset your password

Hire Us!

Latest Releases

Fri, 09/22/2023 - 19:50
gurux.dlms.c 20230922.1
Mon, 09/18/2023 - 13:51
Gurux.DLMS.AMI4 4.0.2309.1801
Fri, 09/15/2023 - 12:00
gurux.dlms.c 20230915.1
Tue, 09/12/2023 - 11:10
Gurux.DLMS.AMI4 4.0.2309.1201
Fri, 09/08/2023 - 10:59
gurux.dlms.c 20230908.1

Open bugs

gurux.dlms.c
3
gurux.dlms.cpp
3
gurux.dlms.delphi
1

New forum topics

  • problem with date and time in ION
  • Permament rejected
  • DLMS- GMAC: SNRM, AARQ, AARE is responding but not able to decrypt the Authentication key received from the meter
  • List complete policy security configuration basic (configuration security))
  • Save Association view in database
More

Who's new

  • azcah
  • Robertciz
  • Ilushikqtg
  • Margaretyhs
  • Mariohag
RSS feed
Privacy FAQ GXDN Issues Contact
Follow Gurux on Twitter Follow Gurux on Linkedin