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. Client Example Program In C

client example program in c

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 Gorantlaharikr… , 9 November, 2020
Forums
Gurux.DLMS

hi sir,
i am working on AMR device for this working i am using gurux dlms client (c program )application.
here when i am reading data by using low authentication i am receiving data but after receiving data it is repeating the dlms_handleGloDedResponse function.
are you knowing this problem please help me.

thanks & regards,
hari

Profile picture for user Kurumi

Kurumi

5 years 7 months ago

Dear Sir,

Dear Sir,

It's hard to say without a trace log, but it seems that you try to connect using a secured connection or then the meter doesn't allow to connect without ciphering. Paste send and received bytes here and I can check what is causing this.

BR,

Mikko

Gorantlaharikr…

5 years 7 months ago

hi sir,

hi sir,
thanks for your response.
here i am connecting with low authentication after connection i sent below data and i got response see data in below

TX:7E A0 20 03 41 32 AB 08 E6 E6 00 C8 12 20 00 00 0C 41 73 27 1B 24 66 72 CF CC 10 4B 8B B9 A8 05 7E

RX:7E A0 1F 41 03 52 BE 53 E6 E7 00 CC 11 20 00 00 0A FD E6 BC 48 BF D7 4B 9F 59 5C A2 A8 94 37 8A 7E
After receiving this response program not exiting from the dlms_handleGloDedResponse function

thanks

Profile picture for user Kurumi

Kurumi

5 years 7 months ago

Hi,

Hi,

Can you share your authentication keys? I need them to decrypt the data.
I also believe that one byte is missing from the TX trace. Can you check it?

BR,
Mikko

Gorantlaharikr…

5 years 7 months ago

hi sir

hi sir
sorry about the wrong data
TX:7E A0 20 03 41 32 AB 08 E6 E6 00 C8 12 20 00 00 0C 41 73 27 1B 24 66 72 CF CC 10 4B 8B 56 B9 A8 05 7E

authentication key: 1234567812345678(ASCII VALUES)

Profile picture for user Kurumi

Kurumi

5 years 7 months ago

Hi,

Hi,

No worries. I also need the block cipher key.

BR,
Mikko

Gorantlaharikr…

5 years 7 months ago

Hi sir

Hi sir
block cipher key and authentication key both same.

Profile picture for user Kurumi

Kurumi

5 years 7 months ago

Hi,

Hi,

I also need client and the meter system title.

BR,
Mikko

Gorantlaharikr…

5 years 7 months ago

HI sir,

HI sir,

client add: 0x20
server add:1
system title:IHM12345

Profile picture for user Kurumi

Kurumi

5 years 7 months ago

Hi,

Hi,

Your meter replies an invalid data. If you try to read it with GXDLMSDirector it will also fail.

BR,
Mikko

Gorantlaharikr…

5 years 7 months ago

Hi sir

Hi sir
with GXDLMSDirector i am getting currect values
GURUX DLMS DIRECTOR:
TX: 7E A0 20 03 41 32 AB 08 E6 E6 00 C8 12 20 00 00 0C 45 41 40 DA 62 E4 E9 E5 06 ED DC D9 04 45 E4 22 7E
RX: 7E A0 1F 41 03 52 BE 53 E6 E7 00 CC 11 20 00 00 0B 01 13 85 27 9F FC 01 06 B4 BB 67 97 6B 36 22 7E

AMR MODEM:
TX: 7E A0 20 03 41 32 AB 08 E6 E6 00 C8 12 20 00 00 0C 41 73 27 1B 24 66 72 CF CC 10 4B 8B 56 B9 A8 05 7E
RX: 7E A0 1F 41 03 52 BE 53 E6 E7 00 CC 11 20 00 00 0A FD E6 BC 48 BF D7 4B 9F 59 5C A2 A8 94 37 8A 7E

Profile picture for user Kurumi

Kurumi

5 years 7 months ago

Hi,

Hi,

Can you add all messages here so I can solve this? Using ANSI C trace is fine. If you can't get it. Connect using GXDLMSDirector and add only connection trace.

BR,
Mikko

Gorantlaharikr…

5 years 7 months ago

hi sir

hi sir

log data(using gurux dlms directory):

GXDLMSDirector 8.2.2010.0901
Log created 18:46:04
18:46:15 Initializing serial connection.
System.IO.IOException: The port 'COM7' does not exist.
at GXDLMSDirector.GXDLMSDevice.InitializeConnection()
at GXDLMSDirector.MainForm.Connect(Object sender, GXAsyncWork work, Object[] parameters)
18:46:24 Initializing serial connection.
18:46:25 Send SNRM request.
7E A0 07 03 21 93 0F 01 7E
18:46:26
7E A0 20 21 03 73 73 98 81 80 14 05 02 02 43 06 02 02 43 07 04 00 00 00 01 08 04 00 00 00 01 5C 91 7E
18:46:26 Parsing UA reply succeeded.
18:46:26 Send AARQ request.
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 00 1E 1D FF FF C5 E4 7E
18:46:26
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 04 34 00 07 49 44 7E
18:46:26 Parsing AARE reply succeeded.
18:46:26 Reading object 0.0.43.1.2.255, interface Data
7E A0 19 03 21 32 6F D8 E6 E6 00 C0 01 C1 00 01 00 00 2B 01 02 FF 02 00 0B B6 7E
18:46:26
7E A0 15 21 03 52 5D 8A E6 E7 00 C4 01 C1 00 06 00 00 0C 79 9B 5F 7E
18:46:26 Disconnect request
18:46:26 Disconnect request
7E A0 07 03 21 53 03 C7 7E
18:46:26
7E A0 20 21 03 73 73 98 81 80 14 05 02 02 43 06 02 02 43 07 04 00 00 00 01 08 04 00 00 00 01 5C 91 7E
18:46:26 Send SNRM request.
7E A0 20 03 41 93 28 BC 81 80 14 05 02 02 43 06 02 02 43 07 04 00 00 00 01 08 04 00 00 00 01 5C 91 7E
18:46:26
7E A0 20 41 03 73 3E 9D 81 80 14 05 02 02 43 06 02 02 43 07 04 00 00 00 01 08 04 00 00 00 01 5C 91 7E
18:46:26 Parsing UA reply succeeded.
18:46:26 Send AARQ request.
7E A0 57 03 41 10 DF 07 E6 E6 00 60 49 A1 09 06 07 60 85 74 05 08 01 03 A6 0A 04 08 49 48 4D 31 32 33 34 35 8A 02 07 80 8B 07 60 85 74 05 08 02 01 AC 0A 80 08 31 32 33 34 35 36 37 38 BE 17 04 15 21 13 20 00 00 0C 7A ED BD 19 4A 09 F2 AE FC BD 7F 4F FE CE 89 3B 52 7E
18:46:26
7E A0 4A 41 03 30 EB A8 E6 E7 00 61 3C A1 09 06 07 60 85 74 05 08 01 03 A2 03 02 01 00 A3 05 A1 03 02 01 00 A4 0A 04 08 58 49 4F 01 14 C4 C0 B9 BE 17 04 15 28 13 20 00 00 0B 34 99 5B 39 B5 5D B4 52 F8 0B 9A D4 2D 4E DF EC AC 7E
18:46:26 Parsing AARE reply succeeded.
18:46:31 Read object type Register index: 1
7E A0 20 03 41 32 AB 08 E6 E6 00 C8 12 20 00 00 0C 7B 79 A7 5A F1 EE EB 38 F8 07 83 3E D7 27 45 C8 7E
18:46:31
7E A0 1F 41 03 52 BE 53 E6 E7 00 CC 11 20 00 00 0B 35 AA 24 19 08 A6 D5 A1 C0 32 89 50 3A 49 E2 7E
18:46:31 Read object type Register index: 3
7E A0 20 03 41 54 9B 0E E6 E6 00 C8 12 20 00 00 0C 7C 91 7B C4 9A DB 9F 81 F0 87 97 C4 C4 1B 72 78 7E
18:46:31
7E A0 1D 41 03 74 FC 2E E6 E7 00 CC 0F 20 00 00 0B 36 5F 29 C1 36 48 74 E0 C4 4D A4 86 F8 7E
18:46:31 Read object type Register index: 2
7E A0 20 03 41 76 8B 0C E6 E6 00 C8 12 20 00 00 0C 7D 7A 2E EA DD 30 5B FF 3E EE 0D 03 AF CF 5A F1 7E
18:46:31
7E A0 1A 41 03 96 C1 BD E6 E7 00 CC 0C 20 00 00 0B 37 30 83 96 DD 41 06 27 6F C2 7E

Gorantlaharikr…

5 years 7 months ago

Hi sir

Hi sir
Can i get source (example) with authentication

Thanks

Gorantlaharikr…

5 years 7 months ago

hi sir

hi sir
can i get an example source code in c for reading data in authentication

Profile picture for user Kurumi

Kurumi

5 years 7 months ago

Hi,

Hi,

We can repeat this using your traces. I'll let you know as soon as this is fixed.

BR,
Mikko

Profile picture for user Kurumi

Kurumi

5 years 7 months ago

Hi,

Hi,

This is fixed. We'll test this and release a new version tomorrow.

BR,
Mikko

Gorantlaharikr…

5 years 7 months ago

Than you sir

Than you sir

Gorantlaharikr…

5 years 7 months ago

hi sir

hi sir
can you share the updated source code file link.

  • 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