I try to read Kamstrup meter with a public association. Its works fine with GXDLMSDirector.
I try to read meter with python client example: Gurux.DLMS.Client.Example.python\main.py with parameters: -S COM3 -a None -s 1 -c 16 -C None -d DLMS -g 1.1.0.2.0.255:1
I have changed GXDLMSHdlcSetup.py to meet req. about max payload size:
FYI: I have been trying a lot, before posting in this Forum. The values that I set in GXDLMSHdlcSetup.py (1010) was also set to 1010 in GXDLMSLimits.py. But still got the error. I am in doubt wheather I have understood you last post correctly? Should values also be changed in GXDLMSLimits. Or should values be restored to the default limits? (128) I tried both with no luck.
Hi,
Hi,
What is your meter model? Can you post a trace from this? I did try this as you described and it worked.
BR,
Mikko
Hi,
Hi,
I try on OMNIPOWER v2 direct 3 phase meter.
gurux_dlms version: 1.0.93
gurux_net version: 1.0.17
gurux_serial version: 1.0.14
Authentication: Authentication.NONE
ClientAddress: 0x10
ServerAddress: 0x1
Standard: Standard.DLMS
TX: 09:17:24 7E A0 07 03 21 93 0F 01 7E
RX: 09:17:25 7E A0 20 21 03 73 73 98 81 80 14 05 02 00 80 06 02 00 80 07 04 00 00 00 01 08 04 00 00 00 01 CE 6A 7E
TX: 09:17:25 7E A0 2B 03 21 10 FB AF E6 E6 00 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 00 1E 1D FF FF C5 E4 7E
RX: 09:17:25 7E A0 39 21 03 30 2E D2 E6 E7 00 61 82 00 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 10 1D 03 EF 00 07 44 36 7E
TX: 09:17:25 7E A0 19 03 21 32 6F D8 E6 E6 00 C0 01 C1 00 0F 00 00 28 00 00 FF 02 00 91 53 7E
Invalid HDLC Frame: 0x42 Expected: 0x52
Data send failed. Try to resend 1/3
RX: 09:17:30 7E A8 89 21 03 42 07 B9 E6 E7 00 C4 02 C1 00 00 00 00 01 00 82 00 88 01 2B 02 04 12 00 0F 11 02 09 06 00 00 28 00 00 FF 02 02 01 0B 02 03 0F 01 16 01 00 02 03 0F 02 16 01 00 02 03 0F 03 16 01 00 02 03 0F 04 16 01 00 02 03 0F 05 16 01 00 02 03 0F 06 16 01 00 02 03 0F 07 16 00 00 02 03 0F 08 16 01 00 02 03 0F 09 16 01 00 02 03 0F 0A 16 01 00 02 03 0F 0B 16 01 00 01 06 02 02 0F 01 16 00 02 02 0F 02 16 00 02 EC 3F 7E 7E A0 07 21 03 51 11 42 7E
Traceback (most recent call last):
File "C:\Users\jno\Documents\Python scripts\Gurux.DLMS.Python-master\Gurux.DLMS.Client.Example.python\main.py", line 98, in main
reader.getAssociationView()
File "C:\Users\jno\Documents\Python scripts\Gurux.DLMS.Python-master\Gurux.DLMS.Client.Example.python\GXDLMSReader.py", line 496, in getAssociationView
self.client.parseObjects(reply.data, True, False)
File "C:\Users\jno\AppData\Local\Programs\Python\Python38-32\lib\site-packages\gurux_dlms\GXDLMSClient.py", line 725, in parseObjects
raise Exception("Invalid parameter.")
Exception: Invalid parameter.
DisconnectRequest
TX: 09:17:30 7E A0 07 03 21 53 03 C7 7E
RX: 09:17:30 7E A0 07 21 03 73 01 40 7E
Hi,
Hi,
Now I know the reason. You need to change values to GXDLMSLimits. That will do the trick.
BR,
Mikko
Hi,
Hi,
Now I have changed GXDLMSHdlcSetup.py to:
self.maximumInfoLengthReceive = 128
self.maximumInfoLengthTransmit = 128
and GXDLMSLimits lokks like this:
class GXDLMSLimits:
DEFAULT_MAX_INFO_TX = 128
DEFAULT_MAX_INFO_RX = 128
DEFAULT_WINDOWS_SIZE_TX = 1
DEFAULT_WINDOWS_SIZE_RX = 1
But I still see the same error
TX: 10:02:19 7E A0 07 03 21 93 0F 01 7E
RX: 10:02:19 7E A0 20 21 03 73 73 98 81 80 14 05 02 00 80 06 02 00 80 07 04 00 00 00 01 08 04 00 00 00 01 CE 6A 7E
TX: 10:02:19 7E A0 2B 03 21 10 FB AF E6 E6 00 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 00 1E 1D FF FF C5 E4 7E
RX: 10:02:19 7E A0 39 21 03 30 2E D2 E6 E7 00 61 82 00 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 10 1D 03 EF 00 07 44 36 7E
TX: 10:02:19 7E A0 19 03 21 32 6F D8 E6 E6 00 C0 01 C1 00 0F 00 00 28 00 00 FF 02 00 91 53 7E
Invalid HDLC Frame: 0x42 Expected: 0x52
Data send failed. Try to resend 1/3
RX: 10:02:25 7E A8 89 21 03 42 07 B9 E6 E7 00 C4 02 C1 00 00 00 00 01 00 82 00 88 01 2B 02 04 12 00 0F 11 02 09 06 00 00 28 00 00 FF 02 02 01 0B 02 03 0F 01 16 01 00 02 03 0F 02 16 01 00 02 03 0F 03 16 01 00 02 03 0F 04 16 01 00 02 03 0F 05 16 01 00 02 03 0F 06 16 01 00 02 03 0F 07 16 00 00 02 03 0F 08 16 01 00 02 03 0F 09 16 01 00 02 03 0F 0A 16 01 00 02 03 0F 0B 16 01 00 01 06 02 02 0F 01 16 00 02 02 0F 02 16 00 02 EC 3F 7E 7E A0 07 21 03 51 11 42 7E
Traceback (most recent call last):
File "C:\Users\jno\Documents\Python scripts\Gurux.DLMS.Python-master\Gurux.DLMS.Client.Example.python\main.py", line 98, in main
reader.getAssociationView()
File "C:\Users\jno\Documents\Python scripts\Gurux.DLMS.Python-master\Gurux.DLMS.Client.Example.python\GXDLMSReader.py", line 496, in getAssociationView
self.client.parseObjects(reply.data, True, False)
File "C:\Users\jno\AppData\Local\Programs\Python\Python38-32\lib\site-packages\gurux_dlms\GXDLMSClient.py", line 725, in parseObjects
raise Exception("Invalid parameter.")
Exception: Invalid parameter.
DisconnectRequest
TX: 10:02:25 7E A0 07 03 21 53 03 C7 7E
RX: 10:02:25 7E A0 07 21 03 73 01 40 7E
FYI: I have been trying a lot
FYI: I have been trying a lot, before posting in this Forum. The values that I set in GXDLMSHdlcSetup.py (1010) was also set to 1010 in GXDLMSLimits.py. But still got the error. I am in doubt wheather I have understood you last post correctly? Should values also be changed in GXDLMSLimits. Or should values be restored to the default limits? (128) I tried both with no luck.
Hi,
Hi,
The best way is if you change this in the client side code like this:
client = GXDLMSSecureClient(True)
client.limits.maxInfoTX = 1010
client.limits.maxInfoRX = 1010
You don't usually need to do this. OMNIPOWER is a special case.
BR,
Mikko
Hi,
Hi,
This was much better :-)
Problem solved, thank you very much.