Telit Cinterion IoT Developer Community
Tools. TCP/UDP Client. UDP Server
Showcase, January 18, 2016 - 12:40pm, 7502 views
The TCP-UDP-Client is designed for testing a TCP or an UDP server. It implements a GUI for easy handling.
It is written in java so a java runtime environment must be installed. To start the program just execute the jar file either by double clicking on it or in a command window by typing:
java –jar TcpUdpClient.jar
If you want to send data to a server fill out the fields and press the start button. In the middle output field you can see the progress of the program.
First the used parameters will be printed.
After this the specified number of loops will be executed.
At the end you can see a short summary of the trial.
In every loop the program waits “Loop Delay” ms. Afterwards it tries to open on TCP socket, an Inputstream and an Outputstream to the specified server.
If this is done the given data will be sent after “Send delay” ms of waiting. Now the client waits “Response Timeout” ms to an answer from the server. Afterwards the Connection and streams will be closed and the next loop starts.
In every loop the program waits “Loop Delay” ms. Afterwards it puts the sending data in a Datagram packet, sends it to the specified server and the next loop starts.
Following parameters can be configured
- TCP/UDP: the protocol in which the data will be send
- IP Address: Enter here the Address of the server you want to test either the IP number (e.g. 184.108.40.206) ort he URL (e.g. www.testserver.com)
- Port: the port on which the server is listening
- Nr of Loops: number of loops
- Loop Delay: time to wait between every loop in milliseconds
- Send Delay: time to wait after opened the connection and sending the data (only in TCP ****)
- Response Timeout: time to wait for an answer from the server (only in TCP ****)
- Name of Log File: The name of the file to which the log output will be written. If no filename is entered the log will be suspended.
- Data: the data to send to the server
Enhanced UDP echoserver
This java program supports an enhanced echo feature.
To start it you just have to execute it in a shell "java -jar UdpDataServer1.02.jar"
At start-up the program will print out the local address and port. You have to use a free port of your system. Recommended is a port above 1024.
The default port is 6666, if you want to use another port you can start the program with an argument port. (without any keyword or minus).
java -jar UdpDataServer1.02.jar 12345
You can send a datagram which data content is a integer value to this server and the UdpDataServer will send back a udp package which data content is as many characters 'x' as the integer value of the received datagram.
In case of NON INTEGER values in the incoming datagram a default size of 2000 is used.
-JRE installed in your computer
This is a very interesting tool!
Thank you very much.
This will be a good tool to verify that the server works in the way we think :)
Communication and Mechatronics
Enkom Active Oy – www.enkom-active.fi
Upseerinkatu 3 A, 02600 Espoo, Finland
Mobile: +358 400 411368
Office: +358 10 204 0000
Fax: +358 10 204 0010
Client app opens but UDP Server does not.
What can be the reason?
I'd like to know if exist a tcp client/server socket library in order to communicate the EHS8 module with a server.