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 2 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 2 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 1 month 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 1 month 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

  • 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