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 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);
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
You can read the list from the ImageActivateInfo property of the image transfer.
Have you called ImageTransferInitiate -method to start the image transfer?
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);
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.
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
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
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
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);
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
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
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