Before commenting read Forum rules
Don't comment the topic if you have a new question.
You can create a new topic selecting correct category from Gurux Forum and then create a new topic selecting "New Topic" from the top left.
Before commenting read Forum rules
Don't comment the topic if you have a new question.
You can create a new topic selecting correct category from Gurux Forum and then create a new topic selecting "New Topic" from the top left.
Hi everyone
I am new to here and new to DLMS protocol but thank you to create a such a nice open source library. It helps me to understand better.
I am a software developer and using your .net library and have 3 errors.
Firsly, my test device is Landis+Gyr E450 and its from Switzerland.
I am debugging with the following parameters: -r LN -c 16 -s 1 -Sp COM7
(I tried to give a password but do not what is the password so I have "-P HELLO" and change Authentication as LOW but not working.
PS: I am trying to readout via an opto-header which is connected between usb port (serial com7) and the device.
Here is my entire log
Read scalers and units from the device.
0.0.99.98.11.255
0.0.1.0.0.255 Ch. 0 Clock object #1 | 0.0.96.11.11.255 Ch. 0 Event code #12 | 0.0.96.129.0.255 Manufacturer specific
-------- Reading GXDLMSData 0.0.96.129.0.255 Manufacturer specific
Index: 1 Value: 0.0.96.129.0.255
Index: 2 Value: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
-------- Reading GXDLMSSapAssignment 0.0.41.0.0.255 Ch. 0 SAP Assignment
Index: 1 Value: 0.0.41.0.0.255
Index: 2 Value: [[1, LGZ1030736127594]]
-------- Reading GXDLMSData 0.0.96.11.11.255 Ch. 0 Event code #12
Index: 1 Value: 0.0.96.11.11.255
Index: 2 Value: 0
-------- Reading GXDLMSData 0.0.43.1.0.255 Ch. 0 Invocation counter #0
Index: 1 Value: 0.0.43.1.0.255
Index: 2 Value: 0
-------- Reading GXDLMSData 0.0.43.1.1.255 Ch. 0 Invocation counter #1
Index: 1 Value: 0.0.43.1.1.255
Index: 2 Value: 0
-------- Reading GXDLMSData 0.0.96.90.255.255 Ch. 0 Man. spec. abstract object
Index: 1 Value: 0.0.96.90.255.255
Index: 2 Value: 4D 31 42 44 33 36 31 33 51 44 57 35 33 6E 73 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
-------- Reading GXDLMSData 0.0.42.0.0.255 Ch. 0 COSEM Logical device name
Index: 1 Value: 0.0.42.0.0.255
Index: 2 Value: LGZ1030736127594
-------- Reading GXDLMSAssociationLogicalName 0.0.40.0.1.255 Ch. 0 Association #1
Index: 1 Value: 0.0.40.0.1.255
Error! GXDLMSAssociationLogicalName 0.0.40.0.1.255Index: 2 Das angegebene Argument liegt außerhalb des gültigen Wertebereichs.
Parametername: Invalid attribute Index.
System.ArgumentOutOfRangeException: Das angegebene Argument liegt außerhalb des gültigen Wertebereichs.
Parametername: Invalid attribute Index.
bei Gurux.DLMS.ManufacturerSettings.GXAttributeCollection.Find(Int32 index)
bei Gurux.DLMS.Objects.GXDLMSObject.GetAttribute(Int32 index, GXAttributeCollection attributes)
bei Gurux.DLMS.Objects.GXDLMSObject.SetAccess(Int32 index, AccessMode access)
bei Gurux.DLMS.Objects.GXDLMSAssociationLogicalName.UpdateAccessRights(GXDLMSObject obj, Object[] buff)
bei Gurux.DLMS.Objects.GXDLMSAssociationLogicalName.GetObject(GXDLMSSettings settings, Object[] item)
bei Gurux.DLMS.Objects.GXDLMSAssociationLogicalName.Gurux.DLMS.Objects.IGXDLMSBase.SetValue(GXDLMSSettings settings, ValueEventArgs e)
bei Gurux.DLMS.GXDLMSClient.UpdateValue(GXDLMSObject target, Int32 attributeIndex, Object value, List`1 columns)
bei Gurux.DLMS.GXDLMSClient.UpdateValue(GXDLMSObject target, Int32 attributeIndex, Object value)
bei Gurux.DLMS.Reader.GXDLMSReader.Read(GXDLMSObject it, Int32 attributeIndex) in C:\Users\erd\Development\Dlms\Tests\Gurux.DLMS.Net\Gurux.DLMS.Client.Example.Net\GXDLMSReader.cs:Zeile 866.
bei Gurux.DLMS.Reader.GXDLMSReader.GetReadOut() in C:\Users\erd\Development\Dlms\Tests\Gurux.DLMS.Net\Gurux.DLMS.Client.Example.Net\GXDLMSReader.cs:Zeile 644.
Index: 3 Value: 16, 1
Index: 4 Value: 2 16 756 5 8 1 LogicalName
Index: 5 Value: SelectiveAccess, Get, MultipleReferences, BlockTransferWithGetOrRead 1500 125 6 0 FF FF FF FF FF FF
Index: 6 Value: 2 16 756 5 8 2 None
Error! GXDLMSAssociationLogicalName 0.0.40.0.1.255Index: 7 Access Error : Device reports Read-Write denied.
Gurux.DLMS.GXDLMSException: Access Error : Device reports Read-Write denied.
bei Gurux.DLMS.Reader.GXDLMSReader.ReadDLMSPacket(Byte[] data, GXReplyData reply) in C:\Users\erd\Development\Dlms\Tests\Gurux.DLMS.Net\Gurux.DLMS.Client.Example.Net\GXDLMSReader.cs:Zeile 777.
bei Gurux.DLMS.Reader.GXDLMSReader.ReadDataBlock(Byte[] data, GXReplyData reply) in C:\Users\erd\Development\Dlms\Tests\Gurux.DLMS.Net\Gurux.DLMS.Client.Example.Net\GXDLMSReader.cs:Zeile 809.
bei Gurux.DLMS.Reader.GXDLMSReader.ReadDataBlock(Byte[][] data, GXReplyData reply) in C:\Users\erd\Development\Dlms\Tests\Gurux.DLMS.Net\Gurux.DLMS.Client.Example.Net\GXDLMSReader.cs:Zeile 795.
bei Gurux.DLMS.Reader.GXDLMSReader.Read(GXDLMSObject it, Int32 attributeIndex) in C:\Users\erd\Development\Dlms\Tests\Gurux.DLMS.Net\Gurux.DLMS.Client.Example.Net\GXDLMSReader.cs:Zeile 848.
bei Gurux.DLMS.Reader.GXDLMSReader.GetReadOut() in C:\Users\erd\Development\Dlms\Tests\Gurux.DLMS.Net\Gurux.DLMS.Client.Example.Net\GXDLMSReader.cs:Zeile 644.
Index: 8 Value: Associated
Index: 9 Value: 0.0.43.0.0.255
-------- Reading GXDLMSAssociationShortName 0.0.40.0.2.255 Ch. 0 Association #2
Index: 1 Value: 0.0.40.0.2.255
Index: 2 Value: [57104, 64512, 56968, 57240, 53976, 53840, 14400, 64768, 40648, 40784, 64000]
Error! GXDLMSAssociationShortName 0.0.40.0.2.255Index: 3 Der Wert für einen UInt16 war zu groß oder zu klein.
System.OverflowException: Der Wert für einen UInt16 war zu groß oder zu klein.
bei System.Convert.ToUInt16(Int16 value)
bei Gurux.DLMS.Objects.GXDLMSAssociationShortName.UpdateAccessRights(Object[] buff)
bei Gurux.DLMS.Objects.GXDLMSAssociationShortName.Gurux.DLMS.Objects.IGXDLMSBase.SetValue(GXDLMSSettings settings, ValueEventArgs e)
bei Gurux.DLMS.GXDLMSClient.UpdateValue(GXDLMSObject target, Int32 attributeIndex, Object value, List`1 columns)
bei Gurux.DLMS.GXDLMSClient.UpdateValue(GXDLMSObject target, Int32 attributeIndex, Object value)
bei Gurux.DLMS.Reader.GXDLMSReader.Read(GXDLMSObject it, Int32 attributeIndex) in C:\Users\erd\Development\Dlms\Tests\Gurux.DLMS.Net\Gurux.DLMS.Client.Example.Net\GXDLMSReader.cs:Zeile 866.
bei Gurux.DLMS.Reader.GXDLMSReader.GetReadOut() in C:\Users\erd\Development\Dlms\Tests\Gurux.DLMS.Net\Gurux.DLMS.Client.Example.Net\GXDLMSReader.cs:Zeile 644.
Index: 4 Value: 0.0.43.0.0.255
-------- Reading GXDLMSAssociationLogicalName 0.0.40.0.0.255 Ch. 0 Current association
Index: 1 Value: 0.0.40.0.0.255
Error! GXDLMSAssociationLogicalName 0.0.40.0.0.255Index: 2 Das angegebene Argument liegt außerhalb des gültigen Wertebereichs.
Parametername: Invalid attribute Index.
System.ArgumentOutOfRangeException: Das angegebene Argument liegt außerhalb des gültigen Wertebereichs.
Parametername: Invalid attribute Index.
bei Gurux.DLMS.ManufacturerSettings.GXAttributeCollection.Find(Int32 index)
bei Gurux.DLMS.Objects.GXDLMSObject.GetAttribute(Int32 index, GXAttributeCollection attributes)
bei Gurux.DLMS.Objects.GXDLMSObject.SetAccess(Int32 index, AccessMode access)
bei Gurux.DLMS.Objects.GXDLMSAssociationLogicalName.UpdateAccessRights(GXDLMSObject obj, Object[] buff)
bei Gurux.DLMS.Objects.GXDLMSAssociationLogicalName.GetObject(GXDLMSSettings settings, Object[] item)
bei Gurux.DLMS.Objects.GXDLMSAssociationLogicalName.Gurux.DLMS.Objects.IGXDLMSBase.SetValue(GXDLMSSettings settings, ValueEventArgs e)
bei Gurux.DLMS.GXDLMSClient.UpdateValue(GXDLMSObject target, Int32 attributeIndex, Object value, List`1 columns)
bei Gurux.DLMS.GXDLMSClient.UpdateValue(GXDLMSObject target, Int32 attributeIndex, Object value)
bei Gurux.DLMS.Reader.GXDLMSReader.Read(GXDLMSObject it, Int32 attributeIndex) in C:\Users\erd\Development\Dlms\Tests\Gurux.DLMS.Net\Gurux.DLMS.Client.Example.Net\GXDLMSReader.cs:Zeile 866.
bei Gurux.DLMS.Reader.GXDLMSReader.GetReadOut() in C:\Users\erd\Development\Dlms\Tests\Gurux.DLMS.Net\Gurux.DLMS.Client.Example.Net\GXDLMSReader.cs:Zeile 644.
Index: 3 Value: 16, 1
Index: 4 Value: 2 16 756 5 8 1 LogicalName
Index: 5 Value: SelectiveAccess, Get, MultipleReferences, BlockTransferWithGetOrRead 1500 125 6 0 FF FF FF FF FF FF
Index: 6 Value: 2 16 756 5 8 2 None
Error! GXDLMSAssociationLogicalName 0.0.40.0.0.255Index: 7 Access Error : Device reports Read-Write denied.
Gurux.DLMS.GXDLMSException: Access Error : Device reports Read-Write denied.
bei Gurux.DLMS.Reader.GXDLMSReader.ReadDLMSPacket(Byte[] data, GXReplyData reply) in C:\Users\erd\Development\Dlms\Tests\Gurux.DLMS.Net\Gurux.DLMS.Client.Example.Net\GXDLMSReader.cs:Zeile 777.
bei Gurux.DLMS.Reader.GXDLMSReader.ReadDataBlock(Byte[] data, GXReplyData reply) in C:\Users\erd\Development\Dlms\Tests\Gurux.DLMS.Net\Gurux.DLMS.Client.Example.Net\GXDLMSReader.cs:Zeile 809.
bei Gurux.DLMS.Reader.GXDLMSReader.ReadDataBlock(Byte[][] data, GXReplyData reply) in C:\Users\erd\Development\Dlms\Tests\Gurux.DLMS.Net\Gurux.DLMS.Client.Example.Net\GXDLMSReader.cs:Zeile 795.
bei Gurux.DLMS.Reader.GXDLMSReader.Read(GXDLMSObject it, Int32 attributeIndex) in C:\Users\erd\Development\Dlms\Tests\Gurux.DLMS.Net\Gurux.DLMS.Client.Example.Net\GXDLMSReader.cs:Zeile 848.
bei Gurux.DLMS.Reader.GXDLMSReader.GetReadOut() in C:\Users\erd\Development\Dlms\Tests\Gurux.DLMS.Net\Gurux.DLMS.Client.Example.Net\GXDLMSReader.cs:Zeile 644.
Index: 8 Value: Associated
Index: 9 Value: 0.0.43.0.0.255
-------- Reading GXDLMSProfileGeneric 0.0.99.98.11.255 Ch. 0 Event log #12
Entries: 1/11
Error! Failed to read first row: Access Error : Device reports scope of access violated.
Ended. Press any key to continue.
--------------------------------------------------------------------------------------
So my 3 errors:
1-
The error is something wrong with the attribute
Index: 1 Value: 0.0.40.0.1.255
Error! GXDLMSAssociationLogicalName 0.0.40.0.1.255Index: 2 Das angegebene Argument liegt außerhalb des gültigen Wertebereichs.
Parametername: Invalid attribute Index.
In GXDLMSObject.cs, GetAttrirubte method:
GXDLMSAttributeSettings att = this.Attributes.Find(index);
this code is not good because it directly throws an exception when an index cannot be found.
Values;
Index: 0xfffffffe
Attributes: https://i.imgur.com/Rgo2htC.png
As you will see, the attributes do not contain this index value. This code piece is executed 2 times, I dont know why but 2 times this error occured.
2- This error seems that it is related with Authentication. But I did not find any relation for it.
Error! GXDLMSAssociationLogicalName 0.0.40.0.1.255Index: 7 Access Error : Device reports Read-Write denied.
Gurux.DLMS.GXDLMSException: Access Error : Device reports Read-Write denied.
In the GXDLMS.cs class and in HandleGetResponse method. I have this error.
https://i.imgur.com/ePuID7E.png
As you can see in the log, LogicalName is same but Index 7 makes this problem..
3- The other error is about the type is not fit
in the GXDLMSAssociationShortName class and in the UpdateAccessRights method.
The parameter is an object array and its first item is 0xffffdf10 so its related with unsigned integer.. It can be converted with directly ToInt16
https://i.imgur.com/VPrx15e.png
I tried to solve those problems but until now I have not achived yet. I am ready to provide you extra information and I can let you to connect my computer remotely if its needed.
Finally, I tried to readout by using GXDLMSDirector application. It works somehow but I got the same error while I am reading AssociationShortName.
I right clicked the connected device and select "Read" from the menu. I have this error
https://i.imgur.com/g968jKX.png
This error is my first error (above).
And the other one, when I right click on AssociationShortName's item (0.0.40.0.2.255 Ch. 0 Association #2) and select "Read" item. I got may third error (above).
https://i.imgur.com/j8z9UOQ.png
PS: I have not see "my second" error with this app.
I hope you can help me to solve these problems. I am really trying a lot of things but until now, no solution.
Thank you
Ertan
Invalid Index, UInt16 large or small and Access Error Problems
Hi,
My answers are below:
1. Invalid attribute index.
Meter returns attribute index that is outside of boundaries given in DLMS standard. Only thing what we can do it throw an exception.
2. Read-Write denied
Your meter is not allowing to read this attribute. Usually it's not implemented. This is general error and it's OK. Don't read that.
3. The other error is about the type is not fit
Short name is always UInt16.
Can you Send your trace file to me by email? That issue number 3 is bothering me. We are reading L+G E450 meters, but that is not happening.
BR,
Mikko
Hi,
Hi,
I encounter similar issues with my L+G E570, when invoking "getAssociationView" and I'm unable to read objects through Java app.
Connection parameters are:
Authentication level: Low,
ClientAddress: 0x1,
ServerAddress: 0x1,
Interface type: WRAPPER,
Logical name referencing: true.
What's interesting, I can sucessfully read data through Gurux Director, using exactly the same connection parameters.
This is what happens as a result of getAssociationView:
Unknown object : 30302 0.0.199.134.0.255
Unknown object : 30300 0.0.199.125.0.255
Unknown object : 30303 0.0.199.135.0.255
Unknown object : 30036 0.0.199.133.0.255
Unknown object : 30234 0.0.239.153.131.255
Unknown object : 30031 0.0.199.29.0.255
Unknown object : 100 0.0.25.10.0.255
Unknown object : 30026 0.0.199.13.0.255
Unknown object : 30008 0.0.199.23.0.255
java.lang.IllegalArgumentException: Invalid attribute Index.
at gurux.dlms.manufacturersettings.GXAttributeCollection.find(GXAttributeCollection.java:55)
...
The same happens when I run sampleclient from Gurux github.
Is there anything I should change to be able to read objects properly?
Best regards,
Pietari
I have also noticed that I
I have also noticed that I get similar exception when geting association in public mode (client address = 16), but it doesn't shut the whole application down and I'm still able to read publicly accessible objects:
-------- Reading GXDLMSAssociationLogicalName 0.0.40.0.0.255 Ch. 0 Current association.
Index: 1, Value: 0.0.40.0.0.255
Index: 2 Invalid attribute Index.
java.lang.IllegalArgumentException: Invalid attribute Index.
Is it something that requires change in gurux library, or is it caused by incorrect configuration of the meter?
Best wishes,
Pietari
Hi,
Hi,
Your meter is using invalid attribute indexes that are not defined on the standard.
We have removed this check from C# and we'll remove this from java and python as well.
We'll release new versions today.
BR,
Mikko
Thank you Kurumi,
Thank you Kurumi,
I'll download it as soon as it is released and let you know the results.
Best wishes,
Pietari
Hi,
Hi,
The new version is released where this check is removed.
BR,
Mikko
Thank you for the new release
Thank you for the new release, Kurumi.
I'm able to read the meter now. However, sometimes I get getUInt16 error, which stops the whole process and throws exception:
java.lang.IllegalArgumentException: getUInt16
at gurux.dlms.GXByteBuffer.getUInt16(GXByteBuffer.java:379)
Is there anything I can change?
Best wishes,
Pietari