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. Convert RX Values To String Value

Convert RX values to String value

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 imran10x , 3 June, 2021
Forums
Gurux.DLMS

Hi Team,

I am trying to convert RX value to string.
RX: 7E A0 15 41 03 DA 50 87 E6 E7 00 C4 01 81 00 06 00 00 00 5C 92 47 7E
String value:92

I want to know they way(method name) to get this value.
For example we converting hex to object and object to string (obj_toString).
I am using C language.
Please Help.

Profile picture for user Kurumi

Kurumi

5 years 1 month ago

Hi,

Hi,

You can use cl_getData method to get value from the frame. You need to set the client address to 32 and the server address to 1.

After that the value is in gxReplyData's dataValue.

Client example does everything for you. You need to check that.

BR,
Mikko

imran10x

5 years 1 month ago

Thanks For reply,

Thanks For reply,
I am using com_read method and getting . response..gxObject
ret = com_read(connection, BASE(myobject), 2)

but cl_getData accepting gxByteBuffer .

can you please explain how can i can use gxObject for cl_getData

Profile picture for user Kurumi

Kurumi

5 years 1 month ago

Hi,

Hi,

cl_getData first parameter is a reply from the meter. gxReplyData is parsed reply where is error code and received data.

It's good to use com_read, because complicated data types are automatically handled.

BR,
Mikko

imran10x

5 years 1 month ago

In reply to Hi, by Kurumi

Thank you for prompt reply.

Thank you for prompt reply.

My linux board is not supporting gurux lib . I am getting RX : HEX value as output from board and want to convert HEX
value to string on server (out side linux board). Do we have any converter method to convert RX hex to string value.

Profile picture for user Kurumi

Kurumi

5 years 1 month ago

HI,

HI,

If you are using Linux, you can use gurux stack. You can build it for yourself, but
if you want to send data as hex string to the server you can use hlp_bytesToHex to convert received bytes to hex string.

BR,
Mikko

imran10x

5 years 1 month ago

Hi,

Hi,

I am attaching on screenshot. Can you tell me the Method to Translate HEX value to XML. Method can be in any language(Java,C..). I need to value from HEX at server.

Image
Profile picture for user Kurumi

Kurumi

5 years 1 month ago

Hi,

Hi,

You can use Java, C# Python, Deplhi, or ANSI C++. You can use GXDLMSTranslator.MessageToXml method for that.

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

  • JeffreyPal
  • DingfanXue
  • UrukTroge
  • Quarryboss
  • CorwXGlcWwyuiJawypxb
RSS feed
Privacy FAQ GXDN Issues Contact
Follow Gurux on Twitter Follow Gurux on Linkedin