Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Readers > Amazon Kindle > Kindle Developer's Corner

Notices

Reply
 
Thread Tools Search this Thread
Old 12-01-2013, 03:54 PM   #1
hawhill
Wizard
hawhill ought to be getting tired of karma fortunes by now.hawhill ought to be getting tired of karma fortunes by now.hawhill ought to be getting tired of karma fortunes by now.hawhill ought to be getting tired of karma fortunes by now.hawhill ought to be getting tired of karma fortunes by now.hawhill ought to be getting tired of karma fortunes by now.hawhill ought to be getting tired of karma fortunes by now.hawhill ought to be getting tired of karma fortunes by now.hawhill ought to be getting tired of karma fortunes by now.hawhill ought to be getting tired of karma fortunes by now.hawhill ought to be getting tired of karma fortunes by now.
 
hawhill's Avatar
 
Posts: 1,379
Karma: 2155307
Join Date: Nov 2010
Location: Goettingen, Germany
Device: Kindle Paperwhite, Kobo Mini
kvncviewer - next iteration of kindlevncviewer

I used some spare time to hack a bit on the VNC viewer I published here before, KindleVNCviewer (https://www.mobileread.com/forums/sho...d.php?t=150434).

It is a major rework. It's not tested on Kindle 2, 3, DX, but it hopefully still works on those devices. It is however tested on Kindle PW1 and will probably run on K4, K5 (KT), KPW1 and KPW2. Also, a version for Kobos is available (announced in the Kobo developer forum). Thus, I decided a slight rename: It is now known as "kvncviewer" :-)

Source code is available on github in the old place: http://github.com/hwhw/kindlevncviewer

As it is a major redesign, I opened this new thread. For some scenarios, people might want to continue to use the old code.

The new code brings some new options. It is written in Lua, and that I took a bit further than with the old codebase, which used Lua for configuration, too. The new code is implemented using LuaJIT. It re-uses the framebuffer code from Koreader and is quite versatile. It allows for rotation options, b&w dithering on all devices, configurable refresh timeouts (though this won't make your screen faster than the hardware can do, but you might want to fiddle with the options and report your experiences here) and some more things I forgot about.

Attached is the compiled version for Kindles.
Attached Files
File Type: zip kvncviewer-arm-none-linux-gnueabi-v1.0.0-1-g38f1188.zip (529.4 KB, 1026 views)
hawhill is offline   Reply With Quote
Old 12-01-2013, 04:51 PM   #2
Aeris
Developer's Corner Mascot
Aeris ought to be getting tired of karma fortunes by now.Aeris ought to be getting tired of karma fortunes by now.Aeris ought to be getting tired of karma fortunes by now.Aeris ought to be getting tired of karma fortunes by now.Aeris ought to be getting tired of karma fortunes by now.Aeris ought to be getting tired of karma fortunes by now.Aeris ought to be getting tired of karma fortunes by now.Aeris ought to be getting tired of karma fortunes by now.Aeris ought to be getting tired of karma fortunes by now.Aeris ought to be getting tired of karma fortunes by now.Aeris ought to be getting tired of karma fortunes by now.
 
Aeris's Avatar
 
Posts: 486
Karma: 1277790
Join Date: Sep 2013
Device: Kindle Paperwhite 5.3.4, Kindle Keyboard 3.4
Works perfectly on PW1, Hans! And no more inverted colors! Beautiful work, thank you!
Aeris is offline   Reply With Quote
Advert
Old 12-01-2013, 06:35 PM   #3
Aeris
Developer's Corner Mascot
Aeris ought to be getting tired of karma fortunes by now.Aeris ought to be getting tired of karma fortunes by now.Aeris ought to be getting tired of karma fortunes by now.Aeris ought to be getting tired of karma fortunes by now.Aeris ought to be getting tired of karma fortunes by now.Aeris ought to be getting tired of karma fortunes by now.Aeris ought to be getting tired of karma fortunes by now.Aeris ought to be getting tired of karma fortunes by now.Aeris ought to be getting tired of karma fortunes by now.Aeris ought to be getting tired of karma fortunes by now.Aeris ought to be getting tired of karma fortunes by now.
 
Aeris's Avatar
 
Posts: 486
Karma: 1277790
Join Date: Sep 2013
Device: Kindle Paperwhite 5.3.4, Kindle Keyboard 3.4
Argh, annoying problem... after using it for some time it hangs all the kindle
Aeris is offline   Reply With Quote
Old 12-02-2013, 12:30 AM   #4
hawhill
Wizard
hawhill ought to be getting tired of karma fortunes by now.hawhill ought to be getting tired of karma fortunes by now.hawhill ought to be getting tired of karma fortunes by now.hawhill ought to be getting tired of karma fortunes by now.hawhill ought to be getting tired of karma fortunes by now.hawhill ought to be getting tired of karma fortunes by now.hawhill ought to be getting tired of karma fortunes by now.hawhill ought to be getting tired of karma fortunes by now.hawhill ought to be getting tired of karma fortunes by now.hawhill ought to be getting tired of karma fortunes by now.hawhill ought to be getting tired of karma fortunes by now.
 
hawhill's Avatar
 
Posts: 1,379
Karma: 2155307
Join Date: Nov 2010
Location: Goettingen, Germany
Device: Kindle Paperwhite, Kobo Mini
OK, so back to more testing....
hawhill is offline   Reply With Quote
Old 12-02-2013, 09:24 PM   #5
ppoo
Connoisseur
ppoo writes the songs that make the whole world sing.ppoo writes the songs that make the whole world sing.ppoo writes the songs that make the whole world sing.ppoo writes the songs that make the whole world sing.ppoo writes the songs that make the whole world sing.ppoo writes the songs that make the whole world sing.ppoo writes the songs that make the whole world sing.ppoo writes the songs that make the whole world sing.ppoo writes the songs that make the whole world sing.ppoo writes the songs that make the whole world sing.ppoo writes the songs that make the whole world sing.
 
Posts: 56
Karma: 40393
Join Date: May 2012
Device: Kindle Touch
My KT have hanged after using rotateFB 90 even though it has been in landscape mode. Without rotating, it works well.
More: It doesn't fit KT screen, there is still a gap between vncviewer window and main window.

Last edited by ppoo; 12-02-2013 at 09:32 PM.
ppoo is offline   Reply With Quote
Advert
Old 12-03-2013, 04:04 AM   #6
hawhill
Wizard
hawhill ought to be getting tired of karma fortunes by now.hawhill ought to be getting tired of karma fortunes by now.hawhill ought to be getting tired of karma fortunes by now.hawhill ought to be getting tired of karma fortunes by now.hawhill ought to be getting tired of karma fortunes by now.hawhill ought to be getting tired of karma fortunes by now.hawhill ought to be getting tired of karma fortunes by now.hawhill ought to be getting tired of karma fortunes by now.hawhill ought to be getting tired of karma fortunes by now.hawhill ought to be getting tired of karma fortunes by now.hawhill ought to be getting tired of karma fortunes by now.
 
hawhill's Avatar
 
Posts: 1,379
Karma: 2155307
Join Date: Nov 2010
Location: Goettingen, Germany
Device: Kindle Paperwhite, Kobo Mini
It most probably is not the fault of rotating. There is a race condition in the timer code I've yet to investigate. At least here, rotating by (steps of) 90 degrees works fine. Well, I certainly didn't test on KT (I don't have one), but I don't see where it would be different there. Hang on a bit and test when the bug is fixed.

What do you mean with "doesn't fit KT screen"? You will, in any case, run a VNC server offering a display exact the size of the eink device's screen in order to really "fit" one to another. Easy to do using a virtual display like "Xvnc" on Linux, possibly a bit more fiddly when exporting a Desktop screen.
hawhill is offline   Reply With Quote
Old 12-04-2013, 09:36 AM   #7
ppoo
Connoisseur
ppoo writes the songs that make the whole world sing.ppoo writes the songs that make the whole world sing.ppoo writes the songs that make the whole world sing.ppoo writes the songs that make the whole world sing.ppoo writes the songs that make the whole world sing.ppoo writes the songs that make the whole world sing.ppoo writes the songs that make the whole world sing.ppoo writes the songs that make the whole world sing.ppoo writes the songs that make the whole world sing.ppoo writes the songs that make the whole world sing.ppoo writes the songs that make the whole world sing.
 
Posts: 56
Karma: 40393
Join Date: May 2012
Device: Kindle Touch
I thinking of some kinds of "overflow" because of mismatch size or when I rotate, vnc screen spread to outside frame buffer.
ppoo is offline   Reply With Quote
Old 12-04-2013, 10:54 AM   #8
hawhill
Wizard
hawhill ought to be getting tired of karma fortunes by now.hawhill ought to be getting tired of karma fortunes by now.hawhill ought to be getting tired of karma fortunes by now.hawhill ought to be getting tired of karma fortunes by now.hawhill ought to be getting tired of karma fortunes by now.hawhill ought to be getting tired of karma fortunes by now.hawhill ought to be getting tired of karma fortunes by now.hawhill ought to be getting tired of karma fortunes by now.hawhill ought to be getting tired of karma fortunes by now.hawhill ought to be getting tired of karma fortunes by now.hawhill ought to be getting tired of karma fortunes by now.
 
hawhill's Avatar
 
Posts: 1,379
Karma: 2155307
Join Date: Nov 2010
Location: Goettingen, Germany
Device: Kindle Paperwhite, Kobo Mini
What do you mean with "screen spread to outside framebuffer"? A framebuffer is a region of memory. How do you determine that it spread outside that region?

Or are you just talking about a cropped display, i.e. some part of the exported desktop does not show? If so: this is intended behaviour! kvncviewer does _not_ scale the screen in any way! (And I guess it would look pretty ugly if it did.)
hawhill is offline   Reply With Quote
Old 01-05-2014, 10:16 AM   #9
staylo
Member
staylo is out to avenge the death of his or her father, Domingo Montoya.staylo is out to avenge the death of his or her father, Domingo Montoya.staylo is out to avenge the death of his or her father, Domingo Montoya.staylo is out to avenge the death of his or her father, Domingo Montoya.staylo is out to avenge the death of his or her father, Domingo Montoya.staylo is out to avenge the death of his or her father, Domingo Montoya.staylo is out to avenge the death of his or her father, Domingo Montoya.staylo is out to avenge the death of his or her father, Domingo Montoya.staylo is out to avenge the death of his or her father, Domingo Montoya.staylo is out to avenge the death of his or her father, Domingo Montoya.staylo is out to avenge the death of his or her father, Domingo Montoya.
 
Posts: 11
Karma: 34114
Join Date: Mar 2011
Device: PRS-350
Thanks for this. I tested on a 3.2.1 dxg, but was unsuccessful. luajit seems to be using some glibc 2.7 functions:

[root@kindle kvncviewer]# ./luajit
./luajit: /lib/libc.so.6: version `GLIBC_2.7' not found (required by ./luajit)
staylo is offline   Reply With Quote
Old 01-23-2014, 11:55 AM   #10
langelgjm
Junior Member
langelgjm began at the beginning.
 
Posts: 5
Karma: 12
Join Date: Jan 2014
Device: Kindle DX
Tested on Kindle DX, not working

Quote:
It's not tested on Kindle 2, 3, DX, but it hopefully still works on those devices. It is however tested on Kindle PW1 and will probably run on K4, K5 (KT), KPW1 and KPW2.
I have a Kindle DX running software version 2.5.6

I cloned your git repo today, and built kvncviewer. Though it builds successfully, when I try to run it (or more accurately, when I try to run luajit) I get the following terse error:

"-sh: ./luajit:not found"

It has the executable permissions set properly. Only similar error I find online is here: https://www.mobileread.com/forums/sho...d.php?t=228168, and their solution was a software update.

Obviously I understand older devices aren't a priority, though I'm happy to test or help debug if I can. Going to report this an issue on GitHub now.

Last edited by langelgjm; 01-23-2014 at 12:04 PM.
langelgjm is offline   Reply With Quote
Old 01-23-2014, 03:30 PM   #11
hawhill
Wizard
hawhill ought to be getting tired of karma fortunes by now.hawhill ought to be getting tired of karma fortunes by now.hawhill ought to be getting tired of karma fortunes by now.hawhill ought to be getting tired of karma fortunes by now.hawhill ought to be getting tired of karma fortunes by now.hawhill ought to be getting tired of karma fortunes by now.hawhill ought to be getting tired of karma fortunes by now.hawhill ought to be getting tired of karma fortunes by now.hawhill ought to be getting tired of karma fortunes by now.hawhill ought to be getting tired of karma fortunes by now.hawhill ought to be getting tired of karma fortunes by now.
 
hawhill's Avatar
 
Posts: 1,379
Karma: 2155307
Join Date: Nov 2010
Location: Goettingen, Germany
Device: Kindle Paperwhite, Kobo Mini
I think it will have to be compiled with an older toolchain (or sysroot, that is) in order to work on these devices. I don't have one ready here, unfortunately. And I'm desperately missing free time to work on these projects of mine.
hawhill is offline   Reply With Quote
Old 01-23-2014, 03:51 PM   #12
langelgjm
Junior Member
langelgjm began at the beginning.
 
Posts: 5
Karma: 12
Join Date: Jan 2014
Device: Kindle DX
Fix to rely only on GLIBC 2.4

Quote:
Originally Posted by staylo View Post
Thanks for this. I tested on a 3.2.1 dxg, but was unsuccessful. luajit seems to be using some glibc 2.7 functions:

[root@kindle kvncviewer]# ./luajit
./luajit: /lib/libc.so.6: version `GLIBC_2.7' not found (required by ./luajit)
It's relatively easy to fix this - you need to edit both the toplevel Makefile, as well as luajit's Makefile (in the luajit-2.0/src directory) so that "-D_GNU_SOURCE=1" is always passed to the compiler.

This will get you binaries that do not rely on glibc 2.7 (they rely on 2.4, and at least on my Kindle DX it has glibc 2.5).

The relevant lines should read as follows:

Code:
CFLAGS?="-D_GNU_SOURCE=1"
LIBVNCCLIENT_CFLAGS=-D_GNU_SOURCE=1 -fPIC -shared \
in ./Makefile, and

Code:
CC= gcc -D_GNU_SOURCE=1
in ./luajit-2.0/src/Makefile

If you want to know why this is happening, the following link explains that the problem is a conflict between glibc and the C99 standard over scanf and related functions: http://stackoverflow.com/questions/2...some-platforms

This explains why -D_GNU_SOURCE works: http://stackoverflow.com/questions/8...se-it-and-when

And this was helpful in debugging the offending function: http://stackoverflow.com/questions/4...ation-coverage

This does not solve my problem, which I am still working on.
langelgjm is offline   Reply With Quote
Old 01-23-2014, 04:07 PM   #13
langelgjm
Junior Member
langelgjm began at the beginning.
 
Posts: 5
Karma: 12
Join Date: Jan 2014
Device: Kindle DX
Probably going to try older version

As it turns out my problem (sh not finding a file) was due to the luajit binary pointing to a non-existing program interpreter.

This was solved by linking /lib/ld-linux-armhf.so.3 to /lib/ld-linux.so.3 (which itself was already linked to /lib/ld-2.5.so).

However, now when attempting to run luajit I get a segmentation fault, which is probably going to be beyond my ability to debug, so I think I may try the older version.
langelgjm is offline   Reply With Quote
Old 01-23-2014, 04:09 PM   #14
knc1
Going Viral
knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.
 
knc1's Avatar
 
Posts: 17,212
Karma: 18210809
Join Date: Feb 2012
Location: Central Texas
Device: No K1, PW2, KV, KOA
Quote:
Originally Posted by langelgjm View Post
As it turns out my problem (sh not finding a file) was due to the luajit binary pointing to a non-existing program interpreter.

This was solved by linking /lib/ld-linux-armhf.so.3 to /lib/ld-linux.so.3 (which itself was already linked to /lib/ld-2.5.so).

However, now when attempting to run luajit I get a segmentation fault, which is probably going to be beyond my ability to debug, so I think I may try the older version.
Just build luajit against a compatible (older) libc
knc1 is offline   Reply With Quote
Old 01-23-2014, 05:46 PM   #15
NiLuJe
BLAM!
NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.
 
NiLuJe's Avatar
 
Posts: 13,477
Karma: 26012492
Join Date: Jun 2010
Location: Paris, France
Device: Kindle 2i, 3g, 4, 5w, PW, PW2, PW5; Kobo H2O, Forma, Elipsa, Sage, C2E
Also, don't build anything with a hard float toolchain if you're targeting the Kindle. softfp is the best we can do, even for the PW2.
NiLuJe is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
KindleVNCviewer hack: full screen display? bbhuston Amazon Kindle 0 04-28-2012 11:19 PM


All times are GMT -4. The time now is 05:33 PM.


MobileRead.com is a privately owned, operated and funded community.