Hello, I want to read Logical address and Physical address from SNRM messages. When I use GXDLMSDirector and use Translator in it I see these addresses. But when I use GXDLMSTranslator I don't see this data. I want to see these addresses just like in GXDLMSDirector in GXDLMSTranslator. Perhaps there is some solution?
Message: 7E A0 13 02 21 05 93 FA 66 81 80 06 05 01 90 06 01 90 55 BF 7E
GXDLMSDirector -> Translator -> result:
BlockCipher key: 00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F
Authentication Key:D0 D1 D2 D3 D4 D5 D6 D7 D8 D9 DA DB DC DD DE DF
<HDLC len="12" >
<!-- Logical address:1, Physical address:16 -->
<TargetAddress Value="90" />
<SourceAddress Value="2" />
<!-- SNRM frame. -->
<FrameType Value="93" />
<PDU>
<Snrm>
<MaxInfoTX Value="144" />
<MaxInfoRX Value="144" />
</Snrm>
</PDU>
</HDLC>
My code using GXDLMSTranslator:
from gurux_dlms import GXByteBuffer, GXDLMSTranslator, TranslatorOutputType
def reading_address():
buff = GXByteBuffer()
buff.setHexString("7E A0 13 02 21 05 93 FA 66 81 80 06 05 01 90 06 01 90 55 BF 7E")
t = GXDLMSTranslator(TranslatorOutputType.SIMPLE_XML)
t.comments = True
print(t.messageToXml(buff))
if __name__ == '__main__':
reading_address()
result:
<HDLC len="12" >
<TargetAddress Value="90" />
<SourceAddress Value="2" />
<!--SNRM frame.-->
<FrameType Value="93" />
<PDU>
<Snrm>
<MaxInfoTX Value="144" />
<MaxInfoRX Value="144" />
</Snrm></PDU>
</HDLC>
Hi, Logical and physical…
Hi,
Logical and physical addresses are not shown in Python at the moment. The reason is that no one of our clients has asked it. It's not in the roadmap at the moment and I can't give time when it's added.
BR,
Mikko
Hi,, Get the latest version…
Hi,,
Get the latest version from GitHub. This is added to the python version as well.
BR,
Mikko