Python VNC Client Cannot Connect to ARsim – Always Lands on AR000.exe

Hello,
I’m trying to automate HMI tests against an ARsim simulation by connecting to the VNC Server object configured in my Automation Studio project.
I can connect with UltraVNC Viewer without problems, but every Python VNC client hangs or times out.

My setup:
Automation Studio version: 4.12.6.106

ETH interface in Simulation: 127.0.0.1 / 255.255.255.0

VNC Server object: VNC Server 3 → Authentication ON, Port: 5930 (also tried others in 5900–5931), UltraVNC Viewer: connects without issues

Python VNC libraries tested: asyncvnc2, regulad/pyvnc, vncdotool

All Python clients behave the same:
They succeed on TCP connect, but then hang waiting for the RFB banner or time out.

No matter which port I configure in the AS VNC Server object, the listener always ends up being the internal ARsim display-forwarding VNC endpoint, not the AS VNC server I configured.

Example (netstat):

netstat -ano | findstr :5930
  TCP    0.0.0.0:5930           0.0.0.0:0              LISTENING       28912
  TCP    127.0.0.1:5930         127.0.0.1:54547        ESTABLISHED     28912
  TCP    127.0.0.1:5930         127.0.0.1:54599        ESTABLISHED     28912
  TCP    127.0.0.1:54547        127.0.0.1:5930         ESTABLISHED     36160
  TCP    127.0.0.1:54599        127.0.0.1:5930         ESTABLISHED     38812

C:\~>tasklist /fi "PID eq 28912"

Image Name                     PID Session Name        Session#    Mem Usage
========================= ======== ================ =========== ============
AR000.exe                    28912 Console                    1    227 560 K

C:\~>tasklist /fi "PID eq 36160"

Image Name                     PID Session Name        Session#    Mem Usage
========================= ======== ================ =========== ============
python.exe                   36160 Console                    1     47 960 K

C:\~>tasklist /fi "PID eq 38812"

Image Name                     PID Session Name        Session#    Mem Usage
========================= ======== ================ =========== ============
vncviewer.exe                38812 Console                    1     23 940 K
  1. How can I expose the actual VNC Server object from my Automation Studio project when running in Simulation mode?

  2. How do I make ARsim bind the VNC Server object to the configured ETH simulation IP, rather than routing everything to AR000.exe’s internal VNC server?

  3. Does ARsim fully support the Automation Studio VNC Server object during simulation, or is it only intended to work on real hardware?

  4. Is there a recommended or documented way to make the VNC Server object reachable as a standard RFB VNC server (with the normal “RFB 003.x” handshake) when using ARsim?

I’m happy to provide project files or more logs if needed.

Thanks in advance,

Johan.

Hi,

I’m not sure if I got your question / issue right, but from my understanding it’s correct that the VNC client connection is “routed” to the ArSim process AR000.exe

The VNC server is a B&R system object “living inside” the AR000.exe process, and the connection to it is just the TCP socket opened by AR000.exe on localhost, where the RFB data is lead trough to the socket endpoint inside the PLC simulation program, where the VNC protocol and the frame buffer is executed in Automation Runtime (as it’s the same on real hardware).

So if you were expecting an external VNC server process running in Windows when using ARSim, then I can confirm that such an external process doesn’t exist and that the VNC server functionality is directly computed inside AR000.exe.

Right now, unfortunately I don’t know why it doesn’t work with Python libraries, but as it works with a external VNC client, for me it looks more like an protocol issue (VNC on B&R uses RFB3.3 as I know) or because of the AR VNC server does not support some features like client side scaling, dynamic color depth change or so, but the Python library wants to use such a feature.

Best regards.