# Can't connect to controller

**URL:** <https://tech-community.robotics.abb.com/t/cant-connect-to-controller/3440>\
**Category:** Robot Controller\
**Created:** [March 11, 2010, 1:03pm UTC](https://tech-community.robotics.abb.com/t/cant-connect-to-controller/3440 "2010-03-11T13:03:01Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![erikjber](https://avatars.discourse-cdn.com/v4/letter/e/839c29/32.png) [@erikjber](https://tech-community.robotics.abb.com/u/erikjber)\
**Post date:** [March 11, 2010, 1:03pm UTC](https://tech-community.robotics.abb.com/t/cant-connect-to-controller/3440/1 "2010-03-11T13:03:01Z")

</div>

I’m running into a strange problem when moving my code from RobotStudio to an IRC5 controller.

The code essentially just opens a TCP/IP socket and listens for incoming connections.

This code runs fine in RobotStudio, and apparently it runs fine on the IRC5 too - at least that’s what the FlexPendant is telling me.

The problem is that I can’t connect to the IRC5 controller via the network.

I know the controller is on the network, since RobotStudio shows the status of the controller, I can grant/revoke write permissions, browse files and so on.

It would be much appreciated if anyone could point me in the right direction.

EDIT:  
Apparently there is a socket timeout a few minutes after the program starts. This happens regardless if I try to connect to the port or not.

---

<div class="post-metadata">

**Author:** ![Henrik\_Berlin](https://dub1.discourse-cdn.com/flex005/user_avatar/tech-community.robotics.abb.com/henrik_berlin/32/1011_2.png) [@Henrik\_Berlin](https://tech-community.robotics.abb.com/u/Henrik_Berlin)\
**Post date:** [March 15, 2010, 9:50am UTC](https://tech-community.robotics.abb.com/t/cant-connect-to-controller/3440/2 "2010-03-15T09:50:23Z")

</div>

Does the IRC5 system have the RobotWare Option “PC-Interface”? If not, you can connect to the controller via the service port.

---

<div class="post-metadata">

**Author:** ![erikjber](https://avatars.discourse-cdn.com/v4/letter/e/839c29/32.png) [@erikjber](https://tech-community.robotics.abb.com/u/erikjber)\
**Post date:** [March 15, 2010, 10:39am UTC](https://tech-community.robotics.abb.com/t/cant-connect-to-controller/3440/3 "2010-03-15T10:39:55Z")

</div>

Yes, it does.

I’ve tried connecting via the service port, same result.

---

<div class="post-metadata">

**Author:** ![Henrik\_Berlin](https://dub1.discourse-cdn.com/flex005/user_avatar/tech-community.robotics.abb.com/henrik_berlin/32/1011_2.png) [@Henrik\_Berlin](https://tech-community.robotics.abb.com/u/Henrik_Berlin)\
**Post date:** [March 15, 2010, 2:32pm UTC](https://tech-community.robotics.abb.com/t/cant-connect-to-controller/3440/4 "2010-03-15T14:32:49Z")

</div>

Moved to RobotWare forum the problem is related to socket communication and not specifically RobotStudio.

---

<div class="post-metadata">

**Author:** ![erikjber](https://avatars.discourse-cdn.com/v4/letter/e/839c29/32.png) [@erikjber](https://tech-community.robotics.abb.com/u/erikjber)\
**Post date:** [March 16, 2010, 10:25am UTC](https://tech-community.robotics.abb.com/t/cant-connect-to-controller/3440/5 "2010-03-16T10:25:47Z")

</div>

Ok, I found the problem, I was listening on the wrong address.  
127.0.0.1 works under simulation - it even accepts connections from remote hosts,  
but on the controller the actual ip address of the interface must be used, otherwise the SocketBind call will time out.
