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. Gas Meter Over GPRS (Dynamic IP) - Private After Public Connection

Gas Meter over GPRS (Dynamic IP) - private after public connection

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 orondelli , 17 May, 2021
Forums
Gurux.Net

Hi,

we managed to connect to the meter over GPRS (Dynamic IP). Everything works as expected (thanks for the library!).

As we are buying meters from different providers we need to make a public connection first to get the meter manufacturer name and then a private connection (using the correspondent manufacturer password) to download the readings.

How can we achieve that?

We can't close the socket since it is the meter contacting us at first place and the IP is dynamic so we can't call it back?

We basically nee to close the public client (not the socket) and open a private client straight away (same socket connection)

Many Thanks
Omar

Profile picture for user Kurumi

Kurumi

5 years ago

Hi Omar,

Hi Omar,

You need to check this:
https://www.gurux.fi/Gurux.DLMS.DynamicIP

There are differences between the meters. Some meters are expecting that you will call Release after you have read the meter info with public address. Some meter manufacturers expect that you will establish the new connection without calling the release and just sending SNRM/AARQ messages.

You should check Gurux.DLMS.AMI listener. It will do this.
https://github.com/Gurux/Gurux.DLMS.AMI

BR,
Mikko

orondelli

5 years ago

Hi Mikko,

Hi Mikko,

thanks for the AMI link but I can see it uses only one client (based on the app config) at a time.

internal static void OnClientConnected(object sender, Gurux.Common.ConnectionEventArgs e)
{
Console.WriteLine("Client {0} is connected.", e.Info);
GXNet server = (GXNet)sender;
try
{
GXNet media = server.Attach(e);
Thread thread = new Thread(new ParameterizedThreadStart(ReadMeter));
thread.Start(media);
}
catch (Exception ex)
{
Console.WriteLine(ex.Message);
}
}

After the meter has connected to the server (listener) I am looking for a way to open a public client (16) get some information (like serialNo) and then open a private client (17) to get meter readings.

Where do I call "Release" from?

Thanks

Profile picture for user Kurumi

Kurumi

5 years ago

Hi,

Hi,

AMI uses a public client to get Logical Device Name. Then it finds the correct meter and updates the settings.

Search ReleaseRequest-method.

BR,
Mikko

orondelli

5 years ago

Hi,

Hi,

yes I found the piece of code where it uses public and then private client. I also found the .Disconnect()
and .Release() methods you were talking about. As we are using the project Gurux.DLMS.Meter.Listener.Net (for GPRS dynamic IP) the GXDLMSReader has not any of the above methods (Gurux.Common 8.1.2002.1903, Gurux.DLMS 9.0.2008.2701, Gurux.Net 8.1.2002.1902). Are there any equivalent methods or do we need to update to the latest dll (the ones on the AMI project)?

Thanks

Profile picture for user Kurumi

Kurumi

5 years ago

Hi,

Hi,

Release is implemented in Gurux.DLMS. Add this and call it.
https://github.com/Gurux/Gurux.DLMS.Net/blob/434fee43d3f75d86834318230f…

BR,
Mikko

orondelli

5 years ago

Thank you Mikko

Thank you 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