Skip to main content
Home
for DLMS smart meters
Open source solutions for DLMS smart metering

Main navigation

  • Home
  • Products
  • About us
  • Open Source
  • Community
  • Forum
  • Downloads
User account menu
  • Log in

Breadcrumb

  1. Home
  2. Forums
  3. Com_read: Return 258 Invalid Parameter

com_read: return 258 Invalid parameter

Forum Rules

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.

By fery_rz , 23 October, 2019
Forums
General discussion

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

Profile picture for user Kurumi

Kurumi

7 years ago

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

Profile picture for user Kurumi

Kurumi

6 years 11 months ago

Hi,

Hi,
There is a new version in GitHub where this is improved. Let me know if you have any problems.

BR,
Mikko

  • Create new account
  • Reset your password

Hire Us!

Latest Releases

  • Tue, 10/13/2026 - 12:00
    gurux.dlms.java 4.0.97
  • Tue, 09/22/2026 - 14:02
    Gurux.DLMS.Net 9.0.2609.2201
  • Mon, 09/21/2026 - 10:18
    Gurux.DLMS.Net 9.0.2609.2101
  • Wed, 08/26/2026 - 09:04
    Gurux.DLMS.Python 1.0.203
  • Mon, 08/17/2026 - 11:28
    Gurux.DLMS.Python 1.0.202

New forum topics

  • Association refresh related issue
  • Need RJ45 pin configuration for Saral 300 and Saral 305 Secure meters
  • Query Regarding Class 63 Status Mapping Support in Gurux DLMS Python
  • Inhemeter
  • DLMS Server - Profile Generic - can't add too many items to profile generic capture object - how to set maximum profile entries
More

Who's new

  • Anand Raj
  • amir.jradi
  • JOEBID€N123
  • yogibear
  • Eric@li
RSS feed
Privacy FAQ GXDN Issues Contact
Follow Gurux on Twitter Follow Gurux on Linkedin