# RTDE Connection

**URL:** <https://forum.universal-robots.com/t/rtde-connection/41562>\
**Category:** Robot Communication\
**Created:** [October 22, 2025, 8:53am UTC](https://forum.universal-robots.com/t/rtde-connection/41562 "2025-10-22T08:53:15Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![stevennn](https://avatars.discourse-cdn.com/v4/letter/s/c57346/32.png) [@stevennn](https://forum.universal-robots.com/u/stevennn)\
**Post date:** [October 22, 2025, 8:53am UTC](https://forum.universal-robots.com/t/rtde-connection/41562/1 "2025-10-22T08:53:15Z")

</div>

Hello everyone,

I’m currently doing my internship, and I created a pick-and-place program for testing using RTDE Connection with the `ur-rtde` library.  
The program runs fine at first, but after running for a long time (sometimes after many minutes), it randomly throws an error. Sometimes it completes successfully with no issues, but other times it fails with this error message:

RTDEReceiveInterface boost system Exception: End of file

i already use an wired ethernet cable and switch.

My current idea is to **connect** before i need some information from RTDEReceive like getactualTCP() and **disconnect** the `RTDEReceiveInterface`afterwards.

Is this a reasonable approach? Are there better patterns to avoid this RTDE errors ?

Does anyone know what might be causing this error? Thank you 🙂

---

<div class="post-metadata">

**Author:** ![raul.oliveira](https://avatars.discourse-cdn.com/v4/letter/r/8797f3/32.png) [@raul.oliveira](https://forum.universal-robots.com/u/raul.oliveira)\
**Post date:** [October 23, 2025, 7:47pm UTC](https://forum.universal-robots.com/t/rtde-connection/41562/2 "2025-10-23T19:47:32Z")

</div>

Hello

I’m having exactly the same error message issue. I’m using RTDE to read the status of a Digital Input. The program starts working fine, but after a few seconds, this message appears in the Terminal and the program stops working.

The full error message is:  
RTDEReceiveInterface boost system Exception: (asio.misc:2) End of file [asio.misc:2 at C:\Local\boost\include\boost-1\_85\boost/asio/detail/win\_iocp\_socket\_recv\_op.hpp:89:5 in function ‘void \_\_cdecl boost::asio::detail::win\_iocp\_socket\_recv\_op\<class boost::asio::mutable\_buffers\_1,class \<lambda\_a02243a1da368a9ee5e01ff4be82f2bd\>,class boost::asio::any\_io\_executor\>::do\_complete(void \*,class boost::asio::detail::win\_iocp\_operation \*,const class boost::system::error\_code &,unsigned \_\_int64)’]

---

<div class="post-metadata">

**Author:** ![stevennn](https://avatars.discourse-cdn.com/v4/letter/s/c57346/32.png) [@stevennn](https://forum.universal-robots.com/u/stevennn)\
**Post date:** [October 24, 2025, 7:25am UTC](https://forum.universal-robots.com/t/rtde-connection/41562/3 "2025-10-24T07:25:06Z")

</div>

Hi,  
I’ve found a potential solution, but I’m still testing it to confirm whether it really works.

For context, I’m using a program for testing purposes, and originally it included a `time.sleep(1 hour)` delay. After that i need to get actual Joint position, and sometimes it gets error. I replaced that with a `while` loop that frequently calls `rtde_receive` to receive information.

[Connection to Robot keeps breaking unexpectedly (#102) · Issues · SDU Robotics / ur\_rtde · GitLab](https://gitlab.com/sdurobotics/ur_rtde/-/issues/102)  
From the reference I found, it was suggested to use a wired connection,

> [@RTDE times out after 10s](https://forum.universal-robots.com/t/rtde-times-out-after-10s/22784/2):
>
> Receive has to be called frequently, otherwise input buffers overflow. UR should be more explicit about that in the API documentation. Thanks for reporting.

And from this reference i found, the buffer can overflow if you don’t continuously retrieve data.

So, my approach is to call `getActualTCP()` and `getActualQ()` frequently, as those are the only pieces of information I need. So far, it’s been working, but I’m still in the testing phase to make sure it’s stable.

---

<div class="post-metadata">

**Author:** ![raul.oliveira](https://avatars.discourse-cdn.com/v4/letter/r/8797f3/32.png) [@raul.oliveira](https://forum.universal-robots.com/u/raul.oliveira)\
**Post date:** [October 24, 2025, 11:38am UTC](https://forum.universal-robots.com/t/rtde-connection/41562/4 "2025-10-24T11:38:06Z")

</div>

Hello

Using the GitHub link you shared, I followed the tips from the people there and managed to get the Robot working the way I want. I still get that error, but when the connection drops, it’s quickly reestablished. I’ll try to find ways to avoid the connection drops, but for now, I can use it this way.

Thank you very much!

---

<div class="post-metadata">

**Author:** ![gabriel.iancu](https://avatars.discourse-cdn.com/v4/letter/g/b5ac83/32.png) [@gabriel.iancu](https://forum.universal-robots.com/u/gabriel.iancu)\
**Post date:** [October 27, 2025, 7:03am UTC](https://forum.universal-robots.com/t/rtde-connection/41562/5 "2025-10-27T07:03:36Z")

</div>

I had the same problem last year working on a project trying to use RTdE and i couldn’t make it consistent so I changed to Modbus 🙂

---

<div class="post-metadata">

**Author:** ![stevennn](https://avatars.discourse-cdn.com/v4/letter/s/c57346/32.png) [@stevennn](https://forum.universal-robots.com/u/stevennn)\
**Post date:** [November 19, 2025, 10:17am UTC](https://forum.universal-robots.com/t/rtde-connection/41562/6 "2025-11-19T10:17:32Z")

</div>

Hey,

After a some testing, I have an update. I found that frequently calling the RTDE receive without using it solved the problem. In my case, for example, I only use the actual TCP position and the actual joint position. So I just called the two of them frequently. This made the rtde\_receive connection stable.

Thank you all for the help and discussion ! 🙂
