Author Topic: Updated Vnc Viewer For Sharp Roms  (Read 39699 times)

TimW

  • Sr. Member
  • ****
  • Posts: 296
    • View Profile
Updated Vnc Viewer For Sharp Roms
« on: March 08, 2006, 08:37:09 am »
I've been using keypebble but was getting frustrated at the lack of support for the newer encodings - so I went ahead and added them. I can't build for opie devices ATM so this release is for Sharp based ROMs only. Some features are a little experimental so this is not yet a full release.

You can get it here:
teakettle.ipk

The name-change (to teakettle) is temporary so you can keep keypebble installed alongside it just in case you have problems. Once I get it stable it'll become just a mod to keypebble. It appears as VNC Viewer2 on your Applications tab. If you do run keypebble alongside it, remember to turn off the new encodings in teakettle before opening up keypebble as the configuration file is shared and I believe keypebble will actually request some of the encodings it can't handle if they are enabled from teakettle.

If you could let me know how you get on and if there are any other features you want added, I'd be grateful.

From the README:

Additions to keypebble by Tim Wentford
======================================

1) Added ZRLE, zlib, hextile, CoRRE and RRE encoding support.

2) Added a "Fit remote desktop to local screen" scale method (set the
   scale factor to 0 to see it in action).

3) Modified the way that the refresh rate is used to more closely
   match the use documented in the rfb standard.

4) Added a "Request Refresh Now" and "Set Refresh Rate Slower/Faster"
   items to the corner menu (I like to slow the refresh rate down when
   I'm monitoring stuff, but to speed it back up when I'm controlling
   it).

5) Modified the scaling mechanism to avoid missing pixels when
   rectangles which aren't a multiple of the scale factor arrive (the
   screen still gets "fuzzy" when this happens but it looks better
   than the missing lines to me).

6) Added an experimental "Auto" mode to choose the preferred encoding
   automatically based on an approximate measure of how long a screen
   refresh would take.

7) Tried to improve the interactivity during a long refresh (I'm not
   sure if I've succeeded in this so I haven't done it throughout - if
   you want to experiment replace the call to start the timer in
   endRect with a direct call to doOneRect: if it works, let me know
   and I'll extend it to work better with hextile and ZRLE encodings
   (by using the timer between tiles as well as between rectangles)).

8) Added local cursor encoding. This is supposed to save on bandwidth
   by allowing the server to send updates to the cursor shape so that
   the remote machine can draw the cursor itself. A server can then
   take advantage of this by not sending updates every time the cursor
   moves. I haven't found much advantage in using this yet, and I
   don't really handle it properly since I choose not to draw the
   cursor at all - which is probably appropriate for a touch screen
   device).

9) Added resize encoding so that the remote device can handle screen
   size changes properly.

10) Some attempts at optimisation - though currently I've probably
    added more overhead than I've saved.

11) Added the SHARPROM #define so that it can be built more easily for
    standard Qtopia devices.

Problems
========

1) Occasional floating point exception at connection.

I'm not sure if that is something I've added or not. If you get this persistently from a particular server try checking the "Request 8-bit session" box.

2) I can't currently build for opie based machines.

Even the original code freshly checked out of the CVS segfaults for me
when I build it for an Opie target so I have only tested this on a
Sharp ROM based Zaurus.

3) I'm not sure that I can get much of a sample to estimate bandwidth
   in hextile encoding...

...so you may get stuck in hextile encoding when using auto mode.

4) I haven't tested auto mode in a wide enough set of networks, yet.

Which is why I'm making this release.
« Last Edit: March 08, 2006, 08:37:42 am by TimW »

TimW

  • Sr. Member
  • ****
  • Posts: 296
    • View Profile
Updated Vnc Viewer For Sharp Roms
« Reply #1 on: March 09, 2006, 04:50:26 am »
I found the problem. Funny how you can spend days looking for a bug and then find it the day after you release something. Anyway, it looks like it has been in keypebble right from the start so this fixed version may work better for you even if keypebble didn't work before. You can get the updated version here.

If you are interested, the bug was in the initial negotiation of screen depth. If a server suggested a depth of more than 16 keypebble was supposed to request that it be limited to 16 but the structure was only getting filled in if the "Request 8-bit session" check box was activated. This meant that any server trying to serve up a 24 bit (or more) screen would fail (the negotiation, not the server). Tight VNC would just kick the client off, OSXVnc and RealVNC would just hang during the negotiation meaning that the first refresh would never arrive

xamindar

  • Hero Member
  • *****
  • Posts: 803
    • View Profile
    • http://www.radnimax.com
Updated Vnc Viewer For Sharp Roms
« Reply #2 on: March 09, 2006, 01:13:46 pm »
Cool, I tried the first version last night but was unable to get it to connect while the original keypebble connected just fine.  That was probably the cause.  I could never get keypebble to even get an 8-bit session even with the box checked.
SL-C3100 happily Dualbooting Japanese Rom 1.02 and Debian Eabi
Replaced internal CF with 8gb seagate cf hard drive
Ambicom CF GPS
CyberPower battery powered USB hub
D-link DCF-650W (MAN THIS THING IS HUGE!!)

TimW

  • Sr. Member
  • ****
  • Posts: 296
    • View Profile
Updated Vnc Viewer For Sharp Roms
« Reply #3 on: March 10, 2006, 07:15:28 am »
Quote
Cool, I tried the first version last night but was unable to get it to connect while the original keypebble connected just fine.  That was probably the cause.  I could never get keypebble to even get an 8-bit session even with the box checked.
[div align=\"right\"][a href=\"index.php?act=findpost&pid=117792\"][{POST_SNAPBACK}][/a][/div]
So the second version is working okay? If so I'd like to hear how the different encodings work out for you and especially if the auto setting chooses appropriate settings. It works okay on the four networks I've tried it on but four isn't a big sample 8^).

I get the best results on my SL5000 with a tightvnc server using zlib encoding - but zrle on a realvnc server isn't far behind and may even catch up once I've had a chance to optimise a bit more.

xamindar

  • Hero Member
  • *****
  • Posts: 803
    • View Profile
    • http://www.radnimax.com
Updated Vnc Viewer For Sharp Roms
« Reply #4 on: March 10, 2006, 12:43:02 pm »
It seems to be working now, the request 8 bit button works too

I am using auto and connecting to my gnome desktop's vnc.  I do not know which encoding it is using, is there a way I can find out?  Console output?

I'll do more testing with realvnc in windows when I get home.  But for now it does seem a little faster and I love having the cursor there.   Now I can at least see where the mouse should be.
SL-C3100 happily Dualbooting Japanese Rom 1.02 and Debian Eabi
Replaced internal CF with 8gb seagate cf hard drive
Ambicom CF GPS
CyberPower battery powered USB hub
D-link DCF-650W (MAN THIS THING IS HUGE!!)

TimW

  • Sr. Member
  • ****
  • Posts: 296
    • View Profile
Updated Vnc Viewer For Sharp Roms
« Reply #5 on: March 10, 2006, 01:09:52 pm »
Quote
It seems to be working now, the request 8 bit button works too

I am using auto and connecting to my gnome desktop's vnc.  I do not know which encoding it is using, is there a way I can find out?  Console output?

I'll do more testing with realvnc in windows when I get home.  But for now it does seem a little faster and I love having the cursor there.   Now I can at least see where the mouse should be.
[div align=\"right\"][a href=\"index.php?act=findpost&pid=117923\"][{POST_SNAPBACK}][/a][/div]
It puts a brief status message up on the taskbar whenever it changes. Usually the first opportunity to change is as the first screen finishes drawing. At this point it should say something like:

Using raw

or

Using hextile

or

Using zlib.

It will also say this at the console but running it from the console is very slooooow unless you turn nearly all the debug off (which I think I have but I can't remember if the encodings are still printed out).

If you can see the mouse cursor then it is being drawn by the VNC server. Ironically, the option I added turns the cursor *off* rather than on 8^). Unfortunately so much depends on the precise pairing of client and server (and which OS the server is on) that it is really hard to guess beforehand whether the cursor will be drawn by the server or not. If it is, then checking the local cursor encoding does nothing, if it isn't then currently the cursor won't be drawn - though that will change once I understand a bit more about how qt/embedded handles cursors.

Using auto encoding is unlikely to give you the fastest setting as it tries to balance server load against bandwidth usage. I try and make it so that a full screen redraw will be done in less than two seconds and use the least processor intensive encoding to achieve that. Off course, all these calculations are approximate and don't take into account CPU at the client.

If you want speed, then the best settings for me are usually with setting auto to off and setting zlib and zrle to on. Tight servers generally have zlib and real servers generally have zrle. I've just found a server which only does raw and hextile (of the non-deprecated encodings) so I may have to modify auto a bit to cope with that.
« Last Edit: March 10, 2006, 01:11:53 pm by TimW »

undrwater

  • Full Member
  • ***
  • Posts: 232
    • View Profile
    • http://
Updated Vnc Viewer For Sharp Roms
« Reply #6 on: March 10, 2006, 11:48:03 pm »
I'm unable to connect.

When I start up I get:

Code: [Select]
SlSharedManager: can't get proc entry
Display size = 480x640
Connecting...

QGDict::hashStringKey: Invalid null key
QGDict::hashStringKey: Invalid null key
QGDict::hashStringKey: Invalid null key
QGDict::hashStringKey: Invalid null key
...
...etc...

It first comlained about a libsl.qmid, but I was able to resolve that.

This is on a SL-6000, stock Sharp ROM, installed to SD.

eviLjazz

  • Full Member
  • ***
  • Posts: 116
    • View Profile
    • http://katastrophos.net/andre/blog
Updated Vnc Viewer For Sharp Roms
« Reply #7 on: March 11, 2006, 08:33:47 am »
This looks nice. I would love to test your program but somehow I can't download from your site. Always getting 404s.
If you could make the software available again, that would be mighty cool. Thanks in advance.
« Last Edit: March 11, 2006, 08:35:38 am by eviLjazz »
Sharp Zaurus SL-C3200/36GB running Cacko : Fujitsu LifeBook U2010/64GB SSD running Win7 : Nokia N900 (yes, flame me.) Blog : Twitter : Trac
Quasar Media Player : QScrobbler : Enhanced audio driver and mixer for C1000/C3x00 : Unified Sharp/Tetsu/Cacko/pdaXrom Kernel 2.4.20 branch : My packages : Sources

speculatrix

  • Administrator
  • Hero Member
  • *****
  • Posts: 3707
    • View Profile
Updated Vnc Viewer For Sharp Roms
« Reply #8 on: March 11, 2006, 09:42:41 am »
what do people think is the best vnc server (I use it on mp mp3 jukebox at home, which is a headless win2k box running winamp)... I tried ultravnc but it put quite a load on the win2k box (which is a low-powered duron!), and found that tightvnc seems to be a good compromise on compresion efficiency vs overhead.

As I understand it, rdp/remote desktop is more efficient than vnc when running (oops, nearly put "ruining"!)  on windows... but that'd mean upgrading the box to XP and I'm doing my best to escape the clutches of MS.
Gemini 4G/Wi-Fi owner, formerly zaurus C3100 and 860 owner; also owner of an HTC Doubleshot, a Zaurus-like phone.

chyang

  • Sr. Member
  • ****
  • Posts: 270
    • View Profile
    • http://mail.ustc.edu.cn/~chyang/
Updated Vnc Viewer For Sharp Roms
« Reply #9 on: March 11, 2006, 10:34:46 am »
cannot access. Would you like to add it with the attach function? Thanks.
SL-C3200+Symbol CF WIFI+Corsair 2GB SD
SL-5500+Sharp-3.13 ROM+Viking 512MB CF+Kinston 256MB SD
[img]http://sunsetyang.googlepages.com/c3200.gif\" border=\"0\" class=\"linked-sig-image\" /][img]http://sunsetyang.googlepages.com/5500.gif\" border=\"0\" class=\"linked-sig-image\" /]
Socket CF Bluetooth + EagleTec CF Lan Card + EagleTec CF Modem
Histroy:
[SL-C3000 Cacko 1.23 Beta 1] Sold on 2006/07/27
MA701 CF WIFI + EagleTec CF Bluetooth + D-Link DCF-660W WIFI
[SL5500+Sharp-3.13 ROM+SimpleTech 64MB CF+Hagiwara 128MB SD] Lost on 18,March,04

TimW

  • Sr. Member
  • ****
  • Posts: 296
    • View Profile
Updated Vnc Viewer For Sharp Roms
« Reply #10 on: March 11, 2006, 12:44:35 pm »
Quote
cannot access. Would you like to add it with the attach function? Thanks.
[div align=\"right\"][a href=\"index.php?act=findpost&pid=118037\"][{POST_SNAPBACK}][/a][/div]
I tried adding the code to draw the cursor locally. It works under qvfb using the sdk but I don't think it is working on the Zaurus yet. Otherwise this is the same as 0.2 except attached here.

TimW

  • Sr. Member
  • ****
  • Posts: 296
    • View Profile
Updated Vnc Viewer For Sharp Roms
« Reply #11 on: March 11, 2006, 12:49:20 pm »
Quote
I'm unable to connect.

When I start up I get:

Code: [Select]
SlSharedManager: can't get proc entry
Display size = 480x640
Connecting...

QGDict::hashStringKey: Invalid null key
QGDict::hashStringKey: Invalid null key
QGDict::hashStringKey: Invalid null key
QGDict::hashStringKey: Invalid null key
...
...etc...

It first comlained about a libsl.qmid, but I was able to resolve that.

This is on a SL-6000, stock Sharp ROM, installed to SD.
[div align=\"right\"][a href=\"index.php?act=findpost&pid=117996\"][{POST_SNAPBACK}][/a][/div]
These don't look much like errors which this can produce. There is no direct linking to libsl and I'm not directly using QGDict. I'd say the installation went wrong but I don't have an SL-6000 so maybe it does something very different to my SL-5000.

Try uninstalling it and reinstalling it. I can't come up with anything more constructive than that, I'm afraid.

TimW

  • Sr. Member
  • ****
  • Posts: 296
    • View Profile
Updated Vnc Viewer For Sharp Roms
« Reply #12 on: March 11, 2006, 05:16:37 pm »
Quote
what do people think is the best vnc server (I use it on mp mp3 jukebox at home, which is a headless win2k box running winamp)... I tried ultravnc but it put quite a load on the win2k box (which is a low-powered duron!), and found that tightvnc seems to be a good compromise on compresion efficiency vs overhead.

As I understand it, rdp/remote desktop is more efficient than vnc when running (oops, nearly put "ruining"!)  on windows... but that'd mean upgrading the box to XP and I'm doing my best to escape the clutches of MS.
[div align=\"right\"][{POST_SNAPBACK}][/a][/div]
Tightvnc is pretty good. If you can use the mirror driver (dfmirage from [a href=\"http://www.tightvnc.com/download.html#devel]the devel downloads[/url]) on win2k then that should help a lot. If you using my version of keypebble then using zlib encoding and make the "check for screen updates" value large. The recommended value IIRC is 40 but I prefer to run at 1000 (no two updates will arive within a second of one another). I think you can do things on tightvnc itself to reduce the polling load which will also help.

I have used tightvnc without any of these optimisations under windows ME on a ~600MHz crusoe without too much trouble but I wasn't doing anything else which put any load on it.

BTW, if you do upgrade the box to XP you'll need the pro version, I think - and rdp is much more efficient than VNC.

TimW

  • Sr. Member
  • ****
  • Posts: 296
    • View Profile
Updated Vnc Viewer For Sharp Roms
« Reply #13 on: March 11, 2006, 07:36:34 pm »
I've added some more trace to help track down problems with unusual server pixel formats, and added some extra code to cope with them - I may even have caught them all, this time 8^).

I've also done a little bit more optimisation by forcing the pixel format to little endian which reduces the amount of byte shuffling and is more likely to match the server (unless you have a PowerPC Mac).

Here is the latest.

ken

  • Sr. Member
  • ****
  • Posts: 274
    • View Profile
Updated Vnc Viewer For Sharp Roms
« Reply #14 on: March 11, 2006, 07:38:39 pm »
Quote
Here is the latest.

This wouldn't by any chance act as a terminal services client would it?
SL-6000L Sharp ROM 1.12 - 1G SD (RiDATA) - 2G Microdrive (Hitachi)
TRENDnet TE-CF100 10/100 (no drivers needed) AmbiCom CF56M-EZ modem (no drivers needed)