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 4 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 4 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 3 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 3 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

  • Mon, 07/27/2026 - 12:37
    gurux.dlms.cpp 9.0.2607.2701
  • Thu, 07/23/2026 - 16:19
    gurux.dlms.java 4.0.96
  • Thu, 07/09/2026 - 14:34
    Gurux.DLMS.Python 1.0.201
  • Fri, 06/26/2026 - 16:32
    Gurux.Service 3.0.2606.2601
  • Wed, 06/24/2026 - 08:36
    Gurux.DLMS.Python 1.0.200

New forum topics

  • Service not known error on gprs communication
  • Help Needed: Interfacing Saral 100 Energy Meter with Microcontroller via RS232
  • Connecting Meter to Agent via serial
  • Reading block profile with Compact array
  • DLMS server - serving multiple similar datasets gathered from multiple meters across distinct logical addresses
More

Who's new

  • CrzONrPdvkWUif…
  • kra4026
  • HilipLot
  • NithnCXPiBJHVG…
  • utkarsh9460
RSS feed
Privacy FAQ GXDN Issues Contact
Follow Gurux on Twitter Follow Gurux on Linkedin