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. Gurux Sends "Object Reference Not Set To An Instance of An Object" In The Pass 4 of The HighGMAC Authentication

Gurux sends "Object reference not set to an instance of an object" in the pass 4 of the HighGMAC authentication

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 RSS , 31 May, 2019
Forums
Gurux.DLMS

Hello,

I want to establish Aplication Association between Gurux and a Meter using the HLS GMAC mechanism.

When the communication is in the "pass 4: Response to challenge: f (CtoS)", I get the message: "Object reference not set to an instance of an object".

Send AARQ request.
TX: 7E A0 53 00 02 58 7D 09 10 B8 BA E6 E6 00 60 42 A1 09 06 07 60 85 74 05 08 01 01 A6 0A 04 08 4D 4D 4D 00 00 00 00 01 8A 02 07 80 8B 07 60 85 74 05 08 02 05 AC 0A 80 08 4B 35 36 69 56 61 67 59 BE 10 04 0E 01 00 00 00 06 5F 1F 04 00 00 1E 1D FF FF B1 F1 7E

RX: 7E A0 53 09 00 02 58 7D 30 DB 0C E6 E7 00 61 42 A1 09 06 07 60 85 74 05 08 01 01 A2 03 02 01 00 A3 05 A1 03 02 01 0E 88 02 07 80 89 07 60 85 74 05 08 02 05 AA 0A 80 08 50 36 77 52 4A 32 31 46 BE 10 04 0E 08 00 06 5F 1F 04 00 00 18 1D 01 95 00 07 5D AE 7E

Authenticating.
TX: 7E A0 2F 00 02 58 7D 09 32 7E 18 E6 E6 00 C3 01 C1 00 0F 00 00 28 00 00 FF 01 01 09 11 10 00 00 00 01 1A 52 FE 7D D3 E7 27 48 97 3C 1E 28 54 2B 7E

RX: 7E A0 28 09 00 02 58 7D 52 01 2B E6 E7 00 C7 01 C1 00 01 00 09 11 10 01 23 45 67 FE 14 66 AF B3 DB CD 4F 93 89 E2 B7 28 C8 7E

Could you help me to solve this problem?

Best Regards

Profile picture for user Kurumi

Kurumi

7 years 2 months ago

Hi,

Hi,

What programming language you are using? We'll check this.

BR,
Mikko

RSS

7 years 2 months ago

Hi Mikko,

Hi Mikko,
I am developing an electrical metter using c language. I downloaded the Gurux DLMS Director for .Net 4.6. to test the comunnication.

https://www.gurux.fi/Downloads/gxdlmsdirector46/GXDLMSDirector.applicat…

Regards!

Profile picture for user Kurumi

Kurumi

7 years 1 month ago

Hi,

Hi,

Your meter doesn't return system title.

BR,
Mikko

RSS

7 years 1 month ago

Hi Mikko,

Hi Mikko,

My meter is sending an AARE APDU similar to the the example of the green book "11.6 Encoding of the AARE APDU", example: "LN referencing with no ciphering, HLS, successful establishment of the AA", the complete AARE APDU is showed in "Table 116".

This example uses the high-level-security-mechanism-name (5), but does not send the system title in the AARE, and the response in the pass 4 is not showed.

Now, in the Secured Connections tab of Gurux, I chose "security: none", this is because when I select "security: authentication", gurux sends in the AARQ the context_id (3) instead of the context_id (1) and in this case I think that the AARE must be different from the example in the green book.

should I change it to security: authentication?
Should I send the system title in step 4, or the system title is needed in the AARE when "security: authentication" is selected?

Best regards!

Profile picture for user Kurumi

Kurumi

7 years 1 month ago

Hi,

Hi,

This is interesting. In Green Book example the server system title is not sent in AARERE.

http://www.gurux.fi/GuruxDLMSTranslator?pdu=6142A109060760857405080101A…

All the meters what we are reading are returning system title in AARE.

http://www.gurux.fi/GuruxDLMSTranslator?pdu=6156A109060760857405080101A…

System title is not sent in Green Book AARQ example.
http://www.gurux.fi/GuruxDLMSTranslator?pdu=6036A1090607608574050801018…

I'll ask is APTitle mandatory when GMAC is used.

BR,

Mikko

RSS

7 years 1 month ago

Hi Mikko,

Hi Mikko,

Thanks for your answer,

Could you send me the APDU that gurux receives in step 4 (Answer to the challenge: f (CtoS))?

Best regards!

Profile picture for user Kurumi

Kurumi

7 years 1 month ago

Hi Rafael,

Hi Rafael,

Here is an example from the real meter.

http://www.gurux.fi/GuruxDLMSTranslator?pdu=6156A109060760857405080101A…

BR,

Mikko

RSS

7 years 1 month ago

Hi Mikko,

Hi Mikko,

Thanks for your answer,

Just as comment, in the green book, in the 9.2.2.2.2.1 Overview, you can find:
NOTE 2 The elements (System_Title), (Certificate) and (Client_User_Id) are optional.

Regards!

Profile picture for user Kurumi

Kurumi

7 years 1 month ago

Hi,

Hi,

It's true that system title is optional. Each meter has own system title. It's made from manufacturer ID and serial number. For this reason, it's usually coming with AARE message. Otherwise, the user must set it by hand before the ciphered connection can be established.

We are changing it so it can be optional in the future versions.

BR,

Mikko

  • Create new account
  • Reset your password

Hire Us!

Latest Releases

  • 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
  • Thu, 07/09/2026 - 14:34
    Gurux.DLMS.Python 1.0.201
  • Fri, 06/26/2026 - 16:32
    Gurux.Service 3.0.2606.2601
  • Wed, 06/24/2026 - 08:36
    Gurux.DLMS.Python 1.0.200

New forum topics

  • Version mismatch between Gurux.DLMS 9.x and Gurux.Common/Gurux.Serial 8.x
  • Service not known error on gprs communication
  • Help Needed: Interfacing Saral 100 Energy Meter with Microcontroller via RS232
  • Connecting Meter to Agent via serial
  • Reading block profile with Compact array
More

Who's new

  • dermida
  • Justinpeent
  • cYzhesWhQAIeYenRgH
  • MLWGzTbGsyBIaJ…
  • Rolling-Slots-PL
RSS feed
Privacy FAQ GXDN Issues Contact
Follow Gurux on Twitter Follow Gurux on Linkedin