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. Settings Doesn't Work On .NET Client Whereas Does On GXDirector

Settings doesn't work on .NET client whereas does on GXDirector

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 hhkx , 4 August, 2021
Forums
Gurux.DLMS

Hi,

I am using same settings on both .net client and gxdlmsdirector. However, .net client can't connect to the meter.

Meter brand is sanxing.

Please see the attachment for the settings and below for .net code:

_dlmsSettings = new DLMS.ProtocolProvider.Settings();
_dlmsSettings.Scaler = 1;
_dlmsSettings.Trace = TraceLevel.Verbose;
_dlmsSettings.Client.Authentication = Authentication.None;
_dlmsSettings.Client.Ciphering.Security = (byte)Security.None;
_dlmsSettings.Iec = false;
_dlmsSettings.Client.UseLogicalNameReferencing = true;
_dlmsSettings.Client.ClientAddress = 10;
_dlmsSettings.Client.InterfaceType = InterfaceType.HDLC;
_dlmsSettings.Client.ServerAddress = 1;

_dlmsSettings.Media = new GXNet() {
HostName =ipAddress,
Port = 502,
Protocol = NetworkType.Tcp,
Server = false,
Trace = TraceLevel.Verbose,
};

Send SNRM request.7E A0 07 03 15 93 CD D0 7E
Info: Receive-Send Waiting Time: 15 sn.
TX: 10:16:51 7E A0 07 03 15 93 CD D0 7E
TX: 10:17:06 7E A0 07 03 15 93 CD D0 7E
TX: 10:17:21 7E A0 07 03 15 93 CD D0 7E
Failed to receive reply from the device in given time.

Image
Profile picture for user Kurumi

Kurumi

4 years 10 months ago

Hi,

Hi,

Your client address is wrong. It should be 0x10. Your server address is also different. You can count it like this:
_dlmsSettings.Client.ServerAddress = GXDLMSClient.GetServerAddress(0x3000, 1);

Check also your wait time.

BR,
Mikko

hhkx

4 years 10 months ago

Hi Mikko,

Hi Mikko,

I tried it again but still not connecting.

_dlmsSettings = new DLMS.ProtocolProvider.Settings();
_dlmsSettings.Trace = TraceLevel.Verbose;
_dlmsSettings.Client.Authentication = Authentication.None;
_dlmsSettings.Client.Ciphering.Security = (byte)Security.None;
_dlmsSettings.Iec = false;
_dlmsSettings.Client.UseLogicalNameReferencing = true;
_dlmsSettings.Client.ClientAddress = 0x10; // 16;
_dlmsSettings.Client.InterfaceType = InterfaceType.HDLC;
_dlmsSettings.Client.ServerAddress = GXDLMSClient.GetServerAddress(1, 3000);
// GetServerAddress(int logicalAddress, int physicalAddress); Also tried the other way around.

DLMS v1.4 - Send SNRM request.7E A0 0A 00 02 2E 71 21 93 52 66 7E
DLMS v1.4 - Info: Receive-Send Waiting Time: 15 sn.
DLMS v1.4 - TX: 12:15:21 7E A0 0A 00 02 2E 71 21 93 52 66 7E
DLMS v1.4 - TX: 12:15:36 7E A0 0A 00 02 2E 71 21 93 52 66 7E
DLMS v1.4 - TX: 12:15:51 7E A0 0A 00 02 2E 71 21 93 52 66 7E
Failed to receive reply from the device in given time.

hhkx

4 years 10 months ago

It worked with GXDLMSClient

It worked with GXDLMSClient.GetServerAddress(1, 12288);

12288 is the number replaced by 3000 when I unchecked hex on GXDLMSDirector.

Profile picture for user Kurumi

Kurumi

4 years 10 months ago

Hi Aaron,

Hi Aaron,

Thank you for the information. I forget to add 0x. I'll add it now.

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