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. DLMS Server How To Set Server Logical Address, and Attach Object To Different Association

DLMS Server how to set server logical address, and attach object to different association

Profile picture for user jack 001
By jack 001 , 12 July, 2026
Forums
Gurux DLMS for ANSI C++

Hello, good day
I want to ask regarding DLMS server:
- how to set the server's logical address? I havent yet found the methods regarding that, i only found:

    unsigned char GetClientSAP();
    void SetClientSAP(unsigned char value);
 
    unsigned short GetServerSAP();
    void SetServerSAP(unsigned short value);

and in the header file (GXDLMSServerLN.h) i set it like this:

CGXDLMSServerLN(CGXDLMSAssociationLogicalName* ln,
        CGXDLMSIecHdlcSetup* hdlc) : CGXDLMSBase(ln, hdlc)
    {
        // CGXDLMSSecuritySetup* pSecurity = new CGXDLMSSecuritySetup("0.0.43.0.2.255");
        // CGXByteBuffer systemTitle;
   
        ln->SetClientSAP(10);
        ln->SetServerSAP(11);
        CGXByteBuffer password;
        password.AddString("00011123");
        ln->SetSecret(password);
    }

- after that, how to attach it to different association (with different authentication level)? last time i asked, you stated that there will be example about it. perhaps can you show some code sample on how to achieve that?

If the latter should be posted on different post, i'd happily crerate new post. thank you

 

Regards

jack

 

Profile picture for user Kurumi

Kurumi

1 month ago

Hi, The client address is…

Hi,

The client address is usually bound to the CGXDLMSAssociationLogicalName. The server address is checked on IsTarget.
https://www.gurux.fi/Gurux.DLMS.Server

You can check the ANSI C implementation here: https://github.com/Gurux/GuruxDLMS.c/blob/b14e6e0b5505d90a78d059f3bafd7…

Regards,
Mikko

Profile picture for user jack 001

jack 001

1 month ago

Hi, thank you for the reply,…

Hi, thank you for the reply, i will try implement it in c++

Regards
jack

  • Create new account
  • Reset your password

Hire Us!

Latest Releases

  • Mon, 08/17/2026 - 11:28
    Gurux.DLMS.Python 1.0.202
  • Mon, 08/17/2026 - 09:47
    gurux.dlms.cpp 9.0.2608.1701
  • Mon, 08/17/2026 - 09:25
    gurux.dlms.c 9.0.2608.1701
  • 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

New forum topics

  • negative indexing for custom method/attribute
  • System title
  • Elster a1800 clock reset to year 2000 with one tariff billing
  • Possible memory leak in file dlms.c, getCompactArrayItem(), getCompactArrayItem2()
  • Official Gurux.DLMS.Client.Example.Net fails during High GMAC secure association (Invalid PDU), while Gurux Director connects successfully
More
RSS feed
Privacy FAQ GXDN Issues Contact
Follow Gurux on Twitter Follow Gurux on Linkedin