I have been doing more tests with the library, just for more information...Has it maybe to do with that it follows the Italian standard?
I tried different tests with plots that you gave as an example in some forum posts and the comments do come out with the plot information, but in my case it does not show it to me
DLMS is using symmetric ciphering and I believe that your client system tile is not correct.
It must be 8 bytes long and the same that is used when the frame is generated.
This was my question but due to password recovery problems I couldn't write it myself so a colleague wrote it for me, I'll solve it now.
I also tried it with that and it didn't work. I have been able to "solve" it, I think there may be a problem in the library for the Italian version, specifically by changing two functions I have been able to get it to show me the data.
Then in GXByteBuffer.py,
def toHex(self, addSpace=True, index=0, count=None):
if count is None:
count = len(self) - index
return self.hex(self._data, addSpace, index, count)
It told me that sel._data was not a bytearray. I changed with this:
def toHex(self, addSpace=True, index=0, count=None, option=None):
bytearrayHex = bytearray(self)
if count is None:
count = len(self) - index
return GXByteBuffer.hex(bytearrayHex, addSpace, index, count)
After these changes I have managed to get the same parameters in the gurux director
<PDU>
<!--
UNI/TS system title:
Manufacturer: ALC
Serial number: 030500003805-->
<GeneralGloCiphering>
<SystemTitle Value="8305053800000503" />
<CipheredService Value="30000002A5A808A0B002E28B42E7292546AA24198E067FD66C4F3C5F61BFBD1703B37853F70D6213E70240C775712406D34A6C891534903B" />
</GeneralGloCiphering>
</PDU>
I am not an expert in python and less in dlms but at least that way I have managed to get the information out of me, I don't know if this will be the correct way
Thank you for this amazing library and your help, it helps me a lot
I have been doing more tests…
I have been doing more tests with the library, just for more information...Has it maybe to do with that it follows the Italian standard?
I tried different tests with plots that you gave as an example in some forum posts and the comments do come out with the plot information, but in my case it does not show it to me
Thank you
Hi, DLMS is using symmetric…
Hi,
DLMS is using symmetric ciphering and I believe that your client system tile is not correct.
It must be 8 bytes long and the same that is used when the frame is generated.
t.systemTitle = "ABCDFG".encode()
Check that first.
BR,
Mikko
Thanks for your answer. This…
Thanks for your answer.
This was my question but due to password recovery problems I couldn't write it myself so a colleague wrote it for me, I'll solve it now.
I also tried it with that and it didn't work. I have been able to "solve" it, I think there may be a problem in the library for the Italian version, specifically by changing two functions I have been able to get it to show me the data.
In this functión in _GXCommon.py
def decryptManufacturer(cls, value):
tmp = (value >> 8 | value << 8)
c = str(((tmp & 0x1f) + 0x40))
tmp = (tmp >> 5)
c1 = str(((tmp & 0x1f) + 0x40))
tmp = (tmp >> 5)
c2 = str(((tmp & 0x1f) + 0x40))
return str(c2, c1, c)
The str() function only takes one string argument, but three arguments are being passed in the last line.
I change with this.
def decryptManufacturer(cls, value):
tmp = (value >> 8 | value << 8)
c = ((tmp & 0x1f) + 0x40)
tmp = (tmp >> 5)
c1 = ((tmp & 0x1f) + 0x40)
tmp = (tmp >> 5)
c2 = ((tmp & 0x1f) + 0x40)
return "{}{}{}".format(chr(c2), chr(c1), chr(c))#Change
Then in GXByteBuffer.py,
def toHex(self, addSpace=True, index=0, count=None):
if count is None:
count = len(self) - index
return self.hex(self._data, addSpace, index, count)
It told me that sel._data was not a bytearray. I changed with this:
def toHex(self, addSpace=True, index=0, count=None, option=None):
bytearrayHex = bytearray(self)
if count is None:
count = len(self) - index
return GXByteBuffer.hex(bytearrayHex, addSpace, index, count)
After these changes I have managed to get the same parameters in the gurux director
<PDU>
<!--
UNI/TS system title:
Manufacturer: ALC
Serial number: 030500003805-->
<GeneralGloCiphering>
<SystemTitle Value="8305053800000503" />
<CipheredService Value="30000002A5A808A0B002E28B42E7292546AA24198E067FD66C4F3C5F61BFBD1703B37853F70D6213E70240C775712406D34A6C891534903B" />
</GeneralGloCiphering>
</PDU>
I am not an expert in python and less in dlms but at least that way I have managed to get the information out of me, I don't know if this will be the correct way
Thank you for this amazing library and your help, it helps me a lot
Hi, Thank you for this…
Hi,
Thank you for this information. I believe the decryptManufacturer is an issue and it's fixed for the next release.
toHex issue looks odd. I have one Italy meter on my table at the moment. I'll test this and get back to this issue later today.
BR,
Mikko