Rgds Gurux,
I have downloaded gurux dlms for java. Actually, I am new in java programming.
Can you give me guidance step by step to compile gurux dlms for java until the software run ?
I have been succeeded to compile gurux.dlms.client.example.java using eclipse. Output of console window as like below
GuruxDlmsSample reads data from the DLMS/COSEM device.
GuruxDlmsSample -h [Meter IP Address] -p [Meter Port No] -c 16 -s 1 -r SN
-h host name or IP address.
-p port number or name (Example: 1000).
-S serial port.
-i IEC is a start protocol.
-a Authentication (None, Low, High).
-P Password for authentication.
-c Client address. (Default: 16)
-s Server address. (Default: 1)
-n Server address as serial number.
-r [sn, sn] Short name or Logican Name (default) referencing is used.
-w WRAPPER profile is used. HDLC is default.
-t [Error, Warning, Info, Verbose] Trace messages.
-g "0.0.1.0.0.255:1; 0.0.1.0.0.255:2" Get selected object(s) with given attribute index.
Example:
Read LG device using TCP/IP connection.
GuruxDlmsSample -r SN -c 16 -s 1 -h [Meter IP Address] -p [Meter Port No]
Read LG device using serial port connection.
GuruxDlmsSample -r SN -c 16 -s 1 -sp COM1 -i
Read Indian device using serial port connection.
GuruxDlmsSample -S COM1 -c 16 -s 1 -a Low -P [password]
What I should do next so the software can read a meter?
I have been succeeded to compile gurux.dlms.client.example.java using eclipse. Output of console window as like below
GuruxDlmsSample reads data from the DLMS/COSEM device.
GuruxDlmsSample -h [Meter IP Address] -p [Meter Port No] -c 16 -s 1 -r SN
-h host name or IP address.
-p port number or name (Example: 1000).
-S serial port.
-i IEC is a start protocol.
-a Authentication (None, Low, High).
-P Password for authentication.
-c Client address. (Default: 16)
-s Server address. (Default: 1)
-n Server address as serial number.
-r [sn, sn] Short name or Logican Name (default) referencing is used.
-w WRAPPER profile is used. HDLC is default.
-t [Error, Warning, Info, Verbose] Trace messages.
-g "0.0.1.0.0.255:1; 0.0.1.0.0.255:2" Get selected object(s) with given attribute index.
Example:
Read LG device using TCP/IP connection.
GuruxDlmsSample -r SN -c 16 -s 1 -h [Meter IP Address] -p [Meter Port No]
Read LG device using serial port connection.
GuruxDlmsSample -r SN -c 16 -s 1 -sp COM1 -i
Read Indian device using serial port connection.
GuruxDlmsSample -S COM1 -c 16 -s 1 -a Low -P [password]
What I should do next so the software can read a meter?
Thanks for the reply. Could you kindly help on the below questions:
1) Is the Gurux.Client code is a single threaded model OR can my Thread Application be able to connect multiple IP's at same time using this gurux.client
2) How do we differentiate the LOAD_SURVEY vs DAY_SURVEY vs BILLING_SURVEY? Is it only by input arguments it differs or we have to write seperate code for these SURVEYS?
You need to create own instance for each client. The reason for this is that data is not necessarily come in one packet. There is also connection depends settings. Example frame counters that are increased every time you send a message.
Profile generic data is handled in the same way. The content of the data is different.
Thanks. We are able to setup locally. But when we try to connect the working STATIC IP through our command line method there are no response. Its connecting with Authentication: None, ClientAddress etc, but there are no response further. Its in Hung state.
The command used is: java -jar gurux.client.sample.jar -h StaticIP -p port -r sn
Check that your IP address and port number are correct. Check also your firewall settings.
There is no difference are you connecting using the local or static IP address.
Hi Mikko, I could able to connect using GXDLMSDirector and could fetch data. PFA screen shot below.
But if i try the same using command line arguments, I am getting the below time out error message.
java -jar gurux.client.jar -h 117.231.125.245 -p 4059 -c 16 -s 1 -r sn
Authentication: None
ClientAddress: 0x10
ServerAddress: 0x1
Connection timed out: connect
If i compare the screen shot below, I need to feed values for the below fields. How do i that through the command arguments.
Start protocol: DLMS
Manufacturer: Indian Standard
Interface: WRAPPER
Media: Net
These are the mandate fields to fetch the data. Please provide your valuable thoughts.
while running the client application i got bellow response
can you please check this
Authentication: None
ClientAddress: 0x11
ServerAddress: 0x1
Standard: DLMS
Data send failed. Try to resend 1/3
java.lang.RuntimeException: Invalid connection.
Invalid connection.
at gurux.net.GXNet.send(GXNet.java:409)
at gurux.dlms.client.GXDLMSReader.readDLMSPacket(GXDLMSReader.java:272)
at gurux.dlms.client.GXDLMSReader.readDataBlock(GXDLMSReader.java:365)
at gurux.dlms.client.GXDLMSReader.readDataBlock(GXDLMSReader.java:351)
at gurux.dlms.client.GXDLMSReader.initializeConnection(GXDLMSReader.java:597)
at gurux.dlms.client.GXDLMSReader.readAll(GXDLMSReader.java:1014)
at gurux.dlms.client.sampleclient.main(sampleclient.java:146)
I am new to Gurux library for Android plateform , can you please guide where to start and how to create a basic demo. I have android studio installed and related package implemented but dont know what to do now. can i create client and server on mobile?
Please, add new questions to the end. Sometimes I don't notest them if they are added in the middle.
Connection refused is coming because you can't connect to the meter IP address. Make sure that your meter is using a static address and it's the correct one. Check your port. You are using two different ports here and the meter doesn't reply if it's wrong.
Step by Step to compile gurux DLMS for java
Hi,
You need to install Java and Mavan on your PC.
Check more info from here:
https://maven.apache.org/install.html
BR,
Mikko
Hi Mikko,
Hi Mikko,
Thanks for the reply. What should the IDE that you recommended to compile gurux DLMS java ?
Step by Step to compile gurux DLMS for java
Hi,
Eclipse or NetBeans.
BR,
Mikko
Next Step to compile
I have been succeeded to compile gurux.dlms.client.example.java using eclipse. Output of console window as like below
GuruxDlmsSample reads data from the DLMS/COSEM device.
GuruxDlmsSample -h [Meter IP Address] -p [Meter Port No] -c 16 -s 1 -r SN
-h host name or IP address.
-p port number or name (Example: 1000).
-S serial port.
-i IEC is a start protocol.
-a Authentication (None, Low, High).
-P Password for authentication.
-c Client address. (Default: 16)
-s Server address. (Default: 1)
-n Server address as serial number.
-r [sn, sn] Short name or Logican Name (default) referencing is used.
-w WRAPPER profile is used. HDLC is default.
-t [Error, Warning, Info, Verbose] Trace messages.
-g "0.0.1.0.0.255:1; 0.0.1.0.0.255:2" Get selected object(s) with given attribute index.
Example:
Read LG device using TCP/IP connection.
GuruxDlmsSample -r SN -c 16 -s 1 -h [Meter IP Address] -p [Meter Port No]
Read LG device using serial port connection.
GuruxDlmsSample -r SN -c 16 -s 1 -sp COM1 -i
Read Indian device using serial port connection.
GuruxDlmsSample -S COM1 -c 16 -s 1 -a Low -P [password]
What I should do next so the software can read a meter?
Next Step to compile
I have been succeeded to compile gurux.dlms.client.example.java using eclipse. Output of console window as like below
GuruxDlmsSample reads data from the DLMS/COSEM device.
GuruxDlmsSample -h [Meter IP Address] -p [Meter Port No] -c 16 -s 1 -r SN
-h host name or IP address.
-p port number or name (Example: 1000).
-S serial port.
-i IEC is a start protocol.
-a Authentication (None, Low, High).
-P Password for authentication.
-c Client address. (Default: 16)
-s Server address. (Default: 1)
-n Server address as serial number.
-r [sn, sn] Short name or Logican Name (default) referencing is used.
-w WRAPPER profile is used. HDLC is default.
-t [Error, Warning, Info, Verbose] Trace messages.
-g "0.0.1.0.0.255:1; 0.0.1.0.0.255:2" Get selected object(s) with given attribute index.
Example:
Read LG device using TCP/IP connection.
GuruxDlmsSample -r SN -c 16 -s 1 -h [Meter IP Address] -p [Meter Port No]
Read LG device using serial port connection.
GuruxDlmsSample -r SN -c 16 -s 1 -sp COM1 -i
Read Indian device using serial port connection.
GuruxDlmsSample -S COM1 -c 16 -s 1 -a Low -P [password]
What I should do next so the software can read a meter?
Next Step to compile
Hi,
Run app and give needed parameters.
java -jar gurux.dlms.client.example.java.jar -h IpaddressOfTheMeter -p port number -r sn or ln
BR,
Mikko
Hi Mikko,
Hi Mikko,
Thanks for the reply. Could you kindly help on the below questions:
1) Is the Gurux.Client code is a single threaded model OR can my Thread Application be able to connect multiple IP's at same time using this gurux.client
2) How do we differentiate the LOAD_SURVEY vs DAY_SURVEY vs BILLING_SURVEY? Is it only by input arguments it differs or we have to write seperate code for these SURVEYS?
Hi,
Hi,
You need to create own instance for each client. The reason for this is that data is not necessarily come in one packet. There is also connection depends settings. Example frame counters that are increased every time you send a message.
Profile generic data is handled in the same way. The content of the data is different.
BR,
Mikko
Hi Mikka,
Hi Mikka,
Thanks. We are able to setup locally. But when we try to connect the working STATIC IP through our command line method there are no response. Its connecting with Authentication: None, ClientAddress etc, but there are no response further. Its in Hung state.
The command used is: java -jar gurux.client.sample.jar -h StaticIP -p port -r sn
Hi,
Hi,
Check that your IP address and port number are correct. Check also your firewall settings.
There is no difference are you connecting using the local or static IP address.
BR,
Mikko
Hi Mikko, I could able to
Hi Mikko, I could able to connect using GXDLMSDirector and could fetch data. PFA screen shot below.
But if i try the same using command line arguments, I am getting the below time out error message.
java -jar gurux.client.jar -h 117.231.125.245 -p 4059 -c 16 -s 1 -r sn
Authentication: None
ClientAddress: 0x10
ServerAddress: 0x1
Connection timed out: connect
If i compare the screen shot below, I need to feed values for the below fields. How do i that through the command arguments.
Start protocol: DLMS
Manufacturer: Indian Standard
Interface: WRAPPER
Media: Net
These are the mandate fields to fetch the data. Please provide your valuable thoughts.
Hi,
Hi,
You command line string is like this:
java -jar gurux.client.jar -h 117.231.125.245 -p 4059 -c 16 -s 1 -w
BR,
Mikko
Hi,
Hi,
can you please tell me how to pass these parameter through eclipse ide,
how to add security to this.
Hi Kurumi,
Hi Kurumi,
while running the client application i got bellow response
can you please check this
Authentication: None
ClientAddress: 0x11
ServerAddress: 0x1
Standard: DLMS
Data send failed. Try to resend 1/3
java.lang.RuntimeException: Invalid connection.
Invalid connection.
at gurux.net.GXNet.send(GXNet.java:409)
at gurux.dlms.client.GXDLMSReader.readDLMSPacket(GXDLMSReader.java:272)
at gurux.dlms.client.GXDLMSReader.readDataBlock(GXDLMSReader.java:365)
at gurux.dlms.client.GXDLMSReader.readDataBlock(GXDLMSReader.java:351)
at gurux.dlms.client.GXDLMSReader.initializeConnection(GXDLMSReader.java:597)
at gurux.dlms.client.GXDLMSReader.readAll(GXDLMSReader.java:1014)
at gurux.dlms.client.sampleclient.main(sampleclient.java:146)
I am new to Gurux library for
I am new to Gurux library for Android plateform , can you please guide where to start and how to create a basic demo. I have android studio installed and related package implemented but dont know what to do now. can i create client and server on mobile?
Hi Akash,
Hi Akash,
Please, create a new topic if you have a new question. I'm not receiving notifications from old topics like this. I accidentally notest your question.
There is only a client-side implemented for Android.
BR,
Mikko
Hi
Hi
I tried to connect client through client java jar as below:
IP : Client IP (meter IP)
port: mteter port
But error is throwing.
Kindly provide procedure to debug as what is blocking what and how to unblock.
Thank you in advance.
C:\Apache-Tomcat-8.5.32\webapps>java -jar gurux.dlms.client.example.java-0.0.1-SNAPSHOT.jar -h 10.254.0.207 -p 2028 -r ln
Connect using network connection gurux.net.GXNet@19469ea2
Authentication: None
ClientAddress: 0x10
ServerAddress: 0x1
Connection refused: connect
C:\Apache-Tomcat-8.5.32\webapps>java -jar gurux.dlms.client.example.java-0.0.1-SNAPSHOT.jar -h 10.254.0.207 -p 55341 -r ln
Connect using network connection gurux.net.GXNet@19469ea2
Authentication: None
ClientAddress: 0x10
ServerAddress: 0x1
Connection refused: connect
C:\Apache-Tomcat-8.5.32\webapps>java -jar gurux.dlms.client.example.java-0.0.1-SNAPSHOT.jar -h 10.254.0.207 -p 55341 -r ln
Connect using network connection gurux.net.GXNet@19469ea2
Authentication: None
ClientAddress: 0x10
ServerAddress: 0x1
Connection timed out: connect
Hi,
Hi,
Please, add new questions to the end. Sometimes I don't notest them if they are added in the middle.
Connection refused is coming because you can't connect to the meter IP address. Make sure that your meter is using a static address and it's the correct one. Check your port. You are using two different ports here and the meter doesn't reply if it's wrong.
BR,
Mikko