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

6 years 9 months 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 8 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

  • Mon, 07/27/2026 - 12:37
    gurux.dlms.cpp 9.0.2607.2701
  • Thu, 07/23/2026 - 16:19
    gurux.dlms.java 4.0.96
  • Thu, 07/09/2026 - 14:34
    Gurux.DLMS.Python 1.0.201
  • Fri, 06/26/2026 - 16:32
    Gurux.Service 3.0.2606.2601
  • Wed, 06/24/2026 - 08:36
    Gurux.DLMS.Python 1.0.200

New forum topics

  • Service not known error on gprs communication
  • Help Needed: Interfacing Saral 100 Energy Meter with Microcontroller via RS232
  • Connecting Meter to Agent via serial
  • Reading block profile with Compact array
  • DLMS server - serving multiple similar datasets gathered from multiple meters across distinct logical addresses
More

Who's new

  • CTKNhZElptjSlOrpkXl
  • YCbccqfLGRMnlCWoJhXP
  • Malcolmactig
  • mhliang
  • Kevinmug
RSS feed
Privacy FAQ GXDN Issues Contact
Follow Gurux on Twitter Follow Gurux on Linkedin