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.
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
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
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.
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
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 ?
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.
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
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.
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
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
Hi,
Hi,
You need to read this to get started.
https://www.gurux.fi/Gurux.DLMS.Server
BR,
Mikko
hi Mikko,
hi Mikko,
I have already gone through the page and i wanted to know what does isTarget and onConnected functions parameters are??
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
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
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
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 ?
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
hi,
hi,
I have only one serial port in my pc.
zero modem cable -no. I have only one port connected to meter
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
hi mikko,
hi mikko,
cant we use optical probe?? where optical probe connected to a client
Hi,
Hi,
Yes, you can use optical probe.
BR,
Mikko
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.
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