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 2 months 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 1 month 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 1 month 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 1 month 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 1 month 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 1 month ago

Thank you Mikko

Thank you Mikko

  • Create new account
  • Reset your password

Hire Us!

Latest Releases

  • Mon, 07/27/2026 - 12:37
    gurux.dlms.cpp 9.0.2607.2701
  • Thu, 07/23/2026 - 16:19
    gurux.dlms.java 4.0.96
  • Thu, 07/09/2026 - 14:34
    Gurux.DLMS.Python 1.0.201
  • Fri, 06/26/2026 - 16:32
    Gurux.Service 3.0.2606.2601
  • Wed, 06/24/2026 - 08:36
    Gurux.DLMS.Python 1.0.200

New forum topics

  • Service not known error on gprs communication
  • Help Needed: Interfacing Saral 100 Energy Meter with Microcontroller via RS232
  • Connecting Meter to Agent via serial
  • Reading block profile with Compact array
  • DLMS server - serving multiple similar datasets gathered from multiple meters across distinct logical addresses
More

Who's new

  • Thomasqto
  • Uka Ibe
  • CTKNhZElptjSlOrpkXl
  • YCbccqfLGRMnlCWoJhXP
  • Malcolmactig
RSS feed
Privacy FAQ GXDN Issues Contact
Follow Gurux on Twitter Follow Gurux on Linkedin