Our meters support automated firmware update from FTP server. We need to keep track of which meter has the old firmware version and which has the new one. For this, we want to read the meter firmware info and determine the version.
We tried to follow steps similar to the firmware transfer. But doesn't seem to be working. The GXDLMSImageActivateInfo seems to be empty.
Here is the code. We're trying to match imageIdentifier with getIdentification() value.
GXReplyData reply = new GXReplyData();
GXDLMSImageTransfer target = new GXDLMSImageTransfer("0.0.44.0.1.255");
log.info("Check that image transfer is enabled ");
//Check that image transfer is enabled.
checkImageTransferEnable(target, reply);
log.info("Step 6: Before activation, the Image is checked");
// Step 6: Before activation, the Image is checked;
//Get list to images to activate.
Object imageActivateInfo = readObject(target, 7);
target.setImageActivateInfo((GXDLMSImageActivateInfo[]) imageActivateInfo);
log.info("imageActivateInfo: " + Arrays.toString(target.getImageActivateInfo()));
for (GXDLMSImageActivateInfo it : target.getImageActivateInfo()) {
log.info("is " + imageIdentifier + " == " + it.getIdentification().toString());
if (it.getIdentification().toString().equals(imageIdentifier)) {
return true;
}
}
Check if there is "Active firmware version" or "Firmware version" data object. You can read firmware information from there if it exists. It depends on the meter how this is implemented.
That is the interface version number. You can see the value using getValue-method.
Try to read the meter with GXDLMSDirector. It will visualize the meter and you have a better idea of what the meter can offer.
Hi,
Hi,
Check if there is "Active firmware version" or "Firmware version" data object. You can read firmware information from there if it exists. It depends on the meter how this is implemented.
BR,
Mikko
Hi Mikko,
Hi Mikko,
I checked the version value on the target object. Like so.
int version = target.getVersion();
But this is always 0. So meter doesn't support reading version number ?
Dayah
Hi,
Hi,
That is the interface version number. You can see the value using getValue-method.
Try to read the meter with GXDLMSDirector. It will visualize the meter and you have a better idea of what the meter can offer.
BR,
Mikko
I found a way to read the
I found a way to read the versions.
Thanks for looking into this.
Dayah