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. Add Parameters To The Command Using Gurux

Add parameters to the command using gurux

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 xerifehud , 8 October, 2021
Forums
Gurux DLMS for Java

Hello.

I need to do a GET reading on a meter.
I have the obis, it claims class 7, and I need to read attribute 2:
I am reading attribute 3 first and then I read attribute 2 using class GXDLMSProfileGeneric

To make the reading I need to send in the GET command one of the parameters below, to select what I want to read:
- 02 02 04 06 00 00 01 53 06 00 00 02 2d 12 00 00 12 00 00
- 02 02 04 06 00 00 01 52 06 00 00 02 2d 12 00 00 12 00 00

How would I add these parameters to the command, using gurux?

I’m using Java Link in the implementation.

Thanks!

Profile picture for user Kurumi

Kurumi

4 years 8 months ago

Hi,

Hi,

You can read only one value at a time with correct implementation using -g parameter. You can add a new object and read it like this:

GXProfileGeneric pg = new GXProfileGeneric("Logical Name");
//Read columns,
read(pg, 2);
//Read data by start and end time.
readRowsByRange(pg, start_tiem, end_time);

BR,
Mikko

xerifehud

4 years 7 months ago

I need to do a reading by

I need to do a reading by sending a command type GET I know the obis, class 7.
I’m reading attribute 3 first
However, to read the attribute 2 of this command I need to send an Accessselection. However, I don’t know how to add this to the get command.
Below how the manufacturer is sending the command:

7E A0 2C 03 03 32 49 EA E6 E6 00 C0 01 C1 00 07
00 00 63 63 00 FF 02 01 02 02 04 06 00 00 01 52
06 00 00 02 2D 12 00 00 12 00 00 F6 67 7E

<HDLC len="43" >
<TargetAddress Value="1" />
<SourceAddress Value="1" />
<!--I frame.-->
<FrameType Value="32" />
<PDU>
<GetRequest>
<GetRequestNormal>
<!--Priority: HIGH ServiceClass: CONFIRMED invokeID: 1-->
<InvokeIdAndPriority Value="193" />
<AttributeDescriptor>
<!--PROFILE_GENERIC-->
<ClassId Value="7" />
<!--0.0.99.99.0.255-->
<InstanceId Value="0000636300FF" />
<AttributeId Value="2" />
</AttributeDescriptor>
<AccessSelection>
<AccessSelector Value="2" />
<AccessParameters>
<Structure Qty="4" >
<UInt32 Value="338" />
<UInt32 Value="557" />
<UInt16 Value="0" />
<UInt16 Value="0" />
</Structure>
</AccessParameters>
</AccessSelection>
</GetRequestNormal>
</GetRequest>
</PDU>
</HDLC>

I would like to know how can I add this:

<AccessSelection>
<AccessSelector Value="2" />
<AccessParameters>
<Structure Qty="4" >
<UInt32 Value="338" />
<UInt32 Value="557" />
<UInt16 Value="0" />
<UInt16 Value="0" />
</Structure>
</AccessParameters>
</AccessSelection>

Thanks.

Profile picture for user Kurumi

Kurumi

4 years 7 months ago

Hi,

Hi,

You can use ReadByRange or ReadByEntry methods of the GXDLMSClient for reading only part of profile generic data.

BR,
Mikko

xerifehud

4 years 7 months ago

Could you, please, give an

Could you, please, give an example of I can submit this struct: <AccessParameters>

How can I send that

Thanks.

Profile picture for user Kurumi

Kurumi

4 years 7 months ago

Hi,

Hi,

You will use readRowsByEntry method to generate this method. Like this:

pg = GXDLMSProfileGeneric("0.0.99.99.0.255")
client.readRowsByEntry(pg, start_index, end_index)

Check the client example. It will do everything that you want to do.
https://github.com/Gurux/Gurux.DLMS.Python/tree/master/Gurux.DLMS.Clien…

BR,
Mikko

xerifehud

4 years 7 months ago

Hello.

Hello.

Actually, I would like to know how to send the struct along with the get command, because I already know how to send the desired date limits.

Follows below the Structure I need to add:

<Structure Qty="4" >
<UInt32 Value="338" />
<UInt32 Value="557" />
<UInt16 Value="0" />
<UInt16 Value="0" />
</Structure>

Thanks!

Profile picture for user Kurumi

Kurumi

4 years 6 months ago

Hi,

Hi,

readRowsByEntry will send get command where is structure as you describe.
client.readRowsByEntry(pg, 338, 557)

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