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.
Hello,
I try to read profile generic on SL7000 using ANSI C.
I read using "com_read" for "1.1.98.128.4.255", and attributeOrdinal value is 2. the return code is: 258 Invalid parameter
here it's the code:
cosem_init(&profile1.base, DLMS_OBJECT_TYPE_PROFILE_GENERIC, "1.1.98.128.4.255");
ret = com_read(&profile1.base, 2);
when I capture the packet from the meter to the controller, and decode using XML translator, it says:
7E A0 89 03 00 02 00 23 52 82 74 E6 E7 00 C4 01 81 00 01 01 02 06 02 03 09 06 01 01 1F 07 00 FF 12 00 04 02 02 0F FD 16 21 02 03 09 06 01 01 33 07 00 FF 12 00 04 02 02 0F FD 16 21 02 03 09 06 01 01 47 07 00 FF 12 00 00 02 02 0F FD 16 21 02 03 09 06 01 01 20 07 00 FF 12 07 E3 02 02 0F FF 16 23 02 03 09 06 01 01 34 07 00 FF 12 00 0A 02 02 0F FF 16 23 02 03 09 06 01 01 48 07 00 FF 12 00 09 02 02 0F FF 16 23 31 F5 7E
<HDLC len="136">
<TargetAddress Value="1" />
<SourceAddress Value="16401" />
<!--I frame.-->
<FrameType Value="52" />
<PDU>
<GetResponse>
<GetResponseNormal>
<!--Priority: HIGH ServiceClass: UN_CONFIRMED invokeID: 1-->
<InvokeIdAndPriority Value="129" />
<Result>
<Data>
<Array Qty="1">
<Structure Qty="6">
<Structure Qty="3">
<!--1.1.31.7.0.255-->
<OctetString Value="01011F0700FF" />
<UInt16 Value="4" />
<Structure Qty="2">
<Int8 Value="-3" />
<Enum Value="33" />
</Structure>
</Structure>
<Structure Qty="3">
<!--1.1.51.7.0.255-->
<OctetString Value="0101330700FF" />
<UInt16 Value="4" />
<Structure Qty="2">
<Int8 Value="-3" />
<Enum Value="33" />
</Structure>
</Structure>
<Structure Qty="3">
<!--1.1.71.7.0.255-->
<OctetString Value="0101470700FF" />
<UInt16 Value="0" />
<Structure Qty="2">
<Int8 Value="-3" />
<Enum Value="33" />
</Structure>
</Structure>
<Structure Qty="3">
<!--1.1.32.7.0.255-->
<OctetString Value="0101200700FF" />
<UInt16 Value="2019" />
<Structure Qty="2">
<Int8 Value="-1" />
<Enum Value="35" />
</Structure>
</Structure>
<Structure Qty="3">
<!--1.1.52.7.0.255-->
<OctetString Value="0101340700FF" />
<UInt16 Value="10" />
<Structure Qty="2">
<Int8 Value="-1" />
<Enum Value="35" />
</Structure>
</Structure>
<Structure Qty="3">
<!--1.1.72.7.0.255-->
<OctetString Value="0101480700FF" />
<UInt16 Value="9" />
<Structure Qty="2">
<Int8 Value="-1" />
<Enum Value="35" />
</Structure>
</Structure>
</Structure>
</Array>
</Data>
</Result>
</GetResponseNormal>
</GetResponse>
</PDU>
</HDLC>
my question is, why the com_read return 258 Invalid parameter?
when I try to read same OBIS Code, but different attributeOrdinal, 1 and 3, it's return 0 (OK).
or it's need another way to read the attributeOrdinal 2?
Best Regards,
Feryan
Hi Feryan,
Hi Feryan,
The reason is the structure of the data. SL7000 is an old meter and it's not supporting DLMS very well with profile generics.
We'll check this and improve the library to handle SL7000.
BR,
Mikko
Hi,
Hi,
There is a new version in GitHub where this is improved. Let me know if you have any problems.
BR,
Mikko