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. Error : Invalid Block Number. It Is 3 and It Should Be 2

Error : Invalid Block number. It is 3 and it should be 2

By sc-anokum, 28 February, 2024
Forums
Gurux DLMS for Java

Hi,

i'm reading activity calender in memf meters using gurux for java library, while reading i found out that the memf meters send data in block 1,2,4,7,9 so on. but in GXDLMS class in gurux.dlms package. code is throwing error

if (number != expectedIndex) {
throw new IllegalArgumentException("Invalid Block number. It is " + number
+ " and it should be " + expectedIndex + ".");
}

if number is not equals to expectedIndex.

can you please suggest some fix?

Profile picture for user Kurumi

Kurumi

1 year 2 months ago

Hi, Are you sure that the…

Hi,

Are you sure that the blocks are not missed? The block numbers look very odd.
If you believe that all blocks are there ask the meter vendor if there is a new meter firmware where this is fixed.

BR,
Mikko

sc-anokum

1 year 2 months ago

Hi Mikko, sry for the late…

Hi Mikko,
sry for the late reply, but no blocks are missing, it is the normal behaviour of the Meter. so only issue is not to raise exceptions in case consecutive blocks are not coming.

Profile picture for user Kurumi

Kurumi

1 year 2 months ago

Hi, You need to ask if there…

Hi,

You need to ask if there is a firmware update available for the meter that fixes this. According to the DLMS standards, the data block counter is increased by one for each block.

BR,
Mikko

sc-anokum

1 year 2 months ago

Hi Mikko, i have checked,…

Hi Mikko,
i have checked, and there is no update available to fix this, in fact their in house application does support this behavior so this is not an anomaly as per them. any way i can avoid this exception and parse the data normally?
any clue would be helpful,

thanks

Profile picture for user Kurumi

Kurumi

1 year 2 months ago

Hi, This should be fixed for…

Hi,

This should be fixed for the meter because it breaks the DLMS standard and compatibility. I believe that this meter doesn't have a DLMS certificate.

You can remove this error from the source code, but the better way is to fix this for the meter.

BR,
Mikko

sc-anokum

1 year 2 months ago

Thanks mikko

Thanks mikko

  • Log in or register to post comments
  • Create new account
  • Reset your password

Hire Us!

Latest Releases

  • Thu, 05/15/2025 - 16:26
    gurux.dlms.c 9.0.2505.1501
  • Wed, 05/14/2025 - 08:30
    gurux.dlms.c 9.0.2505.1401
  • Tue, 05/13/2025 - 10:00
    Gurux.DLMS.Android 2.0.15
  • Fri, 05/09/2025 - 13:03
    Gurux.DLMS.Python 1.0.181
  • Wed, 05/07/2025 - 16:09
    Gurux.DLMS.Android 2.0.14

New forum topics

  • Long reading ends with "Invalid frame ..." error.
  • Push listener example how it works + tcp stream issue
  • Problem with reading energymeter Star DTS27 via GXDLMSDirector
  • Receiver Ready Test Failed
  • Combining several meters' profile generic data into one
More
RSS feed
Privacy FAQ GXDN Issues Contact
Follow Gurux on Twitter Follow Gurux on Linkedin