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. OBISE CODE CONVERSION TO HEX STRING OR BYTE ARRAY

OBISE CODE CONVERSION TO HEX STRING OR BYTE ARRAY

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 Remith , 5 January, 2016
Forums
DLMSDirector

Hi sir,
I am using your library to read full meter data in windows using Java. It is working perfectly.
Now I have a requirement to get only selected meter data like meter number, meter kWh , etc.. .
For that I want to send obis code individually to the meter. Is there any inbuilt method to convert obis code (Eg: 0.0.96.1.0.255) to hex String format (Eg: 7E A0 19 03 41 3E 56 77 E6 E6 00 C0 01 81 00 01 00 00 60 01 00 FF 02 00 8C 6D 7E) ?? Please do the needful . Thanks in advance.

Profile picture for user Kurumi

Kurumi

10 years 5 months ago

Convert OBIS to hex string

Hi,

You can use read method to read data from the meter. It will generate string like you describe.
You can give OBIS code or collected COSEM object as a parameter.

BR,

Mikko

Remith

10 years 5 months ago

In reply to Convert OBIS to hex string by Kurumi

But sir I am trying to read

But sir I am trying to read from android. I only need the Hex String format of obis code. I used that read method. But it gave wrong hex string values. For windows application i am using your library. It was perfect.... I ONLY NEED THE HEX STRING FROM OBIS CODE. Thank you.

Profile picture for user Kurumi

Kurumi

10 years 5 months ago

Convert OBIS to hex string

Dear Remith,

You can give OBIS code using dot notation. Like this: 0.0.1.0.0.255.

byte[][] data = read("0.0.1.0.0.255", ObjectType.Clock, 2);

BR,

Mikko

Remith

10 years 3 months ago

Data identification

Hello sir,
Finally I converted your java library to android. Everything is fine. Thank you very much....

Now i am facing a problem that, I am not able to identify the data collection.

Eg :- EVENT HISTORY (0.0.99.98.2.255)

One meter returns like this,
DATE EVENT CODE
9/18/15 1:36:00 | 101 |

Another meter returns like this,
EVENT CODE DATE
102 | 11/4/15 2:24:43 |

It means, I am not able to identify the data properly. Not only for this. Load survey, Billing data, everywhere I am facing this problem. Please give me one solution to identify the data category.

Profile picture for user Kurumi

Kurumi

10 years 3 months ago

Data identification

Hi,

It seems that your meters has configured differently. You can try to read CaptureObjects first to get list of columns. Then you must order columns to same order.

Easier way is if you configure your meters in same way.

BR,

Mikko

Remith

10 years 3 months ago

Frame rejected/Data Block Unavailable

Dear sir,
I am sorry to disturb you again and again. Now I have 2 problems in Android.

1. Access Error : Data Block Unavailable. while reading load profile data from Secure meter.

"Reading GXDLMSProfileGeneric 1.0.99.1.0.255 null
Entries: 2160/2160
Error! Failed to read first row: Access Error : Data Block Unavailable.
Error! Failed to read last day: Wrong Checksum.
Reading stopped"

2. Frame rejected after reading the load profile data. (From all the meters)

If I read 2 or 3 day load profile data, I am able to read all the parameters.
But if i try to get 45 days data (45 is client requirement), I am getting "Frame Rejected" error.

"2/23/16 6:00:00 | 621 | 611 | 625 | 588 | 639 | 553 | 34 | 23 | 13 | 55 |
2/23/16 6:30:00 | 625 | 615 | 630 | 558 | 593 | 527 | 32 | 22 | 11 | 53 |
2/23/16 7:00:00 | 628 | 618 | 632 | 500 | 573 | 502 | 30 | 21 | 11 | 49 |
Reading GXDLMSProfileGeneric 1.0.94.91.4.255 null
Data send failed. Try to resend 1/3
Data send failed. Try to resend 2/3
Data send failed. Try to resend 3/3
Sample Client Failed to receive reply from the device in given time.
Sample Client 2 Frame rejected.
Reading stopped"

Is there any way to keep the connection alive. ?
Please give me a solution for this sir.

Regards,
Remith

Profile picture for user Kurumi

Kurumi

10 years 3 months ago

Frame rejected/Data Block Unavailable

Hi,

Try to read your meter with GXDLMSDirector first and send your trace to me.
You can get it selecting "View Log" under Tools-menu.

Do not post it here. Send it to me By email.

BR,

Mikko

Profile picture for user Kurumi

Kurumi

10 years 3 months ago

Frame rejected/Data Block Unavailable

Hi,

Your data seems to correct. There are couple of choices.
1. Some meters do not support read profile generic by entry. Try to read profile generic with range.
2. You try to read 2160 rows. Put row count to smaller. It might be possible that there are not so many rows and you get error because of that.

BR,

Mikko

Profile picture for user Nitin Sethi

Nitin Sethi

9 years 6 months ago

Load Profile Error Reading Error

Hi,

I am also facing some error while reading the load profile data from meter, the error is:
Error! Failed to read first row: Access Error : Device reports Read-Write denied.
It is bringing one frame data but not full data. Please help me ASAP.

Thanks,

Regards,
Nitin Sethi

Profile picture for user Kurumi

Kurumi

9 years 6 months ago

Load Profile Error Reading Error

Dear Sarbjit,

All meters do not allow reading load profile without authentication. What meter you try to read?

BR,

Mikko

Remith

9 years 4 months ago

Decimal problem

Hi,
I am using your java library to read meters. I am able to read all the values.
But I am facing decimal problem while reading Load survey,Bill history and Events.

For example ,
If the real value is 6978615.00,
I get like 69786.1500 or 6978.61500 or 69786.1500 or 69786150.00.

For voltage, kwh, current and almost all the values I am facing this problem.

Please provide me any solution to fix this issue.
I am waiting for you replay...

Profile picture for user Kurumi

Kurumi

9 years 4 months ago

Decimal problem

Hi,

We are using scaler to multiply read value. Your meter is using wrong scaler.

BR,

Mikko

Remith

9 years 4 months ago

In reply to Decimal problem by Kurumi

Thanks for your fast replay,

Thanks for your fast replay,
From your code I understood that you are using scalar to calculate the values.
It is working perfectly for all instantaneous readings like, kwh, kvah, pf, frequency ,etc.. .
Only problem with load survey bill history and event data.
I saved the scalars and according to obis code i did calculations for these fields. But not working.
Is there any other way to calculate this ?
Or can we read scalars desperately for load,bill and events ?

Profile picture for user Kurumi

Kurumi

9 years 4 months ago

Decimal problem

Hi,

I believe your meter is sending historical values in decimal format. Is this correct?
If so, I believe that scaler is added to the read value. New we multiply using scaler again.
Usually meters are sending historical values without scaler.

Can you check is this the problem?

BR,

Mikko

Remith

9 years 4 months ago

Decimal Problem

I have problem with all the meters. I tried LnT,Secure,Avon,Genus meters.
All the meters giving wrong value.
Events are coming with decimal values.
All other historical data coming without decimal. Please check my one meter load survey,

23-10-2016 05:30:00 | 2449 | 2479 | 2458 | 312 | 227 | 88 | 70 | 0 | 7 | 71 |
23-10-2016 06:00:00 | 2419 | 2449 | 2430 | 284 | 229 | 14 | 57 | 0 | 7 | 59 |
23-10-2016 06:30:00 | 2422 | 2452 | 2434 | 305 | 228 | 15 | 60 | 0 | 8 | 60 |
23-10-2016 07:00:00 | 2431 | 2458 | 2441 | 277 | 228 | 14 | 56 | 0 | 7 | 58 |
23-10-2016 07:30:00 | 2439 | 2467 | 2445 | 272 | 231 | 84 | 65 | 0 | 6 | 66 |

The actual value is |244.9 | 247.9| etc.... for this meter.
I don't have any idea how to fix this.
I did a small debug. From that I have understood that, this values coming without scalars.
Please give me some solution for this.

Profile picture for user Kurumi

Kurumi

9 years 3 months ago

Decimal Problem

Hi,

You need to create and read column objects.
Go loop all columns and if object type is register then read attribute index 3. Scaler is updated automatically if it's found.

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