Skip to main content
Home
for DLMS smart meters

Main navigation

  • Home
  • Products
  • About us
  • Open Source
  • Community
  • Forum
  • Downloads
User account menu
  • Log in

Breadcrumb

  1. Home
  2. Android ReadRowsByEntry Fails With "Invalid Block Number" On Billing Profile

Android readRowsByEntry Fails with "Invalid Block number" on Billing Profile

By rajput_saurabh07, 23 August, 2025
Forums
Gurux DLMS for Android

My application can successfully connect to the meter and read the associated scaler profile (1.0.94.91.6.255). It also correctly reads that there are 2 rows of data available in the billing profile buffer.

However, when I call mClient.readRowsByEntry(profile, 1, rowCount), the communication fails. The Logcat shows the following error:

java.lang.IllegalArgumentException: Invalid Block number. It is 3 and it should be 1.
at gurux.dlms.GXDLMS.handleGetResponseNextDataBlock(GXDLMS.java:3957)
at gurux.dlms.GXDLMS.handleGetResponse(GXDLMS.java:4049)
...

Here are the logs showing the successful connection and the point of failure:

2025-08-23 15:43:54.418 SUCCESS: Connected to meter.
2025-08-23 15:43:55.829 Reading Profile: 1.0.98.1.0.255
2025-08-23 15:43:55.829 Reading Scaler Profile: 1.0.94.91.6.255
...
2025-08-23 15:43:57.797 Finished building scaler map. Final size: 41
...
2025-08-23 15:43:59.056 2 rows found in profile buffer.
...
// Crash occurs here when calling readRowsByEntry()
Could you please advise on the correct way to read a multi-block profile buffer in Android to avoid the "Invalid Block number" error? Is there an issue with my readDLMSPacket implementation or how I am calling readRowsByEntry?

Thank you for your help.

Profile picture for user Kurumi

Kurumi

2 months 2 weeks ago

Hi, There is an issue with…

Hi,

There is an issue with your meter. The meter should reset the block number to one, but it doesn't. If I remember right, and your meter is what I expect it to be, reading the capture objects is causing this.

This has been updated to version 3.0.2, allowing you to read your meter.

BR,
Mikko

rajput_saurabh07

2 months 2 weeks ago

The Problem When the meter…

The Problem

When the meter has only one billing record, the data is read successfully without any problems.

However, when the meter has two or more billing records, the read operation fails with a block transfer error.

The exact error I'm receiving is:
ERROR: Failed to read profile. Invalid Block number. It is 3 and it should be 1.

Here is the full trace from my Logcat showing the communication leading up to the error:

2 rows found in profile buffer.
2025-08-25 16:47:24.599 D/MeterTrace: <- 16:47:24.598 7E A0 20 03 41 DC DB 06 E6 E6 00 C8 12 20 00 00 00 06 A8 30 FF FD 69 A4 21 9D C0 18 45 1C D6 EC 28 7E
2025-08-25 16:47:25.012 D/MeterTrace: -> 16:47:25.011 7E
2025-08-25 16:47:25.036 D/MeterTrace: -> 16:47:25.033 7E A1 E4 41 03 FC B0 A3 E6 E7 00 CC 82 01 D4 20 00 00 00 06 95 7E
2025-08-25 16:47:25.054 D/MeterTrace: -> 16:47:25.052 7E A1 E4 41 03 FC B0 A3 E6 E7 00 CC 82 01 D4 20 00 00 00 06 95 7E BD 92 D2 14 2F D9 6C 73 C7 89 BB E9 AB 14 1C 68 23 7E
2025-08-25 16:47:25.215 D/MeterTrace: -> 16:47:25.213 7E A1 E4 41 03 FC B0 A3 E6 E7 00 CC 82 01 D4 20 00 00 00 06 95 7E BD 92 D2 14 2F D9 6C 73 C7 89 BB E9 AB 14 1C 68 23 7E 59 E4 99 F6 4F 91 99 89 6B 59 CE 44 54 64 1A 16 61 17 9E AA CC 5C 29 1F 59 33 97 86 AA 2A 2D A9 2E BF 9F 1E 20 EB 56 1E 59 AA 93 6F 7B CE 60 B2 24 5C B9 8A 93 96 FF 85 15 AF 44 5B E3 19 D2 10 ED 1B 78 8D 6A 27 2E 36 F5 C4 B3 C7 D4 71 F2 BC FB C7 C2 03 D2 17 D8 53 39 76 B6 E2 6E 4D 5D B7 26 3B C1 A0 86 93 97 A2 12 78 93 17 A4 01 F0 90 ED CC 5C B8 6C 21 95 5A 86 85 79 C6 E4 0B 4D A5 2D 10 78 12 4A AD C6 F8 ED D6 F6 C5 4D 84 49 5B D6 8C 06 97 4C F8 4C 8D 7E
2025-08-25 16:47:25.528 D/MeterTrace: -> 16:47:25.523 7E A1 E4 41 03 FC B0 A3 E6 E7 00 CC 82 01 D4 20 00 00 00 06 95 7E BD 92 D2 14 2F D9 6C 73 C7 89 BB E9 AB 14 1C 68 23 7E 59 E4 99 F6 4F 91 99 89 6B 59 CE 44 54 64 1A 16 61 17 9E AA CC 5C 29 1F 59 33 97 86 AA 2A 2D A9 2E BF 9F 1E 20 EB 56 1E 59 AA 93 6F 7B CE 60 B2 24 5C B9 8A 93 96 FF 85 15 AF 44 5B E3 19 D2 10 ED 1B 78 8D 6A 27 2E 36 F5 C4 B3 C7 D4 71 F2 BC FB C7 C2 03 D2 17 D8 53 39 76 B6 E2 6E 4D 5D B7 26 3B C1 A0 86 93 97 A2 12 78 93 17 A4 01 F0 90 ED CC 5C B8 6C 21 95 5A 86 85 79 C6 E4 0B 4D A5 2D 10 78 12 4A AD C6 F8 ED D6 F6 C5 4D 84 49 5B D6 8C 06 97 4C F8 4C 8D 7E 43 60 08 D9 DB B0 5B 34 46 A3 6F EA 30 B3 62 1C D3 C2 EA ED 9A E8 CB 37 6E A5 FF 16 21 14 4F 5C 26 1B 81 B7 30 74 19 4C 39 52 AB 1E 11 89 D1 F0 DF D7 9A 10 E8 3A 45 52 82 1A D9 C5 7F 7B 6F 9C B1 C9 7C DA C9 13 38 28 49 53 46 3E 17 5E EE E3 7A B9 AF 56 03 83 3E 72 01 55 4C 3B C1 39 A8 05 DB 13 E9 F0 15 F7 D1 CD 20 22 72 6E 90 9F BD 04 D6 46 8D E3 7C FB 5E 45 35 65 D6 C0 5E F9 28 BE 0C 74 0A 52 DB D0 62 9D A8 B9 59 8F 63 08 12 B1 ED 79 67 29 25 78 16 C8 D0 C4 83 1A F4 E9 B6 D6 90 2A B8 9F 05 5A EA AD A8 9E BD C4 C6 8B 1B 72 69 90 8C 3C 5D 59 96 F7 CC 72 05 40 6D D2 D3 BB 95 31 8D 34 45 A2 E9 8A 7D B2 F6 69 15 A9 D0 1E 96 39 9E D1 E7 2A 1A 7D 2C B9 95 C1 5E BB 8D CC E0 F4 81 88 E8 E4 E9 7A A7 F9 55 9E E2 6B 0E 8A D9 8F 81 63 21 9D 42 52 D3 98 05 4B 0D 4F 82 47 C8 1B D4 9C 76 C5 AC 59 90 49 39 5E 1C 72 1F 4A A7 FD E6 76 DF EF 40 9C 26 A0 9A 7C 0F FD 40 F4 63 63 12 44 7E
2025-08-25 16:47:25.539 D/MeterTrace: ERROR: Failed to read profile. Invalid Block nu

Has anyone encountered this issue before? Is there a recommended approach for reading large profile buffers that might be split across multiple data blocks?

Any suggestions would be greatly appreciated.

Thank you!

Profile picture for user Kurumi

Kurumi

2 months 2 weeks ago

Hi, As I told this is a…

Hi,

As I told this is a meter issue. The meter doesn't reset the block number, and the client application gives an error from this because new blocks should start from number one.

There is a new version 3.0.2 that accepts that the first block can be something else than #1.

The meter issue is fixed on the client side.

BR,
Mikko

rajput_saurabh07

2 months 2 weeks ago

But I m able to download it…

okay Thanks i will try to do that.

  • Create new account
  • Reset your password

Hire Us!

Latest Releases

  • Wed, 10/29/2025 - 08:51
    gurux.dlms.c 9.0.2510.2901
  • Thu, 10/16/2025 - 09:59
    gurux.dlms.java 4.0.83
  • Wed, 10/08/2025 - 10:21
    gurux.dlms.c 9.0.2510.0801
  • Fri, 09/26/2025 - 10:02
    gurux.dlms.cpp 9.0.2509.2601
  • Fri, 09/26/2025 - 09:45
    gurux.dlms.c 9.0.2509.2601

New forum topics

  • Guidance on using the source codes
  • How to get/convert user readable format data from readRowsByRange
  • Insufficient memory to continue the execution of the program.
  • The client instance code failed to connect to the electricity meter for authentication
  • Unable to Release Request when closing connection with meter.
More
RSS feed
Privacy FAQ GXDN Issues Contact
Follow Gurux on Twitter Follow Gurux on Linkedin