For information on the latest version, please have a look at GL013301.
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, the following error message may appear:
[Error] Connection refused by host
[Info] Failed to connect to 192.168.137.100: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.
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.