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. HLS Autentization Fails If Users Are Defined.

HLS Autentization fails if users are defined.

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 Ondrej_Pokorny , 28 July, 2022
Forums
DLMSDirector

Dear Sir,
I have problem with HLS Autentization when users (userIDs) are defined in Server for the Association.
The userID value is filled in Director in Clients Properties->Advanced-> User ID.

Our library refuses Autnetization request because of missing field AARQ_CALLING_AE_INVOCATION_ID (0xA9) in APDU (if present it sets variable userIDPresent = 1):
"
...
//user-id check
if(((userIDPresent == 0) && (IC1215Association_List[dlmsInstance->curAssoc].numUsers == 0)) ||
((userIDPresent == 1) && (IC1215Association_List[dlmsInstance->curAssoc].numUsers != 0)))
{
}
else
{
error = AARQ_ERR_AUTHENTICATION_FAILURE;
xdlmsError = AARQ_SERVICE_ERR_OTHER;
}
"

If I remove users from Server and clear User ID field, HLS Authentization is correct.
Could You tell me, how User ID is passed in Application Association Request (AARQ) APDU?

Thank You.

Best Regards
Ondrej

Profile picture for user Kurumi

Kurumi

3 years 10 months ago

Hi,

Hi,

What value you are using in the user ID?
Is that used ID value listed in the "User list" tab of the Association view object?

BR,
Mikko

Ondrej_Pokorny

3 years 10 months ago

Hello Mikko,

Hello Mikko,
on the server side, there is only one user with ID==100 (decimal) and name "User".
On the Director side, I cannot see any users (see picture attached).
Maybe I cannot see them, because the Association view is from last succesfull association (as I have written before, it is the association without users).
The user ID is set to 100 in DeviceProperties->Advanced (see picture attached).

This is connection log (Director updated to 8.2.2208.0101):
"
09:02:02 Initializing serial connection.
9:02:04 Send SNRM request.
7E A0 07 03 07 93 EC 76 7E
9:02:04
7E A0 1E 07 03 73 21 AF 81 80 12 05 01 80 06 01 80 07 04 00 00 00 01 08 04 00 00 00 01 53 3B 7E
09:02:04 Parsing UA reply succeeded.
9:02:04 Send AARQ request.
7E A0 70 03 07 10 1B CD E6 E6 00 60 62 A1 09 06 07 60 85 74 05 08 01 03 A6 0A 04 08 41 42 43 44 45 46 47 48 A9 03 02 01 64 8A 02 07 80 8B 07 60 85 74 05 08 02 05 AC 12 80 10 09 36 08 77 5C 0D 71 44 46 4B 3C 10 67 4E 0E 06 BE 23 04 21 21 1F 30 00 00 00 00 1F 58 4B 30 32 AF 28 57 07 12 C6 0D 7E 8F 17 FC 11 6F 9C B3 30 E2 4F 23 98 A7 E7 75 7E
9:02:04
7E A0 2D 07 03 30 81 B6 E6 E7 00 61 1F A1 09 06 07 60 85 74 05 08 01 03 A2 03 02 01 01 A3 05 A1 03 02 01 0D BE 06 04 04 0E 01 06 00 3D 0E 7E
09:02:04 Disconnect request
9:02:04
7E A0 1E 07 03 73 21 AF 81 80 12 05 01 80 06 01 80 07 04 00 00 00 01 08 04 00 00 00 01 53 3B 7E
Gurux.DLMS.GXDLMSConfirmedServiceError: ServiceError Initiate Error exception. Initiate Other
v GXDLMSDirector.GXDLMSCommunicator.InitializeConnection(Boolean force)
v GXDLMSDirector.GXDLMSDevice.InitializeConnection()
v GXDLMSDirector.MainForm.Connect(Object sender, GXAsyncWork work, Object[] parameters)
"
I believe if I Director adds AARQ_CALLING_AE_INVOCATION_ID field, the association would be correct.

Best Regards
Ondrej

Image

Ondrej_Pokorny

3 years 10 months ago

Hello Mikko,

Hello Mikko,
does above mentioned settings seem OK to You? And how is User ID passed in Application Association Request (AARQ) APDU?
Thank You.

Best Regards
Ondrej

Ondrej_Pokorny

3 years 9 months ago

Hello Mikko,

Hello Mikko,
I am still trying to find a bug in User support on our side. Now I am struggling with reading UserList.
Could You help us, please? To make users support working is our main goal now.
Could You kindly comment my previous questions too?
This is log from the Director and attached there is screenshot of the same messages in DLMS Translator:
"
9:14:23 Read object type AssociationLogicalName index: 10
7E A0 35 03 03 D6 A1 71 E6 E6 00 DB 08 53 41 43 53 41 43 53 41 1E 30 00 00 00 3B AB DE F2 D3 E1 68 C3 26 A3 AD 86 FF C1 36 84 7A DF 11 4A 62 48 E2 ED 67 F5 AC CB 7E
9:14:23
7E A0 44 03 03 9C 01 DA E6 E7 00 DB 08 45 4C 47 30 31 32 33 34 2D 30 00 00 00 3B E3 8B F3 54 DB DC E2 54 40 5E DF 35 85 81 A5 3A 4A 72 B4 74 E7 D2 22 72 DA A8 15 EC 83 AD 1F A6 A7 62 F9 B4 FD CE BB 74 2F 9E 7E
System.InvalidCastException: Objekt typu System.String nelze přetypovat na typ System.Byte[].
v Gurux.DLMS.Objects.GXDLMSAssociationLogicalName.Gurux.DLMS.Objects.IGXDLMSBase.SetValue(GXDLMSSettings settings, ValueEventArgs e)
v Gurux.DLMS.GXDLMSClient.UpdateValue(GXDLMSObject target, Int32 attributeIndex, Object value, List`1 columns)
v Gurux.DLMS.GXDLMSClient.UpdateValue(GXDLMSObject target, Int32 attributeIndex, Object value)
v GXDLMSDirector.GXDLMSCommunicator.Read(Object sender, GXDLMSObject obj, Boolean forceRead) v D:\Dokumenty\Visual Studio 2019\Projects\GXDLMSDirector\Development\GXDLMSCommunicator.cs:řádek 1904
v GXDLMSDirector.MainForm.Read(Object sender, GXAsyncWork work, Object[] parameters) v D:\Dokumenty\Visual Studio 2019\Projects\GXDLMSDirector\Development\MainForm.cs:řádek 2826
"
Best Regards
Ondrej

Image

Ondrej_Pokorny

3 years 9 months ago

Note- error message in

Note- error message in english is:
An object of type System.String cannot be cast to type System.Byte[].

  • 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