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. How To Send Data To Meter a New Obis

how to send data to meter a new obis

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 nishitha , 19 June, 2020
Forums
Gurux DLMS for Java

hi Mikko,
I am using the server dlms example to set some values to obis,
Suppose if i want to set some data and send that to meter, and the data type is something like <structure><long-unsigned></long-unsigned></structure> how do we add this type of value???
in the code we have obis like
e.g
void addFirmwareVersion() {
GXDLMSData d = new GXDLMSData("1.0.0.2.0.255");
d.setValue("Gurux FW 0.0.1");
getItems().add(d);
}
if I want to give the value like mentioned above how can i do that?

Profile picture for user Kurumi

Kurumi

5 years 11 months ago

Hi,

Hi,

You can do it like this:

GXStructure data = new GXStructure();
data.Add(new GXUInt16(1));
data.Add(new GXUInt16(2));

GXDLMSData d = new GXDLMSData("1.0.0.2.0.255");
d.setValue(data);

BR,
Mikko

nishitha

5 years 11 months ago

Hi Mikko,

Hi Mikko,
i have structure
long
octet-string
visible-string
How can i add these to structure, I see there are only GXUInt8,GXUInt16,GXUInt32,GXUInt64
how can i add the above values?

Profile picture for user Kurumi

Kurumi

5 years 11 months ago

Hi,

Hi,

data.Add(new Short(2));
data.Add(new Long(2));
data.Add(new byte[]{1, 2, 3});
data.Add("Gurux");

BR,
Mikko

Rubent

5 years 1 month ago

Hi Mikko,

Hi Mikko,

I am having a problem like the one described in this post.
I use gurux as a server so that it acts as a simulator of a Dlms device

I am trying to create Modem Information object which is of type IC 1 -> Data with DataType of type structure.

This structure is made up of three elements of type OctetString.

ModemInformation (IC: 1, DataType: Structure)
{
IMEI: OctetString,
ICCID: OctetString,
IMSI: OctetString
}

For I have developed the following code:

var modemInformation = (GXDLMSData) companionObjectCollection.FindByLN (ObjectType.Data, obisCodeList.ModemInformation);
modemInformation.SetDataType (2, DataType.Structure);
modemInformation.SetUIDataType (2, DataType.Structure);

var data = new GXStructure ();
data.Add ("Simulator IMEI");
data.Add ("Simulator ICCID");
data.Add ("Simulator IMSI");

modemInformation.Value = data;

When I execute a read of said object it is returning me the following apdu:
C401400002030A0E53696D756C61746F7220494D45490A0F53696D756C61746F722049434349440A0E53696D756C61746F7220494D5349

Which translated with Gurux has the following structure.

<GetResponse>
<GetResponseNormal>
<!--Priority: NORMAL ServiceClass: CONFIRMED invokeID: 0-->
<InvokeIdAndPriority Value="40" />
<Result>
<Data>
<Structure Qty="03" >
<String Value="Simulator IMEI" />
<String Value="Simulator ICCID" />
<String Value="Simulator IMSI" />
</Structure>
</Data>
</Result>
</GetResponseNormal>
</GetResponse>

These objects are of type string instead of OctetString.

Can you help me with this???? I am very grateful to you in advance.

Sincerely,

Rubent

  • 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