We’re using a RUT956 device to send modbus data via HTTP protocol. We’ve made the necessary setup using the Data to Server on RMS.
On the sever side, there’s a custom application, reading the posted data; so far so good, with the only problem being the data being duplicated, i.e. we’re receiving the same data again and again, regardless of the changes made in the data source, as if exactly the same packet is being sent each time.
Only when the router is being reset, we get a new data, which is then again duplicated as long as router is working, so the only way to receive new data on the server side is to reset the router!
What may be wrong here? We’ve also tested the Hercules program on the server side, with no success. I suspect if the client (i.e. the router or the RMS) is awaiting for a response/acknowledge, and as we don’t sent anything from the server, it keeps on sending the same packet.
Do we need to send any acknowledgement so the router sends the new data or is there any other problem?
Could you please provide screenshots of your Modbus Client and Data to Server configuration windows?
It’s possible that the polling period for requesting data from the Modbus server (slave) is set to a shorter interval than the period for sending data to the HTTP server. For example, if the router is reading data from the Modbus device every 30 seconds but only sending data to the server every 60 seconds, this could result in repeated transmission of the same data.
Another possibility is that there are multiple Modbus requests configured for the same registers, leading to identical data being read and sent repeatedly.
Thanks for your prompt response, yes I’ll try to send screenshots of our Modbus client and Data to Server configuration, and we’ll test the points mentioned by you.
But could you please confirm that we don’t need to send any response/acknowledgments to the client(s) once a posted message is received on the server?
We’ve changed the two intervals according to your explanation but still no luck. Following images show our Modbus client and Data to Server configuration:
Also following image shows that the router is correctly reading the data from the PLC, but when it comes to sending the data to the server, an old value is used, so that we always get the duplicate data, and just after resetting the router, again a new value shows up in the packet.
Thank you for the update and the provided details.
In your current setup:
The Modbus Client is configured to request data from the Modbus server (slave) every 10 seconds.
The Data to Server period is set to 60 seconds.
To clarify, when data is sent to the server, it includes the results of six requests (data collected over six 10-second intervals). This can cause the server to repeatedly receive the same “old” value if the Modbus data hasn’t changed during those intervals.
To address this, you should align the intervals for both Modbus Client and Data to Server configurations. For instance, setting both periods to 30 seconds should ensure data reading and sending are synchronized, preventing duplicate data from being transmitted.
Please adjust these settings and let me know if the issue persists. If you have further questions or need additional assistance, feel free to reach out.
Thanks for your reply, yeah you’re right, we had also tested setting both these intervals to the same value, but result is the same. So we think it may be something beyond the intervals, as we’re steadily receiving the same data packet for a very long time (even several hours), and just after resetting the router, we get a new packet.
Do you have any idea what else can cause this strange behavior of the packets?
We wonder whether we need to do anything on the server. Is there anyway to view the posted data on Teltonika server? I think it’s called RMS, how can we use it? We just want to ensure that we’re doing everything correctly on our server, so maybe a quick test on RMS would help us to compare the results, how can we setup RMS, so that we see the posted packets on it?
Over the weekend we’ve made several tests and changed many parameters (for instance setting both intervals to the same value) but the problem still persists, so now we’re almost convinced that it has nothing to do with intervals.
Also we set the data format to both JSON and custom, but always get the same packet at each interval, as if Send to Data only reads the Modbus client once and doesn’t get updated anymore, even the date/time and timestamp are always the same in the sent packets, and the only way to have different data, is to reset the router!
How likely can there be a hardware failure or is there any other issue that we may have overlooked?
Apart from that, we’ve added the device to the RMS and tried to check the data packets there, but there seems to be no way to view the HTTP packets on RMS, is there any way to check the HTTP packets on RMS to compare them with the packets on our own server?
We’ve also tested Hercules to receive data on server, but again see duplicate data. Do we need to send any response/acknowledgement to the client once we receive the data on server so that client starts sending the new data?
Do you have any idea about this strange behavior? Not only that, we’re not sure how the intervals are working, for instance while the HTTP send interval is set to 1 seconds, we actually receive the messages every 10 or 11 seconds on the server, and when the interval is set to 10, we get messages every 20 seconds, as if there’s a hidden 10 seconds gap in between (although it’s not the main problem at the moment)
Based on the information provided, it is very unlikely that the issue is related to hardware. The behavior you’re experiencing aligns more closely with the way the client-server communication protocol works.
Yes, you need to send an acknowledgment to the client (from your server). The client typically waits for this acknowledgment to ensure the data was successfully received before sending the next data packet. Without this acknowledgment, the client may continue to resend the same data, resulting in duplicates.
Thanks for your reply, yes we think also the client is expecting an ACK, before sending the next packet. But the question is what kind of ACK should we exactly send? What format of acknowledge is exactly the client awaiting?
We’ve opened the port 2020 on our server firewall (it’s running windows server), and the HTTP packets are being sent to that port, i.e. the IP set on the Data to Server is as follows:
SERVER_IP:2020
An HTTP listener is running on the server, watching for the messages on port 2020 (we’ve tested everything with Hercules as well, but exactly the same result). What kind of acknowledge should we sent to the client? Does it have any format? And should the acknowledge be sent to the same IP having sent the message? I mean we get IP of the client, and send the ACK directly to that?
Do you have any sample application showing how the acknowledge should be sent? I mean it’s format and structure as I’ve not found anything about it on your website or the wikis.
Is there also any way to disable the acknowledge on routers, so that it just sends the up-to-date packets without expecting an ACK for the previous message?
We’re currently using TCP protocol which probably expects ACK from server, can RUT956 use UDP which doesn’t need ACK?
I’ve been trying to send some kind of acknowledgement (something like this: {“status” : “success”, “message” : “Data received”}) to the router (client) from server, once a packet is received, but it seems that the router IP is not reachable at all, should any settings be activated on router to receive HTTP post messages? And how exactly should the acknowledgement look like?
For data to server service to mark the data as sent it is expecting to receive any HTTP response code from the server. To adhere to standards, it is best to return HTTP 200 response. This way the data will be marked as sent in the internal Modbus database, and you should not receive old data that was already sent before.
If it still does not work, then I’ll send you a form to fill out to reach out to us privately for further troubleshooting.
Thanks for your response, yes I’ve tried to send HTTP response to the same IP having sent the message (i.e. the router), and also tried to have a 200 response code, but no luck. The problem is that the router IP is not reachable at all, I’ve even tested some online HTTP packet senders to send a HTTP response with 200 code, but I get timeout or “connection with the remote server couldn’t be established”, probably meaning that the router cannot receive any HTTP message, although I’ve received a message from it a few milliseconds ago.
Actually I think the router (RUT956 in this case) just sends the HTTP packet to the server, but cannot receive any HTTP packet, so I cannot send the acknowledge, that may be why it keeps on sending the same message again and again.
I’ll be grateful for any further assistance.
It would be nice if you can send the form so I fill to get further support.