I also trying to read objects from meter (gurux java). below is the client code
GXDLMSReader reader = null;
GXNet net = null;
Settings settings = new Settings();
settings.client.setInterfaceType(InterfaceType.WRAPPER);
settings.client.setUseLogicalNameReferencing(true);
settings.media = new GXNet();
net = (GXNet) settings.media;
net.setHostName(hostname);
net.setPort(7063);;
settings.client.setPassword("eeslekakgsl06abc");
settings.client.getCiphering().setSecurity(Security.AUTHENTICATION_ENCRYPTION);
settings.invocationCounter = "0.0.43.1.0.255";
settings.client.setAuthentication(Authentication.valueOfString("High"));
settings.readObjects.add(new GXSimpleEntry<String, Integer>("1.0.94.91.0.255", Integer.parseInt("2")));
.......
reader.initializeConnection();
I have not set InvocationCounter OBIS code at Gurux meter.
When I test Gurux meter it is working fine as it doesn't try to read invocation counter.
But when I am testing using gurux client, it get failed as invocation counter OBIS is not set.
You can read Invocation counter adding command line parameter -v 0.0.43.1.1.255
There is updateFrameCounter method that handles this. Frame counter is an old name of Invocation counter.
Hi,
Hi,
Use block cipher key. Current implementation uses same key for Broadcast and Unicast messages.
BR,
Mikko
Security-Receive Frame
Security-Receive Frame Counter- unicast key => "0.0.43.1.0.255"
Security-Receive Frame Counter -broadcast Key => "0.0.43.1.1.255"
Is not difference between Broadcast and Unicast in code ?
Hi,
Hi,
I'm sorry. There was a misunderstanding. Do you want to make a client or the meter?
BR,
Mikko
I want to make the meter.
I want to make the meter.
Can you help me ?
Can you help me ?
Hi,
Hi,
Yes, I can help you. This covirus-19 is causing some delays.
I'll try to release the example the latest tomorrow.
BR,
Mikko
I realized, in this situation
I realized, in this situation, I was entertained by programming.
So I'm waiting...
Hi,
Hi,
Check this to get started.
http://gurux.fi/InvocationCounter
BR,
Mikko
Hi Mikko,
Hi Mikko,
I also trying to read objects from meter (gurux java). below is the client code
GXDLMSReader reader = null;
GXNet net = null;
Settings settings = new Settings();
settings.client.setInterfaceType(InterfaceType.WRAPPER);
settings.client.setUseLogicalNameReferencing(true);
settings.media = new GXNet();
net = (GXNet) settings.media;
net.setHostName(hostname);
net.setPort(7063);;
settings.client.setPassword("eeslekakgsl06abc");
settings.client.getCiphering().setSecurity(Security.AUTHENTICATION_ENCRYPTION);
settings.invocationCounter = "0.0.43.1.0.255";
settings.client.setAuthentication(Authentication.valueOfString("High"));
settings.readObjects.add(new GXSimpleEntry<String, Integer>("1.0.94.91.0.255", Integer.parseInt("2")));
.......
reader.initializeConnection();
I have not set InvocationCounter OBIS code at Gurux meter.
When I test Gurux meter it is working fine as it doesn't try to read invocation counter.
But when I am testing using gurux client, it get failed as invocation counter OBIS is not set.
Meter Side:
Client Connected.
RX: 00 01 00 10 00 01 00 1F 60 1D A1 09 06 07 60 85 74 05 08 01 01 BE 10 04 0E 01 00 00 00 06 5F 1F 04 00 40 1E 1D FF FF
RX String: <WRAPPER len="27" >
<TargetAddress Value="10" />
<SourceAddress Value="1" />
<PDU>
<AssociationRequest>
<ApplicationContextName Value="LN" />
<InitiateRequest>
<ProposedDlmsVersionNumber Value="06" />
<ProposedConformance>
<ConformanceBit Name="Action" />
<ConformanceBit Name="SelectiveAccess" />
<ConformanceBit Name="Set" />
<ConformanceBit Name="Get" />
<ConformanceBit Name="MultipleReferences" />
<ConformanceBit Name="BlockTransferWithAction" />
<ConformanceBit Name="BlockTransferWithSetOrWrite" />
<ConformanceBit Name="BlockTransferWithGetOrRead" />
<ConformanceBit Name="GeneralProtection" />
</ProposedConformance>
<ProposedMaxPduSize Value="FFFF" />
</InitiateRequest>
</AssociationRequest>
</PDU>
</WRAPPER>
AARQ Request
TX: 00 01 00 01 00 10 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 40 1E 1D 04 00 00 07
TX String: <WRAPPER len="33" >
<TargetAddress Value="1" />
<SourceAddress Value="10" />
<PDU>
<AssociationResponse>
<ApplicationContextName Value="LN" />
<AssociationResult Value="00" />
<ResultSourceDiagnostic>
<ACSEServiceUser Value="00" />
</ResultSourceDiagnostic>
<InitiateResponse>
<NegotiatedDlmsVersionNumber Value="06" />
<NegotiatedConformance>
<ConformanceBit Name="Action" />
<ConformanceBit Name="SelectiveAccess" />
<ConformanceBit Name="Set" />
<ConformanceBit Name="Get" />
<ConformanceBit Name="MultipleReferences" />
<ConformanceBit Name="BlockTransferWithAction" />
<ConformanceBit Name="BlockTransferWithSetOrWrite" />
<ConformanceBit Name="BlockTransferWithGetOrRead" />
<ConformanceBit Name="GeneralProtection" />
</NegotiatedConformance>
<NegotiatedMaxPduSize Value="0400" />
<VaaName Value="0007" />
</InitiateResponse>
</AssociationResponse>
</PDU>
</WRAPPER>
RX: 00 01 00 10 00 01 00 0D C0 01 C1 00 01 00 00 2B 01 00 FF 02 00
handleGetRequest GetCommandType.NORMAL
getRequestNormal XML is not NULL
RX String: <WRAPPER len="15" >
<TargetAddress Value="10" />
<SourceAddress Value="1" />
<PDU>
<GetRequest>
<GetRequestNormal>
<!--Priority: HIGH ServiceClass: CONFIRMED invokeID: 1-->
<InvokeIdAndPriority Value="C1" />
<AttributeDescriptor>
<!--DATA-->
<ClassId Value="0001" />
<!--0.0.43.1.0.255-->
<InstanceId Value="00002B0100FF" />
<AttributeId Value="02" />
</AttributeDescriptor>
</GetRequestNormal>
</GetRequest>
</PDU>
</WRAPPER>
Get Request
handleGetRequest GetCommandType.NORMAL
getRequestNormal Objtype DATA ln 0.0.43.1.0.255
getRequestNormal Obj NULL
TX: 7E A0 07 21 03 97 2B E1 7E
TX String: <HDLC len="9" >
<TargetAddress Value="10" />
<SourceAddress Value="1" />
<!--S frame.-->
<FrameType Value="97" />
<UnacceptableFrame>
</UnacceptableFrame>
</HDLC>
RX: 00 01 00 10 00 01 00 17 62 15 80 01 00 BE 10 04 0E 01 00 00 00 06 5F 1F 04 00 40 1E 1D 04 00
RX String: <WRAPPER len="1F" >
<TargetAddress Value="10" />
<SourceAddress Value="1" />
<PDU>
<ReleaseRequest>
<Reason Value="Normal" />
<InitiateRequest>
<ProposedDlmsVersionNumber Value="06" />
<ProposedConformance>
<ConformanceBit Name="Action" />
<ConformanceBit Name="SelectiveAccess" />
<ConformanceBit Name="Set" />
<ConformanceBit Name="Get" />
<ConformanceBit Name="MultipleReferences" />
<ConformanceBit Name="BlockTransferWithAction" />
<ConformanceBit Name="BlockTransferWithSetOrWrite" />
<ConformanceBit Name="BlockTransferWithGetOrRead" />
<ConformanceBit Name="GeneralProtection" />
</ProposedConformance>
<ProposedMaxPduSize Value="0400" />
</InitiateRequest>
</ReleaseRequest>
</PDU>
</WRAPPER>
RELEASE Request
TX: 00 01 00 01 00 10 00 17 63 11 80 01 00 BE 0F 04 0E 08 00 06 5F 1F 04 00 40 1E 1D 04 00 00 07
TX String: <WRAPPER len="1F" >
<TargetAddress Value="1" />
<SourceAddress Value="10" />
<PDU>
<ReleaseResponse>
<Reason Value="Normal" />
<InitiateResponse>
<NegotiatedDlmsVersionNumber Value="06" />
<ProposedConformance>
<ConformanceBit Name="Action" />
<ConformanceBit Name="SelectiveAccess" />
<ConformanceBit Name="Set" />
<ConformanceBit Name="Get" />
<ConformanceBit Name="MultipleReferences" />
<ConformanceBit Name="BlockTransferWithAction" />
<ConformanceBit Name="BlockTransferWithSetOrWrite" />
<ConformanceBit Name="BlockTransferWithGetOrRead" />
<ConformanceBit Name="GeneralProtection" />
</NegotiatedConformance>
<NegotiatedMaxPduSize Value="0400" />
<VaaName Value="0007" />
</InitiateResponse>
</ReleaseResponse>
</PDU>
</WRAPPER>
Client Disconnected.
Client Side:
TX: 15:50:04.612 00 01 00 10 00 01 00 1F 60 1D A1 09 06 07 60 85 74 05 08 01 01 BE 10 04 0E 01 00 00 00 06 5F 1F 04 00 40 1E 1D FF FF
RX: 15:50:04.647 00 01 00 01 00 10 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 40 1E 1D 04 00 00 07
TX: 15:50:04.652 00 01 00 10 00 01 00 0D C0 01 C1 00 01 00 00 2B 01 00 FF 02 00
RX: 15:51:04.668 7E A0 07 21 03 97 2B E1
TX: 15:51:04.677 00 01 00 10 00 01 00 17 62 15 80 01 00 BE 10 04 0E 01 00 00 00 06 5F 1F 04 00 40 1E 1D 04 00
RX: 15:51:04.684 00 01 00 01 00 10 00 17 63 11 80 01 00 BE 0F 04 0E 08 00 06 5F 1F 04 00 40 1E 1D 04 00 00 07
Regards,
Utkarsh
Hi,
Hi,
You can read Invocation counter adding command line parameter -v 0.0.43.1.1.255
There is updateFrameCounter method that handles this. Frame counter is an old name of Invocation counter.
BR,
Mikko