For information on the latest version, please have a look at 1.33.5.
7.1 Connection Refused (API Link Error)
This issue occurs when the API fails to establish a connection with the robot controller or emulator.
A. Error Case
During initialization, open_connection returns false and the client does not connect to the controller address and port (for example 192.168.137.100, port 12345).
B. Root Cause Analysis
This error typically indicates one of the following:
The DART Platform or Emulator is not running (in virtual mode).
The target IP address or port is incorrect.
A firewall or VPN is blocking the connection.
The controller accepts at most 10 TCP clients at a time, including the teach pendant. Connect the PC to the controller directly or through a routed network; connections through NAT or port forwarding are rejected during authentication.
C. Solution
Start the DART Platform or Emulator before running your API program.
Verify the robot IP configuration in your code:
Drfl.open_connection("192.168.137.100");
Confirm network access with ping or netcat:
ping 192.168.137.100 nc -zv 192.168.137.100 12345
If running on a company network, check internal firewall settings.
Disable any active VPNs that may interfere with local network connections.
Ensure no other applications are using the same port (12345/TCP).
Restart your PC and robot controller/emulator to clear any stale network states.