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.
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.
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
Hi,
Hi,
I have ImageBlockSize is 183, Number of Segments is 1461, ImageSize is 267363.
I set them with those values.
Thanks
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
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
...}
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
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
Hi,
Hi,
Thanks for the info. Have a nice coding.
BR,
Mikko