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. Image Transfer Resume

Image transfer resume

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 sakshi , 5 June, 2020
Forums
Gurux DLMS for Java

Hi

I want to know can we resume image transfer after connection failure with dlms for java. I have to sent 2000 block. But after 1000 connection get lost due to ping discontinuity. So i want to connect meter again and image data should be transfer from 10001. Could it be possible?

Thanks

Profile picture for user Kurumi

Kurumi

6 years ago

Hi,

Hi,

I can say that it depends on the meter, but usually, it's possible. You can try to read attribute #4 image first not transferred block number and start sending blocks from that. Or you can read attribute #3 and send missing blocks. It's a bit-string that tells what blocks meter has received.

BR,
Mikko

sakshi

6 years ago

Step 3: Transfers ImageBlocks

Step 3: Transfers ImageBlocks.
int[] imageBlockCount = new int[1];
imageBlockCount[0] = (int) (imgData.length / img.getImageBlockSize());

gxReader.readDataBlock(img.imageBlockTransfer(dlms, imgData, imageBlockCount), reply);
Can you tell me how can we pass block number from where i have to initiate?
Above code always try to send block from 1;

sakshi

6 years ago

Thanks... i got it how to do.

Thanks... i got it how to do.

sakshi

6 years ago

hi

hi

Now i want to know can we set block number in data. Because it always start block number from 0 in image data when resume.

is it needed to call imageTransferInitiate method while resuming.
thanks

Profile picture for user Kurumi

Kurumi

6 years ago

Hi,

Hi,

Because there might be several missing blocks there is no method for this.
You can do it like this:
List<byte[]> packets = new List<byte[]>();
GXDLMSImageTransfer img = new GXDLMSImageTransfer();
byte[][] blocks = img.GetImageBlocks(image);
//Remove blocks that meter has received.
....

//Generate messages.
foreach (byte[] it in blocks)
{
packets.AddRange(client.Method(img, 2, it, DataType.Array));
}
//Send data.

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