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 ago

Hi,

Hi,

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

BR,
Mikko

RSS

7 years 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 ago

Hi,

Hi,

Your meter doesn't return system title.

BR,
Mikko

RSS

7 years 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 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 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 ago

Hi Rafael,

Hi Rafael,

Here is an example from the real meter.

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

BR,

Mikko

RSS

6 years 12 months 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

6 years 11 months 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

  • 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