For firmware upgrade, I had followed the steps under Image Updating section of DLMS client (Thanks for steps) and that is working fine.
Now I want to support resume functionality, if any firmware block fails during the image transfer.
But, I did not see any attribute or method to resume the block transfer.
You need to read what blocks are missing (Image transferred blocks status) and then re-send those missing blocks. You can use imageBlockTransfer where you give blocksStatus as the third parameter.
It will automatically remove missing blocks.
Note! don't call ImageTransferInitiate or you need to send all the image blocks again.
I have to say that usually meters expect that you must send all the blocks after the first missing image block.
Thanks Mikko for quick Response.
Ok. For 3rd parameter I will use the block status. and I will not use ImageTransferInitiate for resume.
But, How to send missing blocks? Do I need to send partial image Buffer(By removing transfer blocks manually) or full image buffer (as was used first time) and it will calculate index automatically from image buffer.
Give the full image and this method will check what objects are missing and the method will send only the missing ones. Then just send returned data using readDataBlock method as you have done before.
You can also give the starting index as a parameter and all the data blocks are sent starting from that index.
You can overwrite a new image until you activate the image just sending the Image transfer initiate command again and transferring the image blocks for the meter.
Sending Image Transfer initiate again will restart the image upgrade again.
By seeing attribute 7 it seems meter keeps list of images.(List of images ready for activation).
Does meter keep old image after activate new Image? So Can it be fallback to that old image without transfer again?
At the moment there can be only one image in the store waiting for activation at a time.
This depends on the meter, but usually, the old image is lost after the new one is activated. This is a memory depending topic. There is not enough memory to save multiple images.
Hi,
Hi,
You need to read what blocks are missing (Image transferred blocks status) and then re-send those missing blocks. You can use imageBlockTransfer where you give blocksStatus as the third parameter.
It will automatically remove missing blocks.
Note! don't call ImageTransferInitiate or you need to send all the image blocks again.
I have to say that usually meters expect that you must send all the blocks after the first missing image block.
BR,
Mikkko
Thanks Mikko for quick
Thanks Mikko for quick Response.
Ok. For 3rd parameter I will use the block status. and I will not use ImageTransferInitiate for resume.
But, How to send missing blocks? Do I need to send partial image Buffer(By removing transfer blocks manually) or full image buffer (as was used first time) and it will calculate index automatically from image buffer.
Hi,
Hi,
Give the full image and this method will check what objects are missing and the method will send only the missing ones. Then just send returned data using readDataBlock method as you have done before.
You can also give the starting index as a parameter and all the data blocks are sent starting from that index.
BR,
Mikko
Thanks Mikko for helpful
Thanks Mikko for helpful advice. I will try this.
Thanks Mikko, it worked.
Thanks Mikko, it worked.
Can we also do image fallback or revert? If yes then How?
Thanks in Advance.
Govind Singh Parmar
Hi,
Hi,
You can overwrite a new image until you activate the image just sending the Image transfer initiate command again and transferring the image blocks for the meter.
https://www.gurux.fi/Gurux.DLMS.Objects.GXDLMSImageTransfer
Sending Image Transfer
Sending Image Transfer initiate again will restart the image upgrade again.
By seeing attribute 7 it seems meter keeps list of images.(List of images ready for activation).
Does meter keep old image after activate new Image? So Can it be fallback to that old image without transfer again?
Thanks in Advance.
Govind Singh Parmar
Hi,
Hi,
At the moment there can be only one image in the store waiting for activation at a time.
This depends on the meter, but usually, the old image is lost after the new one is activated. This is a memory depending topic. There is not enough memory to save multiple images.
BR,
Mikko
Thanks Mikko.
Thanks Mikko.