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.
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.
Hi Mikko,
I was attempting to remotely change the password for an electric meter (low security). After changing the password, the meter not longer accepts any password I try, neither the old one nor the new one I changed it to. Changing the password works find from gxdlms director. here's my code:
var obj = new GXDLMSAssociationLogicalName("0.0.40.0.7.255"); // Managment Remote
obj.Secret = new byte[] { 0xA9, 0x8A, 0xC7 }; // 11111111 in decimal
reader.Write(obj, 7);
The password does change but I don't know to what. I cannot connect to it anymore. Here's my trace:
9: 00 01 00 01 00 64 00 2B 61 29 A1 09 06 07 60 85 74 05 08 01 01 A2 03 02 01 00 A3 05 A1 03 02 01 00 BE 10 04 0E 08 00 06 5F 1F 04 00 00 1C 1D 00 FA 00 07
<WRAPPER len="2B" >
<TargetAddress Value="1" />
<SourceAddress Value="64" />
<PDU>
<AssociationResponse>
<ApplicationContextName Value="LN" />
<AssociationResult Value="00" />
<ResultSourceDiagnostic>
<ACSEServiceUser Value="00" />
</ResultSourceDiagnostic>
<InitiateResponse>
<NegotiatedDlmsVersionNumber Value="06" />
<NegotiatedConformance>
<ConformanceBit Name="BlockTransferWithGetOrRead" />
<ConformanceBit Name="BlockTransferWithSetOrWrite" />
<ConformanceBit Name="BlockTransferWithAction" />
<ConformanceBit Name="Get" />
<ConformanceBit Name="Set" />
<ConformanceBit Name="SelectiveAccess" />
<ConformanceBit Name="Action" />
</NegotiatedConformance>
<NegotiatedMaxPduSize Value="00FA" />
<VaaName Value="0007" />
</InitiateResponse>
</AssociationResponse>
</PDU>
</WRAPPER>
10: 00 01 00 64 00 01 00 12 C1 01 C1 00 0F 00 00 28 00 07 FF 07 00 09 03 A9 8A C7
<WRAPPER len="12" >
<TargetAddress Value="64" />
<SourceAddress Value="1" />
<PDU>
<SetRequest>
<SetRequestNormal>
<!-- Priority: High, ServiceClass: Confirmed, Invoke ID: 1 -->
<InvokeIdAndPriority Value="C1" />
<AttributeDescriptor>
<!-- AssociationLogicalName -->
<ClassId Value="000F" />
<!-- 0.0.40.0.7.255 -->
<InstanceId Value="0000280007FF" />
<!-- Secret -->
<AttributeId Value="07" />
</AttributeDescriptor>
<Value>
<OctetString Value="A98AC7" />
</Value>
</SetRequestNormal>
</SetRequest>
</PDU>
</WRAPPER>
11: 00 01 00 01 00 64 00 04 C5 01 C1 00
<WRAPPER len="4" >
<TargetAddress Value="1" />
<SourceAddress Value="64" />
<PDU>
<SetResponse>
<SetResponseNormal>
<!-- Priority: High, ServiceClass: Confirmed, Invoke ID: 1 -->
<InvokeIdAndPriority Value="C1" />
<Result Value="Success" />
</SetResponseNormal>
</SetResponse>
</PDU>
</WRAPPER>
Please tell me if you need more details from the trace file.
After that, I'm getting: connection is permanently rejected. Authentication failure.
I tried "11111111" and "A98AC7" as passwords but both didn't work. I tried the old password as well.
Is there something wrong with my code? it says <OctetString Value="A98AC7" /> so what did it change it to?
Thank you,
Moataz
Hi Moataz,
Hi Moataz,
I believe that your password is "11111111" in ASCII. Try this:
var obj = new GXDLMSAssociationLogicalName("0.0.40.0.7.255");
obj.Secret = System.Text.ASCIIEncoding.ASCII.GetBytes("11111111");
reader.Write(obj, 7);
BR,
Mikko
Hi Mikko,
Hi Mikko,
I tried it and it works great, thank you.
Moataz,