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. HDLC 4 Byte Server Address Error With C Library

HDLC 4 byte server address error with C library

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 Zappa , 17 March, 2022
Forums
Gurux.DLMS

Hello,

I´m connecting with AC6000 meter. Client address:0x01 Phy server:0x11 Logical address:0x01

Those are the frames:

Sending SNRM...
TX: 7E A0 08 02 23 03 93 3E 74 7E
RX: 7E A0 23 03 00 02 00 23 73 C0 48 81 80 14 05 02 00 80 06 02 00 80 07 04 00 00 00 01 08 04 00 00 00 01 CE 6A 7E

Server address bytes are: 00 02 00 23 ,is a 4 byte HDLC address.

Gurux Director is working properly, but when I try with C library I get DLMS_ERROR_CODE_FALSE with server address.

Any clue about how to solve this in C library?

Thank you.

Profile picture for user Kurumi

Kurumi

4 years 6 months ago

Hi,

Hi,

The meter's server address can be expressed in two bytes, but the AC6000 requires four bytes.

You can count it like this:

settings.serverAddress = cl_getServerAddress(1, 17, 4);

BR,
Mikko

Zappa

4 years 6 months ago

Thank you very much for your

Thank you very much for your quick answer....I´ll try this.

Best regards

fon Luck

4 years 5 months ago

Hello!

Hello!
In file dlms.c function dlms_check Hdlc Address() save target address into setting->server Address.
But, target address converted to uint16_t, therefore hi address is lost and is Target() can't check it.
I find this closed issue: http://www.gurux.fi/node/15797

Profile picture for user Kurumi

Kurumi

4 years 5 months ago

In reply to Hello! by fon Luck

Hello fon Luck,

Hello fon Luck,

Please, create a new topic if you have a new question. It's impossible to keep track what was the original question.

I believe that you are right. I need to verify why this is cast to uint16_t. I'll get back to this as soon as I have more info.

BR,
Mikko

  • Create new account
  • Reset your password

Hire Us!

Latest Releases

  • Wed, 08/26/2026 - 09:04
    Gurux.DLMS.Python 1.0.203
  • Mon, 08/17/2026 - 11:28
    Gurux.DLMS.Python 1.0.202
  • Mon, 08/17/2026 - 09:47
    gurux.dlms.cpp 9.0.2608.1701
  • Mon, 08/17/2026 - 09:25
    gurux.dlms.c 9.0.2608.1701
  • Mon, 07/27/2026 - 12:37
    gurux.dlms.cpp 9.0.2607.2701

New forum topics

  • Security vulnerability report — request for a private contact (GuruxDLMS.c / ANSI C)
  • Topic: Insufficient Memory Error When Reading Class 7 Profile Generic Objects
  • SN ReadResponse returns all-null values when response spans multiple HDLC frames
  • Gurux.Serial.Android 3.0.6 – CH340 (HL-340) USB-Serial Adapter Not Working,
  • Trying to talk to a L&G E360 meter (Using Python Gurux)
More

Who's new

  • Anaglyfos Trading CC
  • cyby
  • Metin Onan
  • ssv007
  • 3nzol3dur
RSS feed
Privacy FAQ GXDN Issues Contact
Follow Gurux on Twitter Follow Gurux on Linkedin