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. ImageBlockTransfer Send Wrong Image_block_number

ImageBlockTransfer send wrong image_block_number

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 SgmUsr , 29 October, 2019
Forums
Gurux.DLMS

Hi,

I'm following the example of Image Transfer in Gurux.DLMS.Client but when I use ImageBlockTransfer() method, it always sends image_block_number = 0 and the correct segment for each segment.

Where is the problem?

Thanks

Profile picture for user Kurumi

Kurumi

6 years 7 months ago

Hi,

Hi,

Have you read ImageBlockSize? What it's the size? What is the size of your image in bytes?

Check that you have not modified the source code.

BR,
Mikko

SgmUsr

6 years 7 months ago

Hi,

Hi,

I have ImageBlockSize is 183, Number of Segments is 1461, ImageSize is 267363.

I set them with those values.

Thanks

Profile picture for user Kurumi

Kurumi

6 years 7 months ago

Hi,

Hi,

I tested this with one meter. image_block_number is correct. Can you send the second message that you send to the meter where the image index should be 1.

Note that image_block_number is UInt32.

BR,

Mikko

SgmUsr

6 years 7 months ago

But when GetImageBlocks(byte[

But when GetImageBlocks(byte[] image) creates frame, I have:

for (int pos = 0; pos != cnt; ++pos)
{
GXByteBuffer data = new GXByteBuffer();
data.SetUInt8((byte)DataType.Structure);
data.SetUInt8((byte)2);
GXCommon.SetData(null, data, DataType.UInt32, pos); -> pos is always 0
...}

Profile picture for user Kurumi

Kurumi

6 years 7 months ago

Hi,

Hi,

This is for loop where pos is increased every time (++pos).
It's zero in the first time. Can you add this line before packets.Add(...)

System.Diagnostics.Debug.WriteLine(data);
Post the second debug line and I'll verify this from the bytes.
BR,

Mikko

SgmUsr

6 years 7 months ago

Ok, I found my error: I used

Ok, I found my error: I used ImageBlockTransfer() method fo each segment and not with all segment together.
Now it work correctly.

Thanks for help

Profile picture for user Kurumi

Kurumi

6 years 7 months ago

Hi,

Hi,

Thanks for the info. Have a nice coding.

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