I have to update authentication key & encryption key in smart meter. I were able to do it using gurux dlms director using update key option.
From code I was not able to do it. Below is the code snippet which i have used. Do global key transfer method does not apply key automatically. Can I please get correct code snippet to update the key
Hi Mikko,
Instead of string to bytes i have used to GXCommon.hexToBytes. Still new keys are not updated. Is there any other method invocation like apply key or some write operation to be done in code. i have enabled pdu logs i could not see any request went to meter.
Have you sent generated bytes to the meter? globalKeyTransfer method doesn't send the bytes, it will only generate correct bytes. You can use readDataBlock to send bytes to the meter.
BR,
Mikko
Thanks its working.
Do Authentication key & encryption key is same for all association like Push Association, MR, US, FR. Because updating Authentication key & encryption key updates all association security. I can connect to all associations with new keys only.
This confusion a raised since we have key updation in GLMSDirector for all association individually.
DLMS standard doesn't define it, but ex. Indian meters are usually using the same keys for all associations where as Italy meters are using their own keys for each association.
Do gurux allows to update meter password also. From security setup we were able to update Authentication and encryption key. Is it possible to update passwords of different association like MR,PC,US and FR. Attached screenshot for reference which need to be updated
You can update the password if you select the current association and then General-tab.
If "Update Low Password" or "Update High Password" are disabled, you can't update the password from the current association and you need to log in with higher authentication.
I can able to update password from gurux dlms director. From US association i can able to update MR and FR password but from FR i cannot able to update other passwords.
All password update works from US association.
Below code snippet i have used to update password for MR using US association. It works fine. from US association i cannot reset password for its own. though i didnt face any error. Tried both index 7 and 2
Hi,
Hi,
Your code looks correct. Check your keys. Keys are usually given in hex values, so you can't use getBytes() and you need to use GXCommon.hexToBytes.
BR,
Mikko
Hi Mikko,
Hi Mikko,
Instead of string to bytes i have used to GXCommon.hexToBytes. Still new keys are not updated. Is there any other method invocation like apply key or some write operation to be done in code. i have enabled pdu logs i could not see any request went to meter.
Hi Naveen,
Hi Naveen,
Have you sent generated bytes to the meter? globalKeyTransfer method doesn't send the bytes, it will only generate correct bytes. You can use readDataBlock to send bytes to the meter.
BR,
Mikko
Hi Mikko,
Hi Mikko,
Thanks its working.
Do Authentication key & encryption key is same for all association like Push Association, MR, US, FR. Because updating Authentication key & encryption key updates all association security. I can connect to all associations with new keys only.
This confusion a raised since we have key updation in GLMSDirector for all association individually.
Hi,
Hi,
DLMS standard doesn't define it, but ex. Indian meters are usually using the same keys for all associations where as Italy meters are using their own keys for each association.
BR,
Mikko
Hi Mikko,
Hi Mikko,
Do gurux allows to update meter password also. From security setup we were able to update Authentication and encryption key. Is it possible to update passwords of different association like MR,PC,US and FR. Attached screenshot for reference which need to be updated
Hi Naveen,
Hi Naveen,
You can update the password if you select the current association and then General-tab.
If "Update Low Password" or "Update High Password" are disabled, you can't update the password from the current association and you need to log in with higher authentication.
BR,
Mikko
Hi Mikko,
Hi Mikko,
I can able to update password from gurux dlms director. From US association i can able to update MR and FR password but from FR i cannot able to update other passwords.
All password update works from US association.
Below code snippet i have used to update password for MR using US association. It works fine. from US association i cannot reset password for its own. though i didnt face any error. Tried both index 7 and 2
GXDLMSAssociationLogicalName associationLogicalName =
(GXDLMSAssociationLogicalName)
settings
.client
.getObjects()
.findByLN(ObjectType.ASSOCIATION_LOGICAL_NAME, "0.0.40.0.2.255");
associationLogicalName.setSecret(GXCommon.hexToBytes("key"));
reader.writeObject(associationLogicalName, 7);
Hi Mikko,
Hi Mikko,
Please ignore my previous comment. Using client method solved my problem
reader.readDataBlock(settings.client.method(
associationLogicalName, 2, "key".getBytes(), DataType.OCTET_STRING), new GXReplyData());
Hi,
Hi,
Yes, you are updating low-level passwords with write and high-level passwords with method.
BR,
Mikko