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. Reading From Meter Using TCP

Reading from meter using TCP

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 hejmaniok , 14 March, 2017
Forums
Gurux DLMS for Java

Hello everyone,

Sorry for my ignorance but I am new to Gurux. I am trying to read from meter using Gurux component over TCP. I have all required information to do so. I used Gurux Director to successfully read the data, but I have really hard time reproducing what Gurux Director does into Java code. I am trying to combine gurux.dlms.java with gurux.net.java but I cannot find the connection.
Can anyone could point me to the right direction?

Thanks

Bartosz

Profile picture for user Kurumi

Kurumi

9 years 2 months ago

Reading from meter using TCP

Hi,

You should try with gurux.dlms.client.example.java.
It's small example that reads all objects from the meter.
You can get that from github.

BR,

Mikko

hejmaniok

9 years 2 months ago

In reply to Reading from meter using TCP by Kurumi

Thanks for your reply Mikko.

Thanks for your reply Mikko. I managed to move forward with it but now I am stuck while adding meter serial number. I have this line of code "dlms.setServerAddress(GXDLMSClient.getServerAddress(32360809));" but this gives me an error "java.lang.StringIndexOutOfBoundsException: String index out of range: -5". Do you know what am I doing wrong?

Profile picture for user Kurumi

Kurumi

9 years 2 months ago

Reading from meter using TCP

Hi,

I did try this and it worked. Do you know what JVM you are using?

BR,

Mikko

hejmaniok

9 years 2 months ago

Hi Mikko,

Hi Mikko,

I am using below on OS X El Capitan:

java version "1.8.0_121"
Java(TM) SE Runtime Environment (build 1.8.0_121-b13)
Java HotSpot(TM) 64-Bit Server VM (build 25.121-b13, mixed mode)

Profile picture for user Kurumi

Kurumi

9 years 2 months ago

GXDLMSClient.getServerAddress

Hi,

What version you are using from gurux.dlms.java?
Make sure that version is 1.4.11

BR,

Mikko

hejmaniok

9 years 2 months ago

Mikko,

Mikko,

That was it! I had old version in my pom.xml file. Thank you so much!!!

Profile picture for user Kurumi

Kurumi

9 years 2 months ago

GXDLMSClient.getServerAddress

Hi,

Good to hear that problem is solved.
We just updated new version 2.0.1. Start with that.

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

Who's new

  • Tuanhgg
  • Adel
  • charnon
  • Paddles
  • Miguel Ángel
RSS feed
Privacy FAQ GXDN Issues Contact
Follow Gurux on Twitter Follow Gurux on Linkedin