Author Topic: Graphics library and VNC server support  (Read 8082 times)

Offline tonko

  • Newbie
  • *
  • Posts: 3
    • View Profile
Graphics library and VNC server support
« on: June 13, 2011, 02:49:40 PM »
 I want to know if you have any plans to add VNC server functions to uTasker?
It will be very useful if you can connect to embedded LCD with touch screen.
Segger with Emwin graphics library has built-in VNC support.

   Thanks
« Last Edit: June 13, 2011, 03:00:16 PM by tonko »

Offline mhoneywill

  • Full Member
  • ***
  • Posts: 172
    • View Profile
Re: Graphics library and VNC server support
« Reply #1 on: June 14, 2011, 10:25:34 AM »
Interesting concept this might be of use http://virtuallab.tu-freiberg.de/p2p/p2p/vnc/ug/rfbcounter.html although the source seems to be long gone.

Another way to do this would be to use the graphics lib to create a memory map of the virtual screen, which it does anyway. so for a 256 x 64 monochrome screen this would be (256 x 64)/8 = 2048 bytes large. This could then be embedded as a BMP or possibly more efficient PNG or GIF in a web page which would take up two Ethernet packets uncompressed. You would just generate the BMP of the screen on the fly as required. This way a VNC client would not be needed.

Further investigation into the VNC protocol, seems to imply it is pixel based so very similar to the above see http://en.wikipedia.org/wiki/RFB_protocol and the protocol description here http://www.realvnc.com/docs/rfbproto.pdf

This also looks like an interesting link http://www.sics.se/~adam/uvnc/ an embedded VNC server for 8 bit devices developed by Adam Dunkels of UIP fame. This has now been incorporated into  Contiki here http://www.sics.se/contiki/download.html

Here is details of Seggers emwin VNC server http://www.segger.com/cms/vnc-support.html

Cheers

Martin
« Last Edit: June 15, 2011, 10:18:32 PM by mhoneywill »

Offline mark

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2974
    • View Profile
    • uTasker
Re: Graphics library and VNC server support
« Reply #2 on: June 15, 2011, 11:23:22 AM »
Martin / Tonko

It is possible to work with the library without having an LCD attached (it would probably try to write to the LCD but this could be removed so that only the virtual image remains).

As Martin points out, this virtual image could be displayed on a web page. This is in fact what the demo project already does (when LCD is active on a device with web server) - it will display the present display content on the TFT page of the web server. It works by converting the content of the display buffer (virtual display) into a bit map which is then displayed by the web browser. This is of course only a "snap-shot" at the time that the web page was refreshed but the basic concept is already fairly close - whether sent as web content or general server data content is probably not a big technical difference.

The bit map is in fact sent as 24 bit colour BMP so is not as fast as it could be for a monochrome image (this is for compatibility purposes since monochrome and colur images are send using the same technique but monochrome BMP - or other format - is not that different).

I am however wondering what the real advantage is of the technique since I have found that a simple web interface tends to be much easier to control and program than a display based interface. It is easy to make a powerful web based control interface since the browser supports various technologies and it is then not limited to a small screen size as the MMIs tend to be. Controlling a remote computer via the desk top makes good sense but I am wondering whether a simple embedded system would have any advantages doing something similar?

Regards

Mark

Offline mhoneywill

  • Full Member
  • ***
  • Posts: 172
    • View Profile
Re: Graphics library and VNC server support
« Reply #3 on: June 15, 2011, 11:53:56 AM »
Good points, Mark.

I did a bit of Googling around to point Tonko in areas to look at, and also to give info to others who might read the post.

The VNC approach does have a certain, novelty to it especially as it would support keyboard input. Would also provide a way of simulating Displays that the VC Simulator does not currently support.

I agree that a Web interface also has advantages. It would be good to allow for the code to gracefully handle there being no physical display avaliable. I'm looking at the display code in the next few weeks and will see how easy this is to do and report back.

Cheers

Martin
« Last Edit: June 15, 2011, 03:43:46 PM by mhoneywill »

Offline tonko

  • Newbie
  • *
  • Posts: 3
    • View Profile
Re: Graphics library and VNC server support
« Reply #4 on: June 15, 2011, 09:32:52 PM »
VNC Advantage:
I want to use TFT color display 320x240 or 640x480 with touch screen.
When I make user interface on Display, at the same time I have full web VNC access to my embedded application.
If I have 320x240 LCD then I can magnify pixels by 2 in VNCviewer and I will get biger picture and it is good enuf in most cases.

VNC embedded examples with source code:
http://www.laskater.com/projects/microVNCoverview.htm
http://www.sics.se/~adam/uvnc/



Offline mhoneywill

  • Full Member
  • ***
  • Posts: 172
    • View Profile
Re: Graphics library and VNC server support
« Reply #5 on: June 15, 2011, 10:17:07 PM »
Hi Tonko,

The laskater example is actually a VNC client, what I understand you want is a VNC server, so I think its best you look at the uvnc code which has now been rolled into Contiki as mentioned in my earlier post. Once unpacked look here "contiki-2.4\core\ctk" for the server code

Cheers

Martin
« Last Edit: June 15, 2011, 10:35:13 PM by mhoneywill »

Offline mhoneywill

  • Full Member
  • ***
  • Posts: 172
    • View Profile
Re: Graphics library and VNC server support
« Reply #6 on: February 27, 2019, 12:24:29 PM »
FYI was just re-reading this topic and realised old source was long gone but look here http://dunkels.com/adam/uvnc/

Source on Git hub https://github.com/contiki-os/contiki/releases
« Last Edit: February 27, 2019, 03:05:20 PM by mhoneywill »