1

Wialon IPS TCP Server

Topic: Wialon IPS TCP Server

Good evening, I am currently developing a software in .Net (c #) that will act as a TCP server to receive the information sent by a wialon repeater.

This repeater is sending me the messages with the Wialon IPS v1.1 protocol, but I have a problem handling the connections, at the moment as a test I only have 4 GPS included in the repeater, but my application is receiving more than 4 connections even though my data receiving mechanism is monitoring when a connection is no longer transferring data.

I would like to know if someone can support me by having an example of a TCP server receiving data from a WIALON repeater, my program is multi-threaded, that is I am opening a connection for each computer trying to connect to my TCP server, I don't know if that is correct or if I only need to open a single TCP connection, it would be helpful if someone can guide me through this process.

2

Wialon IPS TCP Server

(edited by yavi 17/06/2021 08:43:19)

Re: Wialon IPS TCP Server

jrivera Hello
In general Wialon IPS protocol was developed for tracking devices. It means that every device opens the connection and works with it.
It's not very suitable for retranslation.
If device opens new connection it must send login packet. Otherwise server can't recognize this device and can't work  with data from this device.

If device  opens new connection the previous one must be broken by server (it shouldn't be 2 alive connection for 1 unit).
If connection is still alive you can send data in the same connection (for the same device, of course) without new login packet.

In our servers the timeout is usually 300 seconds. But it's not strict rules. You can change it on your server. Timeout means that we break the connection if there is no any data or ping packet  in the connection with device. To send data once again device should open new connection.



If you don't have to use exactly IPS protocol, we suggest you to use Wialon Retranslator protocol. This protocol can use one connection to send data for many devices because it was developed for working between servers.

Viktor Yarovenko
Business Analyst
Wialon
3

Wialon IPS TCP Server

Re: Wialon IPS TCP Server

yavi wrote:

jrivera Hello
In general Wialon IPS protocol was developed for tracking devices. It means that every device opens the connection and works with it.
It's not very suitable for retranslation.
If device opens new connection it must send login packet. Otherwise server can't recognize this device and can't work  with data from this device.

If device  opens new connection the previous one must be broken by server (it shouldn't be 2 alive connection for 1 unit).
If connection is still alive you can send data in the same connection (for the same device, of course) without new login packet.

In our servers the timeout is usually 300 seconds. But it's not strict rules. You can change it on your server. Timeout means that we break the connection if there is no any data or ping packet  in the connection with device. To send data once again device should open new connection.



If you don't have to use exactly IPS protocol, we suggest you to use Wialon Retranslator protocol. This protocol can use one connection to send data for many devices because it was developed for working between servers.


First of all, thank you very much for the answer and you have resolved several doubts, even so I have some questions and they are the following:
1. From what I understand, you tell me that if after 3 minutes there is no new information, I can break the connection of the device?
2. Are the 3 minutes you mention a rule for you? , that is, if that time is reached and the device does not have new information to transmit or has not received the ping from the server, does the device close the connection?
3.In the case of the Wialon Retranslator protocol, if I activate a repeater, does it send me the additional parameters of the device? and also send me the calculated parameters of the same?
4.Gurtam has an example of a program on github or elsewhere that decodes a packet (including parameters) from the Wialon retranslator protocol?

An apology if I asked many questions but I am really very interested in this topic since it is vital for the company where I work, we have about 2500 devices with Gurtam (Wialon) and I need the relay of messages of at least half of them.

Regards, Jonathan Rivera Díaz

4

Wialon IPS TCP Server

(edited by yavi 17/06/2021 10:29:49)

Re: Wialon IPS TCP Server

jrivera wrote:

1. From what I understand, you tell me that if after 3 minutes there is no new information, I can break the connection of the device?

300 seconds = 5 minutes (60 seconds*5). You don't have to break it. It's just an example of realization in Wialon according to our experience. It' doesn't influence to your server.
If you'll receive the data from Wialon servers only --  our servers (retranslators from wialon) usually send necessary data and break the connection.

jrivera wrote:

2. Are the 3 minutes you mention a rule for you? , that is, if that time is reached and the device does not have new information to transmit or has not received the ping from the server, does the device close the connection?

Wialon Retranalstor can transmit both parameters from the devices + calculated values of Wialon sensors.
It's en axample ho Wialon works with TCP connections. You make your own server. You can break or keep it.

jrivera wrote:

3.In the case of the Wialon Retranslator protocol, if I activate a repeater, does it send me the additional parameters of the device? and also send me the calculated parameters of the same?

Protocol can transmit any parameters. From Wialon you can transmit both paramters + wialon sensors value

jrivera wrote:

4.Gurtam has an example of a program on github or elsewhere that decodes a packet (including parameters) from the Wialon retranslator protocol?

At this time we don't have it. Our developers on hw@gurtam.com  can help (answer the exact questions, discuss parsing of real packets, etc)

Viktor Yarovenko
Business Analyst
Wialon