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 1 month 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 1 month 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 1 month ago

Thanks... i got it how to do.

Thanks... i got it how to do.

sakshi

6 years 1 month 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 1 month 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

  • Thu, 07/23/2026 - 16:19
    gurux.dlms.java 4.0.96
  • Thu, 07/09/2026 - 14:34
    Gurux.DLMS.Python 1.0.201
  • Fri, 06/26/2026 - 16:32
    Gurux.Service 3.0.2606.2601
  • Wed, 06/24/2026 - 08:36
    Gurux.DLMS.Python 1.0.200
  • Mon, 06/15/2026 - 08:52
    gurux.dlms.c 9.0.2606.1501

New forum topics

  • Service not known error on gprs communication
  • Service not known error on gprs communication
  • Help Needed: Interfacing Saral 100 Energy Meter with Microcontroller via RS232
  • Connecting Meter to Agent via serial
  • Reading block profile with Compact array
More

Who's new

  • Dawsontot
  • Jerrylam
  • qvlLdJweKzGUYaSOVS
  • LindanEt
  • annoyingconsultants
RSS feed
Privacy FAQ GXDN Issues Contact
Follow Gurux on Twitter Follow Gurux on Linkedin