Open ar0707 opened 3 months ago
Thank you for reporting and the debug log, I am sadly currently a bit short on time, but I will take a look at it. From a brief look, it seems like after the pixelformat request the server is simply closing the connection.
Do other VNC clients work with that server?
Thank you for taking the time. The UltraVNC Viewer is used for the connection. It works without any problems.
Could you try connecting using the following settings:
So I did investigate this a bit more today and the only explanation I could come up with, is that the server is not supporting the requested pixelformat.
From your log, after a successful handshake, the client is requesting the pixel format and then requesting a new frame (the first frame actually) at which point the server closes the connection.
What I find interesting is the pixel format offered by the server, which is 8;8;0;0;7;7;3;0;3;6
according to your log. This means the server offers 8 bpp und a color depth of 8 bit, true color is set to false and a max color value of 7.
This is a terrible format, the image must look really bad. My client is always requesting 32;32;0;1;255;255;255;16;8;0
but your server does not seem to like it.
Sadly there is not much I can do tbh, I would need a Wireshark capture to see how a successful connection looks like and how it differs.
UPDATE:
After doing some more testing, I found out that sending an unsupported pixel format does make many VNC server behave exactly this way.
So one simply needs to find out which pixel formats your PLC supports.
I tried your suggested settings and it seems to be working without any issues. Thank you for your help. When I have time, I will try to debug it myself.
Would it be possible for you to share a Wireshark capture of the working connection (using the settings with RAW encoding and no compression)?
It would help me a lot to debug the problem.
I will try it out soon.
I tried to run the example code, but the window remains black. Do you have any ideas what the problem could be?