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, Creating Server

HDLC, Creating server

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 enemy235 , 17 June, 2019
Forums
Gurux DLMS for Java

Hi,
I have question about HDLC. You can choose framing as wrapper or HDLC. And there is HDLC as type of communication profile. Is it 2 different things or it's something similar?

I'm supposed to make an server app, which will be using HDLC instead of TCP/IP. So what I need to use? I guess not gurux.net, but gurux.serial?

Thanks

Profile picture for user Kurumi

Kurumi

6 years 11 months ago

Hi,

Hi,

Some meters are sending HDLC packets over TCP/IP. Using wrapper is more efficient in TCP/IP networks.
You can use HDLC for TCP/IP if you want to.

BR,
Mikko

enemy235

6 years 11 months ago

Hi Mikko,

Hi Mikko,
I'm trying to create server in java. I'm trying to understand and adapt your server examples.
And I have questions, if I can specify which authentication is used (low, high, high with sometnig). Also if server and client ID can be specified as well, and how can I do it. I tried something, but it didn't work.

Thanks

Profile picture for user Kurumi

Kurumi

6 years 11 months ago

Hi,

Hi,

The client decides (proposes) what authentication level is used. Not the server.
BR,
Mikko

enemy235

6 years 7 months ago

Hi, I'm reusing this old

Hi, I'm reusing this old thread, because my question is about HDLC.

I'm trying to make both server and client using gurux and I'm almost done, but I have this small problem.

My program will be used for testing different types of media, so I need to handle even a broken connection. For now I simulate that by removing Ethernet cable between devices for couple of seconds. When there is no reading, everything is fine, but when the disconnection is in the middle of reading that is whole different story.

I figured, that best place to handle this is inside GXDLMSReader in method readDLMSPacket(byte[] data, GXReplyData reply). When the command Media.send(...) is unsuccessful, program will enter a loop to establish the connection again with Media.open(). After that is needed to initializeConnection() again.

When using wrapper this solution works. But not when using HDLC. On the server side I get Invalid HDLC frame and I don't know how to solve this.

Here you can find text file with the method and pcap from the test. Cable was removed between 21st a 22nd packet and reconnected around 27th packet.

https://1drv.ms/u/s!Aum8SGjyGw1nlaljZYMSeqrZcNbvTw?e=Qpn1ss

Thanks for your help.

Profile picture for user Kurumi

Kurumi

6 years 7 months ago

Hi,

Hi,

There is an inactivity timeout and you need to wait until that has elapsed if you close the connection in the middle of the read.

Some meters can handle this, but it's causing problems with several meters.

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