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. Changing The Password of The Server

Changing the password of the server

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 DDobrev21 , 18 February, 2022
Forums
Gurux.DLMS

Hello,

I am connecting to the DLMS server using high authentication level and everything works as expected.
I was wondering if I can change the existing password of the server C example. Thanks.

Best regards, Dimitar

Profile picture for user Kurumi

Kurumi

4 years 3 months ago

Hi Dimitar,

Hi Dimitar,

Get the latest version. There is a new method com_updateHighLevelPassword in the client example.
You can change the password if you change the secret for the gxAssociationLogicalName object and then call com_updateHighLevelPassword method.

BR,
Mikko

DDobrev21

4 years 3 months ago

Hell,

Hello,

Is this the secret that I have to change : bb_addString(&associationHigh.secret, "Gurux");, and if so,
how should I remove "Gurux" from the string because if I try to change it like that bb_addString(&associationHigh.secret, "123456"); it replaces the first 5 symbols from the new pass with Gurux and in my example the password changes to "Gurux6". I tried bb_clear(&associationHigh.secret);, but it doesn't work. Also, I am using the GuruxDirector. Thanks.

Best regards, Dimitar

Profile picture for user Kurumi

Kurumi

4 years 3 months ago

Hi Dimitar,

Hi Dimitar,

I'm sorry. This was my mistake. I thought that you want to update the password with ANSI C client example.

Select "Association Logical Name" and then select "General" tab. Check "Update High password" and update the new password. You need to connect using High-Level authentication to change the password.

BR,
Mikko

DDobrev21

4 years 3 months ago

Hi,

Hi,

Thanks for the reply. Now I am trying to change the password using the .NET client example. Is com_updateHighLevelPassword() method present there and if not, how should I change it. And also is there a way to change the pass from the server side and the new password to be the default one. Thanks.

Best regards, Dimitar

Profile picture for user Kurumi

Kurumi

4 years 3 months ago

Hi Dimitar,

Hi Dimitar,

You can use GXDLMSAssociationLogicalName.UpdateSecret -method for that.

You can change the password for the meter side by searching the association view and updating the password like this:
bb_clear(&ln->secret);
bb_addString(&ln->secret, "NEW_PASSWORD");

BR,
Mikko

DDobrev21

4 years 3 months ago

Okay, thanks for the fast

Hi,

Thanks for the fast reply. But ln is const unsighed char ln[], isn't it. So it does not have .secret property. I can see in the server example that you are using bb_addString(&associationLow.secret, "Gurux"); and bb_addString(&associationHigh.secret, "Gurux");. I found this method call in the main.c in int addAssociationLow() and int addAssociationHigh() methods. How should I proceed? Thanks.

Best regards, Dimitar

Profile picture for user Kurumi

Kurumi

4 years 3 months ago

Hi,

Hi,

ln in my example is GXDLMSAssociationLogicalName object, not a logical name. You can do it like this:

gxAssociationLogicalName associationLow;
bb_clear(&associationLow.secret);
bb_addString(&associationLow.secret, "NEW_PASSWORD");

BR,
Mikko

DDobrev21

4 years 3 months ago

Hello,

Hello,

Yes I have already tried to do it like this and in reply #3 I have explained what happens when I use
bb_clear(); and bb_addString();. All of the alterations that I have made to the code is in main.c in addAssociationLow() and int addAssociationHigh() methods.

Best regards, Dimitar

Profile picture for user Kurumi

Kurumi

4 years 3 months ago

Hi Dimitar,

Hi Dimitar,

When you change the secret in addAssociationLow or addAssociationHigh methods it will change the default password. Make sure that you don't read the default password from the EEPROM or file. It will be overwritten on load.

BR,
Mikko

DDobrev21

4 years 3 months ago

Hello,

Hello,

I have found that the password is read from settings.raw file. The problem is that neither bb_addString(&associationHigh.secret, "NEW_PASS") nor bb_addString(&associationLow.secret, "NEW_PASS") saves the NEW_PASS to this file. The interesting part is that when I put comments on everything except return saveSettings() in loadSettings() function, the passwords starts to change. But here comes the problem, the Server crashes while reading Profile Generic property and even when I turn everything back on in the loadSettings() function it doesn't start to work properly again.
I tried changing the password directly in the file, but it only works with 5 character passwords and I don't know how to change the length of the pass. Could you give a piece of advice? Thanks.

Best regards, Dimitar

  • 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