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 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 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 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

  • Tue, 06/09/2026 - 11:16
    gurux.dlms.java 4.0.95
  • Tue, 06/09/2026 - 10:03
    Gurux.DLMS.Python 1.0.199
  • Mon, 06/08/2026 - 13:39
    gurux.dlms.cpp 9.0.2606.0801
  • Mon, 06/01/2026 - 10:15
    gurux.dlms.cpp 9.0.2606.0101
  • Thu, 05/28/2026 - 16:06
    gurux.dlms.java 4.0.94

New forum topics

  • Error reading L&G Meter
  • Pass a TCP Client to GXNet
  • Australian EDMI Mk10D (Essential Energy area)
  • Strange mix of data notificiation vs get response
  • DLMS Connection
More
RSS feed
Privacy FAQ GXDN Issues Contact
Follow Gurux on Twitter Follow Gurux on Linkedin