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. Error: "Object Reference Not Set To An Instance of An Object"

Error: "Object reference not set to an instance of an object"

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 mansour , 16 November, 2022
Forums
DLMSDirector

Hi Mikko,

We are using the GX DLMSDirector to connect to new meter with HLS level with Serial (HDLC optical probe) and we are facing this error: "Object reference not set to an instance of an object"
above the related logs:
---------------------------------------
17:27:00 05:27:00.223 Info Opening
17:27:00 05:27:00.223 Info Paramètres du port série: Nom du port: COM3 Vitesse de transmission: 9600 Bits de données: 8 Parité: None Bits d'arrêt: One Contrôle de flux: None Eop: None
17:27:00 05:27:00.236 Info Open
17:27:01 Send SNRM request.
TX: 7E A0 07 03 21 93 0F 01 7E
17:27:01 05:27:01.252 Sent 7E A0 07 03 21 93 0F 01 7E
17:27:01 05:27:01.274 Received 7E A0 1E 21 03 73 C3 7A 81
17:27:01 05:27:01.289 Received 81 80 12 05 01 80 06 01
17:27:01 05:27:01.304 Received 04 00 00 00 01 53 3B
17:27:01
RX: 7E A0 1E 21 03 73 C3 7A 81 80 12 05 01 80 06 01 80 07 04 00 00 00 01 08 04 00 00 00 01 53 3B 7E
17:27:01 Send AARQ request.
TX: 7E A0 2B 03 21 10 FB AF E6 E6 00 60 1D A1 09 06 07 60 85 74 05 08 01 01 BE 10 04 0E 01 00 00 00 06 5F 1F 04 00 62 1E 5D FF FF 88 55 7E
17:27:01 05:27:01.309 Sent 7E A0 2B 03 21 10 FB AF E6 E6 00 60 1D A1 09 06 07 60 85 74 05 08 01 01 BE 10 04 0E 01 00 00 00 06 5F 1F 04 00 62 1E 5D FF FF 88 55 7E
17:27:01 05:27:01.367 Received 7E A0 37 21 03 30 6C 7C
17:27:01 05:27:01.384 Received 7C E6 E7 00 61 29 A1 09 06
17:27:01 05:27:01.401 Received 01 A2 03 02 01 00 A3 05 A1 03 02 01 00 BE 10
17:27:01 05:27:01.417 Received 04 0E 08 00 06 5F 1F 04 00 00 00 10 02 30 00
17:27:01 05:27:01.432 Received 07 B2 6C
17:27:01
RX: 7E A0 37 21 03 30 6C 7C E6 E7 00 61 29 A1 09 06 07 60 85 74 05 08 01 01 A2 03 02 01 00 A3 05 A1 03 02 01 00 BE 10 04 0E 08 00 06 5F 1F 04 00 00 00 10 02 30 00 07 B2 6C 7E
17:27:01 05:27:01.435 Sent 7E A0 19 03 21 32 6F D8 E6 E6 00 C0 01 C1 00 01 00 00 2B 01 03 FF 02 00 B0 AA 7E
17:27:01 05:27:01.480 Received 7E A0 15 21 03 52 5D 8A E6 E7 00
17:27:01 05:27:01.488 Received 00 C4
17:27:01
RX: 7E A0 15 21 03 52 5D 8A E6 E7 00 C4 01 C1 00 06 00 00 00 5D 1D 91 7E
17:27:01 Disconnect request
TX: 7E A0 07 03 21 53 03 C7 7E
17:27:01 05:27:01.498 Sent 7E A0 07 03 21 53 03 C7 7E
17:27:01 05:27:01.512 Received 7E A0
17:27:01 05:27:01.528 Received A0 1E 21 03 73 C3 7A 81 80 12 05 01 80 06 01
17:27:01 05:27:01.543 Received 07 04 00 00 00 01 08 04 00 00 00 01 53 3B
17:27:01
RX: 7E A0 1E 21 03 73 C3 7A 81 80 12 05 01 80 06 01 80 07 04 00 00 00 01 08 04 00 00 00 01 53 3B 7E
17:27:01 Send SNRM request.
TX: 7E A0 07 03 61 93 69 47 7E
17:27:01 05:27:01.545 Sent 7E A0 07 03 61 93 69 47 7E
17:27:01 05:27:01.560 Received 7E A0 1E 61
17:27:01 05:27:01.576 Received 61 03 73 B5 7C 81 80 12 05 01 80 06
17:27:01 05:27:01.592 Received 04 00 00 00 01 08 04 00 00 00 01 53 3B
17:27:01
RX: 7E A0 1E 61 03 73 B5 7C 81 80 12 05 01 80 06 01 80 07 04 00 00 00 01 08 04 00 00 00 01 53 3B 7E
17:27:01 Send AARQ request.
TX: 7E A0 6B 03 61 10 2A FF E6 E6 00 60 5D A1 09 06 07 60 85 74 05 08 01 03 A6 0A 04 08 30 30 30 30 30 30 30 30 8A 02 07 80 8B 07 60 85 74 05 08 02 02 AC 12 80 10 42 77 76 0C 1E 01 3E 35 01 4E 45 10 38 1B 35 1B BE 23 04 21 21 1F 30 00 00 00 5E BA A5 EF 40 FE B2 12 5B 39 6B B6 6B 3C DC BE ED 43 F1 AA 63 31 95 17 FE DE 78 D0 77 7E
17:27:01 05:27:01.593 Sent 7E A0 6B 03 61 10 2A FF E6 E6 00 60 5D A1 09 06 07 60 85 74 05 08 01 03 A6 0A 04 08 30 30 30 30 30 30 30 30 8A 02 07 80 8B 07 60 85 74 05 08 02 02 AC 12 80 10 42 77 76 0C 1E 01 3E 35 01 4E 45 10 38 1B 35 1B BE 23 04 21 21 1F 30 00 00 00 5E BA A5 EF 40 FE B2 12 5B 39 6B B6 6B 3C DC BE ED 43 F1 AA 63 31 95 17 FE DE 78 D0 77 7E
17:27:01 05:27:01.736 Received 7E A0 77 61 03 30 AD 6C E6 E7 00 61 69 A1 09
17:27:01 05:27:01.752 Received 09
17:27:01 05:27:01.768 Received A3 05 A1 03 02 01 0E A4 0A 04 08 4C 4E 54 4C 54
17:27:01 05:27:01.784 Received 0D C9 6E 88 02 07 80 89 07 60 85 74 05 08 02
17:27:01 05:27:01.800 Received 02 AA 12 80 10 61 62 63 64 65 66 67 68 69 6A 6B
17:27:01 05:27:01.816 Received 6C 6D 6E 6F 70 BE 23 04 21 28 1F 30 00 00 00
17:27:01 05:27:01.831 Received 4F 59 41 02 D9 D9 1E 6C CC 5A E3 3E 82 16 46
17:27:01 05:27:01.848 Received D4 31 95 36 E1 3C B1 D4 82 A3 45 60 C4 79
17:27:01
RX: 7E A0 77 61 03 30 AD 6C E6 E7 00 61 69 A1 09 06 07 60 85 74 05 08 01 03 A2 03 02 01 00 A3 05 A1 03 02 01 0E A4 0A 04 08 4C 4E 54 4C 54 0D C9 6E 88 02 07 80 89 07 60 85 74 05 08 02 02 AA 12 80 10 61 62 63 64 65 66 67 68 69 6A 6B 6C 6D 6E 6F 70 BE 23 04 21 28 1F 30 00 00 00 4F 59 41 02 D9 D9 1E 6C CC 5A E3 3E 82 16 46 D4 31 95 36 E1 3C B1 D4 82 A3 45 60 C4 79 7E
17:27:01 Authenticating.
TX: 7E A0 3E 03 61 32 7B 46 E6 E6 00 CB 30 30 00 00 00 5F 4B 64 2E 86 C1 18 97 C6 17 75 96 3F 53 6B 6A 3C 0F 38 13 5A 80 7D 2F FC 3E B4 55 7F 76 4B E7 9E 0D 14 85 35 E3 DA 03 DC E5 CD B4 30 EB 7E
17:27:01 05:27:01.849 Sent 7E A0 3E 03 61 32 7B 46 E6 E6 00 CB 30 30 00 00 00 5F 4B 64 2E 86 C1 18 97 C6 17 75 96 3F 53 6B 6A 3C 0F 38 13 5A 80 7D 2F FC 3E B4 55 7F 76 4B E7 9E 0D 14 85 35 E3 DA 03 DC E5 CD B4 30 EB 7E
17:27:01 05:27:01.944 Received 7E A0 37 61 03 52 0E 3A E6 E7
17:27:01 05:27:01.960 Received E7 00 CF 29 30 00
17:27:01 05:27:01.976 Received 8F DD 02 E2 44 80 47 86 D7 A9 56 B5 73 41 1E 6C
17:27:01 05:27:01.992 Received CD E7 46 A7 72 E8 52 41 74 0D 1B 44 7B 64 E4
17:27:02 05:27:02.008 Received E3
17:27:02
RX: 7E A0 37 61 03 52 0E 3A E6 E7 00 CF 29 30 00 00 00 50 0A D6 F3 C8 88 91 8F DD 02 E2 44 80 47 86 D7 A9 56 B5 73 41 1E 6C CD E7 46 A7 72 E8 52 41 74 0D 1B 44 7B 64 E4 E3 7E
17:27:02 05:27:02.009 Sent 7E A0 07 03 61 53 65 81 7E
17:27:02 05:27:02.024 Received 7E A0 1E
17:27:02 05:27:02.040 Received 1E 61 03 73 B5 7C 81 80 12 05 01 80 06 01
17:27:02 05:27:02.056 Received 04 00 00 00 01 08 04 00 00 00 01 53 3B
17:27:02
RX: 7E A0 1E 61 03 73 B5 7C 81 80 12 05 01 80 06 01 80 07 04 00 00 00 01 08 04 00 00 00 01 53 3B 7E
17:27:02 05:27:02.057 Info Closing
17:27:02 05:27:02.185 Info Closed
---------------------------------

Can you help us please.

Thanks in advance.
Best Regards
Mansour

Profile picture for user Kurumi

Kurumi

3 years 6 months ago

Hi Mansour,

Hi Mansour,

Your data is encrypted and without authentication and block cipher keys I can't check what you try to read. I believe that there is a COSEM object that is not in the association view and that is causing this issue.

BR,
Mikko

mansour

3 years 6 months ago

Hi Mikko,

Hi Mikko,

Thank you for your response, can you tell me how I can send you the keys in a secure way ? or do you know a way with the GXDLMSDirector tool to trace the decrypted frames?

Best Regards,
Mansour.

Profile picture for user Kurumi

Kurumi

3 years 6 months ago

Hi,

Hi,

You can send the keys to me by email. I can check this on Monday.

BR,
Mikko

Profile picture for user Kurumi

Kurumi

3 years 6 months ago

Hi,

Hi,

I tested this, but I didn't get an error. What is GXDLMSDirector version that you are using?

BR,
Mikko

mansour

3 years 6 months ago

Hi,

Hi,

We are using this version : 9.0.2210.0401.

Mansour.

Profile picture for user Kurumi

Kurumi

3 years 6 months ago

Hi,

Hi,

We are using the same version.
Can you open and add content of this file here?
C:\ProgramData\Gurux\GXDLMSDirector\LastError.txt

BR,
Mikko

mansour

3 years 6 months ago

Hi Mikko,

Hi Mikko,

It seems we have a problem reading this attribute (I'm not sure if it's the only one...) :

18:00:18 Read object type Ip6Setup index: 4
7E A0 2C 03 61 1E C2 57 E6 E6 00 C8 1E 30 00 00 00 C0 5E 95 15 16 7A FC 52 8A DC CE FF D5 58 AF FA FF 40 38 14 41 4E DB 55 99 BC FA 4B 7E
<HDLC len="2B" >
<TargetAddress Value="1" />
<SourceAddress Value="30" />
<FrameType Value="1E" />
<PDU>
<glo_GetRequest Value="30000000C05E9515167AFC528ADCCEFFD558AFFAFF403814414EDB5599BC" />
</PDU>
</HDLC>

18:00:18 06:00:18.412 Sent 7E A0 2C 03 61 1E C2 57 E6 E6 00 C8 1E 30 00 00 00 C0 5E 95 15 16 7A FC 52 8A DC CE FF D5 58 AF FA FF 40 38 14 41 4E DB 55 99 BC FA 4B 7E
18:00:18 06:00:18.485 Received 7E A0 4E 61 03 10 3E F8 E6
18:00:18 06:00:18.501 Received E6 E7 00 CC 40 30 00 00
18:00:18 06:00:18.517 Received D7 ED 6D F8 92 DB 75 A8 E3 1F 2E 7B 67 9F A8
18:00:18 06:00:18.533 Received BF 46 E7 09 38 2C E7 49 F9 13 55 00 EE 33 AE
18:00:18 06:00:18.549 Received 63 54 90 D2 8D 79 18 1D 55 41 60 BB 9A 9E E3 C0
18:00:18 06:00:18.565 Received 96 7D 4F DB 31 C4 34 85 14
18:00:18
7E A0 4E 61 03 10 3E F8 E6 E7 00 CC 40 30 00 00 00 B0 69 D7 DE 4A 02 60 D7 ED 6D F8 92 DB 75 A8 E3 1F 2E 7B 67 9F A8 BF 46 E7 09 38 2C E7 49 F9 13 55 00 EE 33 AE 63 54 90 D2 8D 79 18 1D 55 41 60 BB 9A 9E E3 C0 96 7D 4F DB 31 C4 34 85 14 7E
<HDLC len="4D" >
<TargetAddress Value="30" />
<SourceAddress Value="1" />
<FrameType Value="10" />
<PDU>
<glo_GetResponse Value="30000000B069D7DE4A0260D7ED6DF892DB75A8E31F2E7B679FA8BF46E709382CE749F9135500EE33AE635490D28D79181D554160BB9A9EE3C0967D4FDB31C434" />
</PDU>
</HDLC>

System.FormatException: Une adresse IP non valide a été spécifiée.
à GXDLMSDirector.MainForm.ReadDevice(GXDLMSMeter d)
à GXDLMSDirector.MainForm.Read(Object sender, GXAsyncWork work, Object[] parameters)

Best Regards,
Mansour

Profile picture for user Kurumi

Kurumi

3 years 6 months ago

Hi,

Hi,

I need the client system title to decrypt the client request, but the reply is an array where is one octet string that should be an IP address, but I don't believe that the value is correct. So the reason for this is invalid content for the meter data.

<GetResponse>
<GetResponseNormal>
# Priority: High, ServiceClass: Confirmed, Invoke ID: 1
<InvokeIdAndPriority Value="C1" />
<Result>
<Data>
<Array Qty="01" >
<OctetString Value="000000000000000000000000000000000000000000000000000000000000000000000000000000" />
</Array>
</Data>
</Result>
</GetResponseNormal>
</GetResponse>

BR,
Mikko

mansour

3 years 6 months ago

Hi Mikko,

Hi Mikko,

Thanks for the analysis,
Sorry I thought it was the server SystemTitle specified in the field "System title" in "Secured Connections" tab. So I put this value "54 30 39 30 33 35 33 34" and if I have understood correctly I can put what I want and the server System title seems to be retrieved automatically.

Best regards
Mansour.

Profile picture for user Kurumi

Kurumi

3 years 6 months ago

Hi Mansour,

Hi Mansour,

You can use any system title you like on the client side, but it's not sent after the connection is established.
If I don't know it I can't decrypt the client messages.

But anyway. You try to read Ip6Setup Unicast IP Address and it's invalid.
There are 39 zero bytes and it's not what is expected.
Try to write a new real IPv6 address for the meter.

https://www.gurux.fi/Gurux.DLMS.Objects.GXDLMSIp6Setup

BR,
Mikko

mansour

3 years 6 months ago

Ok thanks Mikko we will try

Ok thanks Mikko we will try to set a new value for this attribute and read again the value to see if there is still an issue.

  • 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