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 03-14-2012, 11:36 PM   #76
Hypernova
Hyperreader
Hypernova began at the beginning.
 
Posts: 66
Karma: 10
Join Date: Feb 2009
Device: Kindle DXG;Pocketbook 360
Powershell script for starting the vnc viewer

I put together something so it's more convenient to start/quit the whole process. It's a powershell script to run UltraVNC, wake up the Kindle, prevent sleep using kaffeine(optional), and start vncviewer. When you hit enter, it will close the viewer, exit kaffeine and UltraVNC. I use the script from http://velemental.com/2012/01/11/pro...th-powershell/ and SharpSSH.

You have to put your ssh/vnc's username/password at the beginning of the script and place the content of the 7z file in the same directory as UltraVNC folder (or just change the path yourself).

Here's the Powershell script for reference
Code:
$vncpassword=""
$sshuser="root"
$sshpassword=""
$hostname="192.168.2.2"

#Script path
$spath=Split-Path -parent $MyInvocation.MyCommand.Definition

#Start winvnc if not already running
if (-not($ultravnc=Get-Process winvnc -ea 0))
{
    Start-Process($spath+"\UltraVNC\winvnc.exe")
    $ultravnc=Get-Process winvnc
}

#dot source ssh_function
. ($spath+"\ssh_function.ps1")

#Create ssh session
New-SshSession -UserName $sshuser -Password $sshpassword -HostName $hostname
#Wake up the kindle
Send-Ssh("lipc-set-prop com.lab126.powerd wakeUp 1")
#Run vncviewer
Send-Ssh("/mnt/us/kindlevncviewer/kvncviewer.sh -password $vncpassword 192.168.2.1:1 &")
#Prevent sleep using kaffeine
Send-Ssh("/mnt/us/system/kaffeine")

#Wait for Enter key
Read-Host -Prompt 'Press Enter to close VNC' | Out-Null
#Kill vncviewer
Send-Ssh("killall kindlevncviewer")
#Exit kaffeine
Send-Ssh("/mnt/us/system/kaffeine 3")
#Kill winvnc
Stop-Process($ultravnc)

#Close ssh session
Remove-SshSession
Now I can simply run the script. Thanks hawhill and everyone again for your work. This is awesome.
Attached Files
File Type: zip KindleVNCPowershell.zip (155.0 KB, 98 views)

Last edited by Hypernova; 03-15-2012 at 06:05 PM. Reason: Add attachment
Hypernova is offline   Reply With Quote
Old 04-08-2012, 12:39 AM   #77
ddd12323
Junior Member
ddd12323 began at the beginning.
 
Posts: 2
Karma: 10
Join Date: Apr 2012
Device: DXG
Question

Thank you hawhil for awesome program!I was waiting for a program like this forever! I have kindle dxg w/ 2.5.8 firmware. I was following your instructions on tinyapps.org/docs/e-ink-monitor.html and I went through all the steps but after I type "/mnt/us/kindlevncviewer/kvncviewer.sh 192.168.2.1:1 &" and I send the Shift V U sequence, screen stops and nothing happens. At that point, I pinged the 192.168.2.2 from the PC and it worked but pinging 192.168.2.1 from the kindle did not work. Kindle says that it can not route to the 192.168.2.2. I tried to set up a static route but that did not route to the pc also. It seems like the kindle does not know how to reach the PC interface. Any advise please?
ddd12323 is offline   Reply With Quote
Old 04-08-2012, 07:35 AM   #78
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,108
Karma: 2114647
Join Date: Nov 2010
Location: Goettingen, Germany
Device: Kindle Paperwhite, Kobo Mini
I don't think it's routing. Can you SSH to the Kindle? Also, the behaviour when pinging the host PC would be different. Without a route, it would fail at once. If you just don't get any replies, there's probably a firewall on your desktop PC blocking the connection.

The viewer will just try to reconnect over and over, probably you have to kill it (or use the corresponding key sequence for launchpad).

BTW, the credits for the great description go to tinyapps.org!
hawhill is offline   Reply With Quote
Old 04-08-2012, 10:29 PM   #79
ddd12323
Junior Member
ddd12323 began at the beginning.
 
Posts: 2
Karma: 10
Join Date: Apr 2012
Device: DXG
Quote:
Originally Posted by hawhill View Post
I don't think it's routing. Can you SSH to the Kindle? Also, the behaviour when pinging the host PC would be different. Without a route, it would fail at once. If you just don't get any replies, there's probably a firewall on your desktop PC blocking the connection.

The viewer will just try to reconnect over and over, probably you have to kill it (or use the corresponding key sequence for launchpad).

BTW, the credits for the great description go to tinyapps.org!
Thanks for your help! I disabled the windows firewall and it works great. The your program is amazing. The refresh rate is far better than what I have expected. Now, the Kindle DXG is worth its price.. Again, thanks for your great effort!!
ddd12323 is offline   Reply With Quote
Old 04-09-2012, 08:58 PM   #80
bloor
Member
bloor began at the beginning.
 
Posts: 20
Karma: 10
Join Date: Apr 2012
Device: Kindle DXG 3.2.1
Hello,

Now that my dxg isnt emenating smoke/scorn, moving on to the next step on my 3.2.1 DXG
1) Each time I remove and reconnect the usb cable to the computer- the kindle is seen as a new device and the driver "installed" (i'm upto LAN 6/ RNDIS #4 now on Windows 8 with occasional reversion back to the original)
2) How can I switch back to mass storage mode on the fly so as to modify files on the kindle?
3) Much tinkering later, I can access it via vnc (tinyapp's instructions), but the drops are frequent and the dxg screen freezes for the brief seconds that i am connected. Access to the kindle is regained after connection is lost or requires a hardboot

-Thank you
bloor is offline   Reply With Quote
Old 04-09-2012, 09:08 PM   #81
bloor
Member
bloor began at the beginning.
 
Posts: 20
Karma: 10
Join Date: Apr 2012
Device: Kindle DXG 3.2.1
Holy poop it works! it works wooo! space4's tip on page 4 to include the password did the trick
RealVNC was buggy so tried UltraVNC- added a generic password, then typed it in along with tinyapp's instructions.


...its beautiful

PS: Definitely not as fast refreshing as the video loaded earlier in the thread; atleast it works...tinkering to follow

Last edited by bloor; 04-09-2012 at 09:15 PM.
bloor is offline   Reply With Quote
Old 04-14-2012, 10:52 PM   #82
jmseight
Zealot
jmseight knows the difference between 'who' and 'whom'jmseight knows the difference between 'who' and 'whom'jmseight knows the difference between 'who' and 'whom'jmseight knows the difference between 'who' and 'whom'jmseight knows the difference between 'who' and 'whom'jmseight knows the difference between 'who' and 'whom'jmseight knows the difference between 'who' and 'whom'jmseight knows the difference between 'who' and 'whom'jmseight knows the difference between 'who' and 'whom'jmseight knows the difference between 'who' and 'whom'jmseight knows the difference between 'who' and 'whom'
 
Posts: 130
Karma: 10000
Join Date: Mar 2012
Device: Kindle 3G, Kindle Touch 3G, iRiver Story HD, Sony Reader
Hi Hawhill,

This works great with RealVNC and UltraVNC. I think they both use WinVNC.

Anyway, I set my PC screen to 800x600 and the entire screen is displayed.

I tried to play an youtube video in full screen mode on my PC. I also tried to play Angry Bird on my PC.

The refresh rate is slow as expected but functional.

One thing that is an issue is the kindle screen flash. I think the youtube video will work better if there were no screen flash.

Maybe you can add an option to disable screen flash.

Thanks,
James
jmseight is offline   Reply With Quote
Old 04-15-2012, 06:07 AM   #83
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,108
Karma: 2114647
Join Date: Nov 2010
Location: Goettingen, Germany
Device: Kindle Paperwhite, Kobo Mini
It's on the agenda, but: It won't look nice. Currently, doing without even the slightes flash means that grayscale is not possible. Ultra-Fast refresh works only with pure black&white. I intend to combine this with a dithering mode - but my free-time agenda is quite full ATM... So don't expect it to be there tomorrow. But it's not forgotten :-)
hawhill is offline   Reply With Quote
Old 04-15-2012, 11:04 AM   #84
geekmaster
Всё гениальное просто.
geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.
 
geekmaster's Avatar
 
Posts: 5,067
Karma: 6789001
Join Date: Nov 2011
Location: Щедрость не имеет пределов.
Device: *.*
Quote:
Originally Posted by hawhill View Post
It won't look nice. ... Ultra-Fast refresh works only with pure black&white.
"...everything looks worse in black and white."


Last edited by geekmaster; 04-15-2012 at 11:16 AM.
geekmaster is offline   Reply With Quote
Old 04-15-2012, 11:13 AM   #85
geekmaster
Всё гениальное просто.
geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.
 
geekmaster's Avatar
 
Posts: 5,067
Karma: 6789001
Join Date: Nov 2011
Location: Щедрость не имеет пределов.
Device: *.*
It might be fun to use this to connect to the X11vnc app that ixtab posted:
http://www.mobileread.com/forums/sho...d.php?t=175297


Last edited by geekmaster; 04-16-2012 at 09:44 PM.
geekmaster is offline   Reply With Quote
Old 04-16-2012, 07:27 PM   #86
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,108
Karma: 2114647
Join Date: Nov 2010
Location: Goettingen, Germany
Device: Kindle Paperwhite, Kobo Mini
FWIW, it now has a "-dithered" switch and will use a halftoning raster to paint only black and white pixels. As for how it looks, please refer to Paul Simon as cited above. Also, it really brings the CPU to the edge.
hawhill is offline   Reply With Quote
Old 04-17-2012, 12:37 PM   #87
jmseight
Zealot
jmseight knows the difference between 'who' and 'whom'jmseight knows the difference between 'who' and 'whom'jmseight knows the difference between 'who' and 'whom'jmseight knows the difference between 'who' and 'whom'jmseight knows the difference between 'who' and 'whom'jmseight knows the difference between 'who' and 'whom'jmseight knows the difference between 'who' and 'whom'jmseight knows the difference between 'who' and 'whom'jmseight knows the difference between 'who' and 'whom'jmseight knows the difference between 'who' and 'whom'jmseight knows the difference between 'who' and 'whom'
 
Posts: 130
Karma: 10000
Join Date: Mar 2012
Device: Kindle 3G, Kindle Touch 3G, iRiver Story HD, Sony Reader
Hi,

Thanks for the mod.

The dithered mode works very poorly for text on screen. But showing an Youtube video is much better than the constant flashing.

BTW, why is that the Kindle must flash when using grayscale and does not in black and White. Is it because of ghosting?

What if you turn off flash with grayscale?

Thanks,
JAmes
jmseight is offline   Reply With Quote
Old 04-17-2012, 02:19 PM   #88
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,108
Karma: 2114647
Join Date: Nov 2010
Location: Goettingen, Germany
Device: Kindle Paperwhite, Kobo Mini
Well, it's that easy: I can't turn off flash with grayscale. The driver does the flash, the refresh ioctl() is actually the same in both cases. I did not analyze the kernel driver yet (which is in the linux kernel source bundle from Amazon). But it might be buried even deeper in the eink controller, with (currently) not much options to change that behaviour.
I'm not sure how grayscale is archieved in the first place, BTW, but I think it might be an interference induced dither micro-pattern. Maybe it's too hard to calculate this (going from gray to gray would need to carefully switch within the pattern micro-resolution). when you're not coming from strictly black and white.
hawhill is offline   Reply With Quote
Old 04-17-2012, 03:18 PM   #89
geekmaster
Всё гениальное просто.
geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.
 
geekmaster's Avatar
 
Posts: 5,067
Karma: 6789001
Join Date: Nov 2011
Location: Щедрость не имеет пределов.
Device: *.*
Quote:
Originally Posted by hawhill View Post
Well, it's that easy: I can't turn off flash with grayscale. The driver does the flash, the refresh ioctl() is actually the same in both cases. I did not analyze the kernel driver yet (which is in the linux kernel source bundle from Amazon). But it might be buried even deeper in the eink controller, with (currently) not much options to change that behaviour.
I'm not sure how grayscale is archieved in the first place, BTW, but I think it might be an interference induced dither micro-pattern. Maybe it's too hard to calculate this (going from gray to gray would need to carefully switch within the pattern micro-resolution). when you're not coming from strictly black and white.
If you look with a microscope, you will see that the gray beads have less zinc oxide powder stuck to their top (visible) surface. Also, if you take a kindle apart, and remove the protective rigid backing from the glass display, you will see a silvery "negative" image of what is on the front, because the white particles are either on the back (black pixels), or the front (white pixels), or some on both front and back (and the sides of the beads too, probably), for gray pixels.

About text vs. animation, you can dither ONLY the part of the screen that is changing (video) and leave the text part as nice and pretty fully grayscale-antialiased text. That would require that you determine a bounding box on the dirty (changing) parts of the display and dither ONLY that part.

P.S. I uploaded a (fixed) dithermatron v1.1 that does not abort early on the K4(mini) and K5(touch), which shows off my dithered setpixel "formula 42". It works on all kindle models and it is pretty fast (cache-friendly branch-free code). You are welcome to "borrow" it.


Last edited by geekmaster; 04-17-2012 at 03:24 PM.
geekmaster is offline   Reply With Quote
Old 04-17-2012, 05:57 PM   #90
jmseight
Zealot
jmseight knows the difference between 'who' and 'whom'jmseight knows the difference between 'who' and 'whom'jmseight knows the difference between 'who' and 'whom'jmseight knows the difference between 'who' and 'whom'jmseight knows the difference between 'who' and 'whom'jmseight knows the difference between 'who' and 'whom'jmseight knows the difference between 'who' and 'whom'jmseight knows the difference between 'who' and 'whom'jmseight knows the difference between 'who' and 'whom'jmseight knows the difference between 'who' and 'whom'jmseight knows the difference between 'who' and 'whom'
 
Posts: 130
Karma: 10000
Join Date: Mar 2012
Device: Kindle 3G, Kindle Touch 3G, iRiver Story HD, Sony Reader
Yes. I see that the build in browser also flashes when it scrolls.

In fact, what happens is that it makes a black white image, then it fills in the gray in the black area.

I experiments in hittting the ">" and "<" buttons quickly back and forth on a web site. If you do this quickly enough, you will see only the black and white image.

Thanks,
James
jmseight is offline   Reply With Quote
Reply

Tags
application, kindle, source, viewer, vnc

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Free (GPLv2) Translation Dictionaries Elleo Amazon Kindle 3 01-11-2011 10:57 PM
Calibre native app on iphone for reading news? bigreat Calibre 2 07-21-2010 11:50 PM
Android Android App: VNC leo315 enTourage Archive 4 05-13-2010 06:06 PM
Android VNC viewer (use your PC from the eDGe!) devseev enTourage Archive 2 04-11-2010 01:21 AM
PalmPDF - native PDF Viewer for Palm OS 5.x Colin Dunstan Reading and Management 2 11-23-2005 02:09 PM


All times are GMT -4. The time now is 02:14 PM.


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