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. Unable To Connect As Server

Unable to connect as server

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 nishitha , 1 June, 2020
Forums
Gurux DLMS for Java

Hi i am.not able to connect as server using the functions you gave , can u please help, i need it urgently

Profile picture for user Kurumi

Kurumi

6 years ago

Hi nishitha,

Hi nishitha,

Can you describe the problems a little bit? DLMS is a very complex protocol and the reason might fail if one of the parameters is wrong.

BR,
Mikko

nishitha

6 years ago

hii,

hii,
i am getting the following as output. my gas meter is connected through optical probe on COM7
OUTPUT:
"C:\Program Files\Java\jdk1.8.0_202\bin\java.exe" "-javaagent:C:\Program Files\JetBrains\IntelliJ IDEA Community Edition 2019.1\lib\idea_rt.jar=65484:C:\Program Files\JetBrains\IntelliJ IDEA Community Edition 2019.1\bin" -Dfile.encoding=UTF-8 -classpath "C:\Program Files\Java\jdk1.8.0_202\jre\lib\charsets.jar;C:\Program Files\Java\jdk1.8.0_202\jre\lib\deploy.jar;C:\Program Files\Java\jdk1.8.0_202\jre\lib\ext\access-bridge-64.jar;C:\Program Files\Java\jdk1.8.0_202\jre\lib\ext\cldrdata.jar;C:\Program Files\Java\jdk1.8.0_202\jre\lib\ext\dnsns.jar;C:\Program Files\Java\jdk1.8.0_202\jre\lib\ext\jaccess.jar;C:\Program Files\Java\jdk1.8.0_202\jre\lib\ext\jfxrt.jar;C:\Program Files\Java\jdk1.8.0_202\jre\lib\ext\localedata.jar;C:\Program Files\Java\jdk1.8.0_202\jre\lib\ext\nashorn.jar;C:\Program Files\Java\jdk1.8.0_202\jre\lib\ext\sunec.jar;C:\Program Files\Java\jdk1.8.0_202\jre\lib\ext\sunjce_provider.jar;C:\Program Files\Java\jdk1.8.0_202\jre\lib\ext\sunmscapi.jar;C:\Program Files\Java\jdk1.8.0_202\jre\lib\ext\sunpkcs11.jar;C:\Program Files\Java\jdk1.8.0_202\jre\lib\ext\zipfs.jar;C:\Program Files\Java\jdk1.8.0_202\jre\lib\javaws.jar;C:\Program Files\Java\jdk1.8.0_202\jre\lib\jce.jar;C:\Program Files\Java\jdk1.8.0_202\jre\lib\jfr.jar;C:\Program Files\Java\jdk1.8.0_202\jre\lib\jfxswt.jar;C:\Program Files\Java\jdk1.8.0_202\jre\lib\jsse.jar;C:\Program Files\Java\jdk1.8.0_202\jre\lib\management-agent.jar;C:\Program Files\Java\jdk1.8.0_202\jre\lib\plugin.jar;C:\Program Files\Java\jdk1.8.0_202\jre\lib\resources.jar;C:\Program Files\Java\jdk1.8.0_202\jre\lib\rt.jar;C:\Users\H345719\Documents\gurux\gurux.dlms.java-master\gurux.dlms.server.example.java\target\classes;C:\Users\H345719\.m2\repository\org\gurux\gurux.net\1.0.19\gurux.net-1.0.19.jar;C:\Users\H345719\.m2\repository\org\gurux\gurux.common\1.0.15\gurux.common-1.0.15.jar;C:\Users\H345719\.m2\repository\org\gurux\gurux.serial\1.0.18\gurux.serial-1.0.18.jar;C:\Users\H345719\.m2\repository\org\gurux\gurux.dlms\4.0.12\gurux.dlms-4.0.12.jar" gurux.dlms.server.example.GuruxDlmsServerExample
Logical Name DLMS Server in serial port COM7
----------------------------------------------------------
Press Enter to close.

So, from here i understood that COM7 is successfully connected, but how can i connect meter and read or write some obis value to it. I am using Intellij IDEA 2019.1 version, can you please help me in reading / setting some obis value to meter
(cont.)there are some functions isTarget, onConnected, what parameters needs to be passed for these???? are these functions only used for connecting to meter????
Thanks,
Regards,
Nishitha.

Profile picture for user Kurumi

Kurumi

6 years ago

Hi Nishitha,

Hi Nishitha,

If you want to read your meter you need to use gurux.dlms.client.example.java.
This code is if you want to implement the meter.
I believe that this might help you.
https://www.gurux.fi/Gurux.DLMS

BR,
Mikko

nishitha

6 years ago

hiii Mikko,

hiii Mikko,
I want to make a simulator, which acts as a server,so i downloaded the server example in java from github, that example isn't working properly as i have mentioned above, it has isConnected, isTarget functions, what are the parameters to be passed to them, and how do i run the example and know the server is working fine, i am new to java so please help me.
This page(https://www.gurux.fi/Gurux.DLMS.Server) has all functions and i have seen the functions in server example also, but i am not able to send parameters to them. Please tell me how to know if meter is conected and how to send parameter and set any obis

Profile picture for user Kurumi

Kurumi

6 years ago

Hi,

Hi,

You need to read this to get started.

https://www.gurux.fi/Gurux.DLMS.Server

BR,
Mikko

nishitha

6 years ago

hi Mikko,

hi Mikko,
I have already gone through the page and i wanted to know what does isTarget and onConnected functions parameters are??

Profile picture for user Kurumi

Kurumi

6 years ago

Hi ,

Hi ,

onConnected is called to notify that client has connected. You don't need to do anything there.
isTarget is used to check is client address correct. If you return true, all client addresses are accepted.

BR,
Mikko

nishitha

6 years ago

hi Mikko,

hi Mikko,
what all arguments are required to run the server example now i am giving only java -jar gurux.dlms.server.example.java-0.0.1-SNAPSHOT.jar -S COM7 what are other parameters to be added inorder to run server example

Profile picture for user Kurumi

Kurumi

6 years ago

Hi,

Hi,

You can add -t Verbose to see received bytes. I just note that example is using old version from serial port. Update serial port to version 1.0.21.

<dependency>
<groupId>org.gurux</groupId>
<artifactId>gurux.serial</artifactId>
<version>1.0.21</version>
</dependency>

BR,
Mikko

nishitha

6 years ago

hi Mikko,

hi Mikko,
I have changed the version and ran the code with -t verbose argument, i didnot see any info. exchnage, is there any way to know that COM7 is opened ?

Profile picture for user Kurumi

Kurumi

6 years ago

Hi,

Hi,

I have a few questions.
1. Do you have two serial ports in your PC?
2. Have you connected them with zero modem cable?

BR,
Mikko

nishitha

6 years ago

hi,

hi,
I have only one serial port in my pc.
zero modem cable -no. I have only one port connected to meter

Profile picture for user Kurumi

Kurumi

6 years ago

Hi,

Hi,

If you want to make a server that uses serial port you need two serial ports and connect them with zero modem cable.

BR,
Mikko

nishitha

6 years ago

hi mikko,

hi mikko,
cant we use optical probe?? where optical probe connected to a client

Profile picture for user Kurumi

Kurumi

6 years ago

Hi,

Hi,

Yes, you can use optical probe.

BR,
Mikko

nishitha

6 years ago

hi mikko,

hi mikko,
that is what i am doing i am using optical probe on com7 connected to a gas meter, but am unable to get any values.

Profile picture for user Kurumi

Kurumi

6 years ago

Hi,

Hi,
As I told before if you want to read your meter you need to use gurux.dlms.client.example.java.
You don't create a server, you need a client to read your meter.

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