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. Update Image Firmware

Update Image Firmware

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 taher_alfalah , 12 April, 2021
Forums
Gurux DLMS for Android

Hello,

i am trying to update KAIFA meter image firmware using optical probe(Android), I am following same Gurux hint to do that, error raised on step5(The Image is verified) , error descriptions is "Device reports a temporary failure." appreciate your support

GXDLMSImageTransfer target=new GXDLMSImageTransfer();
GXReplyData reply = new GXReplyData();
IGXMedia media = mDevice.getMedia();
//Check that image transfer ia enabled.
readDataBlock( mClient.read(target, 5), reply);
mClient.updateValue(target, 5, reply.getValue());
if (!target.getImageTransferEnabled())
{
throw new Exception("Image transfer is not enabled");
}

//Step 1: Read image block size.
readDataBlock(mClient.read(target, 2), reply);
mClient.updateValue(target, 2, reply.getValue());

// Step 2: Initiate the Image transfer process.
// readDataBlock( target.imageTransferInitiate(mClient, Identification, data.length), reply);
readDataBlock( target.imageTransferInitiate(mClient, "KFM_100A_DLMS", bytes.length), reply);

// Step 3: Transfers ImageBlocks.
int[] imageBlockCount = new int[1];
readDataBlock( target.imageBlockTransfer(mClient, bytes, imageBlockCount), reply);

//Step 4: Check the completeness of the Image.
readDataBlock(mClient.read(target, 3), reply);

mClient.updateValue(target, 3, reply.getValue());

// Step 5: The Image is verified;
readDataBlock( target.imageVerify(mClient), reply);

// Step 6: Before activation, the Image is checked;
//Get list to imaages to activate.
readDataBlock(mClient.read(target, 7), reply);
mClient.updateValue(target, 7, reply);
boolean bFound = false;
for (GXDLMSImageActivateInfo it : target.getImageActivateInfo())
{
//if (it.getIdentification().equals(Identification))
if (it.getIdentification().equals("KFM_100A_DLMS"))
{
bFound = true;
break;
}
}

//Read image transfer status.
readDataBlock( mClient.read(target, 6), reply);
mClient.updateValue(target, 6, reply);
if (target.getImageTransferStatus() != ImageTransferStatus.IMAGE_VERIFICATION_SUCCESSFUL)
{
throw new RuntimeException("Image transfer status is " + target.getImageTransferStatus().toString());
}
if (!bFound)
{
throw new RuntimeException("Image not found.");
}
//Step 7: Activate image.
readDataBlock( target.imageActivate(mClient), reply);

Profile picture for user Kurumi

Kurumi

5 years 2 months ago

Hi,

Hi,

Meter is returning TemporaryFailure if verifying is in progress. Catch this TemporaryFailure exception wait a while and read this again.

Image verifying might take a long time, so be patient.

BR,
Mikko

taher_alfalah

5 years 1 month ago

Hi

Hi

i tried to get the list of firmware and the below is the replydata
010102030600073880090D4B464D5F313030415F444C4D530910434D41472D43414D454C2D4150500000
but when we try to update value mClient.updateValue(target, 7, reply); have exception to convert data to list.
also when try to read the getImageTransferStatus the result is IMAGE_TRANSFER_NOT_INITIATED

Profile picture for user Kurumi

Kurumi

5 years 1 month ago

Hi,

Hi,

You can read the list from the ImageActivateInfo property of the image transfer.
Have you called ImageTransferInitiate -method to start the image transfer?

BR,
Mikko

taher_alfalah

5 years 1 month ago

Hi,

Hi,

Yes, we already initiate the image transfer as below code, and we got not initiate status
// Step 2: Initiate the Image transfer process.
readDataBlock( target.imageTransferInitiate(mClient, "KFM_100A_DLMS", bytes.length), reply);

Profile picture for user Kurumi

Kurumi

5 years 1 month ago

Hi,

Hi,

Some meters don't update the status before the image is transferred to the meter. What if you transfer the image, is the status changed?

BR,
Mikko

taher_alfalah

5 years 1 month ago

Hi,

Hi,

kindly check the full trace for updated firmware from the below link.
https://www.dropbox.com/s/3vdoekie7w7e4w6/update%20fairmwaer.txt?dl=0
all steps were a success but the last status not initiate.

appreciate your support.

BR

Profile picture for user Kurumi

Kurumi

5 years 1 month ago

Hi,

Hi,

You need to poll the image transfer status until it succeeded. Not you try only once and meter returns TemporaryFailure. Image verify is still in progress and it might take a long time. You need to wait for example 20 seconds and try to read image transfer status again until the meter is not returning TemporaryFailure. This means that image verify is finished. The verifying image might take a long time, so be patient.

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