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. Node
  3. Unable To Read Instantaneous Profile.

Unable to read Instantaneous Profile.

By saraf_kshitiz , 30 January, 2025
Forums
Gurux DLMS for Android

Hello Mikko Sir, 
I'm trying to read rows by index because I have to read and display the data of Instantaneous Profile Object (1.0.94.91.0.255). 
For that, I am running the following code snippet which works perfectly fine for getting Name Plate Profile (0.0.94.91.10.255) object data :-

Object[] rows = {};
try {
    GXDLMSProfileGeneric pg = new GXDLMSProfileGeneric(ln);
    gxConnection.readObject(pg, 3);
    List<Map.Entry<GXDLMSObject, GXDLMSCaptureObject>> captureObjects = pg.getCaptureObjects();
    mCaptureObjects.clear();

    for (Map.Entry<GXDLMSObject, GXDLMSCaptureObject> entry : captureObjects) {
        mCaptureObjects.add(deviceObjects.findByLN(ObjectType.NONE,
                entry.getKey().getLogicalName()));
    }
    long startTime = System.currentTimeMillis();
    rows = gxConnection.readRowsByIndex(pg, 1, 1);
    long endTime = System.currentTimeMillis();
    Log.d(TAG, "Data fetch time: " + (endTime - startTime) + "ms");

} catch (Exception e) {
    new ExceptionHandler(requireActivity()).showError(e,
            getString(R.string.read_object_error));
}

The error I'm getting is :- 

 showError: Number of columns do not match. (Ask Gemini)
                                                                                                   java.lang.RuntimeException: Number of columns do not match.
                                                                                                       at gurux.dlms.objects.GXDLMSProfileGeneric.setBuffer(GXDLMSProfileGeneric.java:859)
                                                                                                       at gurux.dlms.objects.GXDLMSProfileGeneric.setValue(GXDLMSProfileGeneric.java:714)
                                                                                                       at gurux.dlms.GXDLMSClient.updateValue(GXDLMSClient.java:1482)
                                                                                                       at gurux.dlms.GXDLMSClient.updateValue(GXDLMSClient.java:1455)
                                                                                                       at gurux.dlms.android.connection.DeviceConnection.readRowsByIndex(DeviceConnection.java:317)
                                                                                                       at gurux.dlms.android.fragments.ObjectReadsFragment.lambda$getDataList$1$gurux-dlms-android-fragments-ObjectReadsFragment(ObjectReadsFragment.java:80)
                                                                                                       at gurux.dlms.android.fragments.ObjectReadsFragment$$ExternalSyntheticLambda0.run(D8$$SyntheticClass:0)
                                                                                                       at android.os.Handler.handleCallback(Handler.java:958)
                                                                                                       at android.os.Handler.dispatchMessage(Handler.java:99)
                                                                                                       at android.os.Looper.loopOnce(Looper.java:222)
                                                                                                       at android.os.Looper.loop(Looper.java:314)
                                                                                                       at android.app.ActivityThread.main(ActivityThread.java:8680)
                                                                                                       at java.lang.reflect.Method.invoke(Native Method)
                                                                                                       at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:565)
                                                                                                       at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1081)

Error is in line :- 

rows = gxConnection.readRowsByIndex(pg, 1, 1);

What am I doing wrong? And if this line works fine for reading Nameplate profile, then why there is internal gurux code error in case of Instantaneous profile?

I will be waiting for a response, sir. 
Thanks, 
Kshitiz

Profile picture for user Kurumi

Kurumi

1 year 9 months ago

Hello Mr. Kshitiz, The…

Hello Mr. Kshitiz,

The number of columns does not match. means that the number of columns in capture objects differs from the buffer.

Try to read your meter with GXDLMSDirector. If you get the same error, you need to ask the reason for this from the meter manufacturer and if there is a meter firmware update that fixes this.

BR,
Mikko

saraf_kshitiz

1 year 9 months ago

Hi Mikko Sir, Yes it was an…

Hi Mikko Sir, 
Yes it was an issue of column mismatch in capture objects and buffer. 
It has been fixed by reading all the indexes of the object and reading the capture objects separately.

gxConnection.read(pg);
gxConnection.readObject(pg, 3);

Thanks, 

Kshitiz

  • Create new account
  • Reset your password

Hire Us!

Latest Releases

  • Tue, 10/13/2026 - 12:00
    gurux.dlms.java 4.0.97
  • Tue, 09/22/2026 - 14:02
    Gurux.DLMS.Net 9.0.2609.2201
  • Mon, 09/21/2026 - 10:18
    Gurux.DLMS.Net 9.0.2609.2101
  • Wed, 08/26/2026 - 09:04
    Gurux.DLMS.Python 1.0.203
  • Mon, 08/17/2026 - 11:28
    Gurux.DLMS.Python 1.0.202

New forum topics

  • Need RJ45 pin configuration for Saral 300 and Saral 305 Secure meters
  • Query Regarding Class 63 Status Mapping Support in Gurux DLMS Python
  • Inhemeter
  • DLMS Server - Profile Generic - can't add too many items to profile generic capture object - how to set maximum profile entries
  • HDLC Frames sequencing
More
RSS feed
Privacy FAQ GXDN Issues Contact
Follow Gurux on Twitter Follow Gurux on Linkedin