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. Unable To Read Meter Using Dynamic IP Addresses In GPRS Connection

Unable to read meter using Dynamic IP addresses in GPRS 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 JSonWrapper , 23 July, 2019
Forums
DLMSDirector

Hi everyone,
I am pretty new to DLMS and Smartmeters,
For a customer, I have a DLMS smartmeter that I can connect via Optical Port,
It has HighGMAC authentication, I know phisical and logical Server and client address
It connects both with HDLC and Wrapper, I don't know the difference (I will appreciate if you can address me on some documentation)
Start Protocol is DLMS, with Logical Name Referencing,
I have both Block Cipher Key and Authentication Key.

If I connect on serial port I can get all the values from all the registers, but if I try to connect via GPRS,
with Dynamic IP, I can get the notification for the meter connection on the PC where I have DLMS Director but if in Device Settings i change Media to Net, after a while I get an error that the meter didn't respond in the given time.

As I am pretty new I don't know if the problem is in the GPRS Connection, in the start of the communication, if by protocol different address are defined, please any advice is well accepted
The next step is to create a c# app following https://www.gurux.fi/Gurux.DLMS.DynamicIP

Thanks
JsonWrapper

JSonWrapper

6 years 10 months ago

I add the DLMS Director

I add the DLMS Director Connection Parameter

Image
Profile picture for user Kurumi

Kurumi

6 years 10 months ago

Hi,

Hi,

GXDLMSDirector doesn't support dynamic IP addresses. You need to create own app that listens to incoming connections and then reads Logical Device Name and maps meter using the Logical Device Name.

BR,

Mikko

JSonWrapper

6 years 10 months ago

Hi, thanks for your advice.

Hi, thanks for your advice.

In the picture below i try to open a connection, but i get an invalid connection exception...

Below there is my code, which is pretty much the same of the example in the tutorial https://www.gurux.fi/Gurux.DLMS.DynamicIP

private static void OnClientConnected(object sender, ConnectionEventArgs e)
{

Console.WriteLine("Client {0} is connected.", e.Info);
GXNet server = (GXNet)sender;
try
{
var IP_Port = e.Info.Split(':', StringSplitOptions.RemoveEmptyEntries);
using (GXNet cl = new GXNet(NetworkType.Tcp, IP_Port[0], int.Parse(IP_Port[1])))
{
GXDLMSSecureClient dlmsClient = new GXDLMSSecureClient()
{
Authentication = Gurux.DLMS.Enums.Authentication.HighGMAC,
ClientAddress = 1,
ServerAddress = 1,
UseLogicalNameReferencing = true,
InterfaceType = Gurux.DLMS.Enums.InterfaceType.WRAPPER,

};

dlmsClient.Ciphering.Security = Gurux.DLMS.Enums.Security.AuthenticationEncryption;
dlmsClient.Ciphering.SystemTitle = Encoding.ASCII.GetBytes("SACSACSA");
dlmsClient.Ciphering.AuthenticationKey = new byte[] { 0xFF, 0xEE, 0xDD, 0xCC, 0xBB, 0xAA, 0x99, 0x88, 0x77, 0x66, 0x55, 0x44, 0x33, 0x22, 0x11, 0x00 };
dlmsClient.Ciphering.BlockCipherKey = new byte[] { 0x00, 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77, 0x88, 0x99, 0xAA, 0xBB, 0xCC, 0xDD, 0xEE, 0xF1 };

GXDLMSReader cl1 = new GXDLMSReader(dlmsClient, cl, System.Diagnostics.TraceLevel.Verbose);

cl1.ReadAll(false);
//Create own thread for each meter if you are handling multiple meters simultaneously.
//new Thread(new ThreadStart(cl.ReadAll));
}
}
catch (Exception ex)
{
Console.WriteLine(ex.Message);
}

Image

JSonWrapper

6 years 10 months ago

This is the method that throw

This is the method that throw the exception

Image
Profile picture for user Kurumi

Kurumi

6 years 10 months ago

Hi,

Hi,

The meter must start the connection when you are using a public IP address in GPRS connections. It's a security option in GPRS networks and there is nothing that you can do for it.
You must use the static IP address to make this work like this, but static IP addresses are usually more expensive.

BR,
Mikko

Aswini Ash

2 years 5 months ago

Hi , As u said dynamic IP…

Hi ,

As u said dynamic IP address does not support DLMSDirector . I have own listener created through socketserver in java. i am able to read data from meter and keeping obicodes and data like Instantaneous and Load and Events and keeping in in one file in hexa fromat. is there any way to read that file using gurux library in java . Please see the attached file . Please reply me ASAP i am new to this meter.

Image
  • 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