Skip to main content
Home
for DLMS smart meters

Main navigation

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

Breadcrumb

  1. Home
  2. DLMS Server How To Set Connection Parameters (client Address, Physical Address, Password, System Title)

DLMS Server how to set connection parameters (client address, physical address, password, system title)

Profile picture for user jack 001
By jack 001, 25 June, 2025
Forums
Gurux DLMS for ANSI C++

Hi, i want to ask regarding DLMS server.
i have successfully compile and run DLMS server example. i want to customize the connection parameters on Low authentication, such as client address, server address, logical address, password.
tell me please, how can i do that? inside GXDLMSBase.cpp, which part of the code deal with that? or is it in another source code? i tried finding 0x11 (default client address used to connect to the server) but no luck

Thank you
jack

Profile picture for user Kurumi

Kurumi

4 months 2 weeks ago

Hi, You can change the…

Hi,

You can change the authentication level and client address in GXDLMSAssociationLogicalName.

The server address is checked in IsTarget. To simplify the example, it returns true to all connections.

https://www.gurux.fi/Gurux.DLMS.Server

BR,
Mikko

Profile picture for user jack 001

jack 001

4 months 2 weeks ago

Thank you for the quick…

Thank you for the quick response.

in GXDLMSAssociationLogicalName, i find this block (starting from line 272 to 280)

CGXDLMSAssociationLogicalName::CGXDLMSAssociationLogicalName(std::string ln) :
CGXDLMSObject(DLMS_OBJECT_TYPE_ASSOCIATION_LOGICAL_NAME, ln, 0)
{
m_AssociationStatus = DLMS_ASSOCIATION_STATUS_NON_ASSOCIATED;
m_Secret.AddString("Gurux");
m_Version = 2;
m_ClientSAP = 0;
m_ServerSAP = 0;
}

1. is that the right place?
2. i've tried changed the password, recompiled the lib, but the change is not applied. I changed the password to "Gurux000", m_ClientSAP to 1, m_ServerSAP to 1, it wont connect. however, it still connects with old parameters. where else should i look for the right place containing the parameter?

Regards
jack

Profile picture for user jack 001

jack 001

4 months 2 weeks ago

Hi Mikko, it works now…

Hi Mikko, it works now. seems like the problem is the new library didn't get overwritten, so instead of using newly compiled lib file i used the old lib file.

How about changing the system title? i plan on using High authentication, particularly HighGMAC mode. i only find relevant line regarding system title in CGXDLMSAssociationLogicalName::Invoke method

Regards
Jack

Profile picture for user Kurumi

Kurumi

4 months 2 weeks ago

Hi, Don't make changes to…

Hi,

Don't make changes to main library. Make all changes in GXDLMSServerLN.h file like this:

//Constructor.
CGXDLMSServerLN(CGXDLMSAssociationLogicalName* ln,
CGXDLMSIecHdlcSetup* hdlc) : CGXDLMSBase(ln, hdlc)
{
ln->SetClientSAP(10);
ln->SetServerSAP(1);
}

This is a simple example and implements only one association view.

The system title is changed to security setup object.

BR,
Mikko

Profile picture for user jack 001

jack 001

4 months 2 weeks ago

Let me clarify, so i need to…

Let me clarify, so i need to stay away from the main lib, instead make any change inside the header file provided inside the server example include folder.
1. is it possible to instead make change in the GXDLMSBase file?
2. the above example implements only one association view. so i should prepare multiple client and server address for each authentication method, is that correct?
3. what about the LNs that is associated with an association, should i create each of the LN for each association, or one LNs can be reused?
Thank you for the directions.

Regards
jack

Profile picture for user Kurumi

Kurumi

4 months 2 weeks ago

Hi, Yes, you can also make…

Hi,

Yes, you can also make changes to GXDLMSBase. Don't make any changes to the development folder where the main library is.

You can create multiple association views as you described.

This example uses only one association to make it easier, but it's recommended to create multiple associations and choose the used association in IsTarget method.

Usually the meters is made with ANSI C, so check this example.
https://github.com/Gurux/GuruxDLMS.c/blob/cf36e3a16fb1de260d4c025c1aa0a…

It does what you want to do.

BR,
Mikko

Profile picture for user jack 001

jack 001

4 months 2 weeks ago

Hi, thank you for the…

Hi, thank you for the reference. i will check and try the ANSI C reference, and report my result.

Regards
jack

  • Create new account
  • Reset your password

Hire Us!

Latest Releases

  • Wed, 10/29/2025 - 08:51
    gurux.dlms.c 9.0.2510.2901
  • Thu, 10/16/2025 - 09:59
    gurux.dlms.java 4.0.83
  • Wed, 10/08/2025 - 10:21
    gurux.dlms.c 9.0.2510.0801
  • Fri, 09/26/2025 - 10:02
    gurux.dlms.cpp 9.0.2509.2601
  • Fri, 09/26/2025 - 09:45
    gurux.dlms.c 9.0.2509.2601

New forum topics

  • Guidance on using the source codes
  • How to get/convert user readable format data from readRowsByRange
  • Insufficient memory to continue the execution of the program.
  • The client instance code failed to connect to the electricity meter for authentication
  • Unable to Release Request when closing connection with meter.
More
RSS feed
Privacy FAQ GXDN Issues Contact
Follow Gurux on Twitter Follow Gurux on Linkedin