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. Optical Port

Optical port

By labasvakaras , 1 June, 2023
Forums
Gurux.DLMS

Hello, i am trying to read data through optical port, but i have few questions:

1. Does meters always responds with all OBIS they have, when you write /?!\n\r.
2. Is it possible to read only one parameter instead of all?

I have two meters, both of them are responding everything they have instantly, when I write /?!\n\r

I am testing HDLCWithModeE.

Profile picture for user Kurumi

Kurumi

3 years 1 month ago

Hi, When you send /?!\n\r…

Hi,

When you send /?!\n\r the meter is using IEC 62056-21 Mode A (readout). In readout mode the meter returns some of the register values, but not all.

https://www.gurux.fi/DLMSCOSEMFAQ

If you want to read only one value you need to use IEC 62056-21 Mode C or DLMS.

With DLMS you can access the meter better, but it's not as easy as IEC 62056-21 Mode A.

If you want only to get some data from the meter it's the easiest if you get the readout and then parse needed the data. The bad side is that you can't write anything for the meter, for example, update the clock.

BR,
Mikko

labasvakaras

3 years 1 month ago

Tried as you said: on first…

Tried as you said:

on first iteration everything is fine.

I am sending /?!\n\r, I get:

2F 43 4C 45 35 5C 57 30 30 31 36 0D 0A

then communication starts with DLMS protocol. After i close socket:

[Debug ] TX: 7E A0 11 03 05 76 C4 7D E6 E6 00 62 03 80 01 00 BD 9B 7E
[Debug ] RX: 7E A0 11 05 03 96 C3 18 E6 E7 00 63 03 80 01 00 2C 0F 7E

[Debug ] TX: 7E A0 07 03 05 53 50 83 7E
[Debug ] RX: 7E A0 20 05 03 73 29 F8 81 80 14 05 02 01 00 06 02 01 00 07 04 00 00 00 01 08 04 00 00 00 01 69 6D 7E

I try to initiate again (with or without sending /?!\n\r), but i get:

7E A0 20 05 03 73 29 F8 81 80 14 05 02 01

is this normal DLMS payload?

Profile picture for user Kurumi

Kurumi

3 years 1 month ago

Hi, That looks like part of…

Hi,

That looks like part of the DLMS frame.

Some meters expect that you wait for a while before you can establish the connection again. Try to wait e.g. one minute and re-establish the connection.

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
RSS feed
Privacy FAQ GXDN Issues Contact
Follow Gurux on Twitter Follow Gurux on Linkedin