Starting a new thread because i cannot answer in the previous topic:
https://gurux.fi/node/35252
Hello,
I'am trying to read multiple objects with 1 query via tcp/ip using python.
Running this code:
obj1 = GXDLMSRegister()
obj1.shortName = 39656
obj1.attributeIndex = 2
obj2 = GXDLMSRegister()
obj2.shortName = 39800
obj2.attributeIndex = 2
objects = [obj1, obj2]
packets = client.readList(objects)
for p in packets:
reply = send_and_receive(p)
client.getData(reply)
gives me an error:
packets = client.readList(objects)
File "C:\Python313\Lib\site-packages\gurux_dlms\GXDLMSClient.py", line 1255, in readList
raise ValueError(
"Meter doesn't support multiple objects reading with one request."
)
BUT when i connect to the reader using GURUXDLMS Director i get this:
Conformance:
Proposed:
Read, Write, UnconfirmedWrite, MultipleReferences, InformationReport, ParameterizedAccess
Negotiated:
Read, Write, MultipleReferences, ParameterizedAccess
So if i got MultipleReferences in Negotiated conformance i should be able to read multiple objects at once - right?
You asked me for hex trace so here it is:
21:28:20 DEBUG Sending SNRM
21:28:20 DEBUG Received UA: 7ea01e4103738e7f81801205018006013e07040000000108040000000107227e
21:28:20 DEBUG Translation:
<HDLC len="1D" >
<TargetAddress Value="20" />
<SourceAddress Value="1" />
<FrameType Value="73" />
<PDU>
<Ua>
<MaxInfoTX Value="128" />
<MaxInfoRX Value="62" />
<WindowSizeTX Value="1" />
<WindowSizeRX Value="1" />
</Ua></PDU>
</HDLC>
21:28:20 DEBUG Sending AARQ
21:28:20 DEBUG Received AARE: 7ea0374103302179e6e7006128a109060760857405080102a203020100a305a103020100be0f040d0800065f1f04001802200960fa000aa87e
21:28:20 DEBUG Translation:
<HDLC len="36" >
<TargetAddress Value="20" />
<SourceAddress Value="1" />
<FrameType Value="30" />
<PDU>
<AssociationResponse>
<ApplicationContextName Value="SN" />
<AssociationResult Value="00" />
<ResultSourceDiagnostic>
<ACSEServiceUser Value="00" />
</ResultSourceDiagnostic>
<InitiateResponse>
<NegotiatedDlmsVersionNumber Value="06" />
<NegotiatedConformance>
<ConformanceBit Name="Read" />
<ConformanceBit Name="Write" />
<ConformanceBit Name="MultipleReferences" />
<ConformanceBit Name="ParameterizedAccess" />
</NegotiatedConformance>
<NegotiatedMaxPduSize Value="0960" />
<VaaName Value="FA00" />
</InitiateResponse>
</AssociationResponse>
</PDU>
</HDLC>
Hi, I need the complete hex…
Hi,
I need the complete hex trace, including AARQ, to solve this.
BR,
Mikko
Hello, AARQ: 7E A0 44 03 41…
Hello,
AARQ:
7E A0 44 03 41 10 B3 E1 E6 E6 00 60 36 A1 09 06
07 60 85 74 05 08 01 02 8A 02 07 80 8B 07 60 85
74 05 08 02 01 AC 0A 80 08 30 30 30 30 30 30 30
30 BE 10 04 0E 01 00 00 00 06 5F 1F 04 00 1C 03
20 FF FF 0B 87 7E
Which translates to:
<HDLC len="43" >
<TargetAddress Value="1" />
<SourceAddress Value="20" />
<!-- AARQ frame. -->
<FrameType Value="10" />
<PDU>
<AssociationRequest>
<ApplicationContextName Value="SN" />
<SenderACSERequirements Value="1" />
<MechanismName Value="Low" />
<CallingAuthentication Value="3030303030303030" />
<InitiateRequest>
<ProposedDlmsVersionNumber Value="06" />
<ProposedConformance>
<ConformanceBit Name="Read" />
<ConformanceBit Name="Write" />
<ConformanceBit Name="UnconfirmedWrite" />
<ConformanceBit Name="MultipleReferences" />
<ConformanceBit Name="InformationReport" />
<ConformanceBit Name="ParameterizedAccess" />
SNRM:
7E A0 07 03 41 93 5A 64 7E
Which translates to:
<HDLC len="9" >
<TargetAddress Value="1" />
<SourceAddress Value="20" />
<FrameType Value="93" />
<Snrm>
</Snrm>
</HDLC>
Hi, Your objects is wrong…
Hi,
Your objects is wrong.
obj1 = GXDLMSRegister()
obj1.shortName = 39656
list_.append((obj1, 3))
BR,
Mikko