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. Send Raw PDU To Meter

send raw PDU to meter

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 jan.kolar , 6 November, 2017
Forums
Gurux.DLMS

Hello,

I need to send to meter raw PDU packet (of course with HDLC header) for example

06010227C8010301

Currently if I want to write some values to meter I have to parse this message by hand and create appropriate objects in my C++ code (for example CGXDLMSVariant, DLMS_OBJECT_TYPE, attribute id) and call appropriate method (for example CGXDLMSClient::Write, CGXDLMSClient::Method, ...). I have definitions of commands in such raw format. Possibly internal structure of commands can be more complicated in comparison with example above (for example setting more objects simultaneously or complicated object model including nested data structures or arrays). I don't want to write PDU parser by hand if possible. Just want add all necessary headers to PDU packet, send it to meter, and read answer.

Profile picture for user Kurumi

Kurumi

8 years 7 months ago

send raw PDU to meter

Hi,

Why you don't use ANSI C++ library? Why you are parsing messages?
https://github.com/gurux/gurux.dlms.cpp

BR,
Mikko

jan.kolar

8 years 7 months ago

I am using this library but

I am using this library but only for simple settings which are hardcoded in my software. Problem is PDU command can change from one version of firmware to another. I want my program to be configurable with the raw PDU packet (provided by meter manufacturer) as parameter. I don't know which function should I call to send raw PDU packet. For example something like this:

Send(std::string pdu_packet_as_string)
{
...
}

Profile picture for user Kurumi

Kurumi

8 years 7 months ago

Ján Kolár

Hi,

All command are defined in standard and we are supporting them all.

What you need to ask from the manufacturer is this:
1.Is Logical Name or Short Name referencing used?
2. What is Client Address?
3. What Is Server Address?
4. Is meter using HDLC or WRAPPER framing.

That is all what you need to know to read your meter. Of course if you are using ciphered connection then there are secure settings that must be correct.

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