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 04-21-2012, 12:07 PM   #1
arikfunke
Enthusiast
arikfunke is an enigma wrapped up in a mystery.arikfunke is an enigma wrapped up in a mystery.arikfunke is an enigma wrapped up in a mystery.arikfunke is an enigma wrapped up in a mystery.arikfunke is an enigma wrapped up in a mystery.arikfunke is an enigma wrapped up in a mystery.arikfunke is an enigma wrapped up in a mystery.arikfunke is an enigma wrapped up in a mystery.arikfunke is an enigma wrapped up in a mystery.arikfunke is an enigma wrapped up in a mystery.arikfunke is an enigma wrapped up in a mystery.
 
Posts: 36
Karma: 41848
Join Date: Mar 2011
Device: iRex
K3 screen hacking

Is there a way to:

1. trigger a framebuffer update? I tried the eips solutions from various posts but nothing seems to work.

2. is it possible to trigger screen rotation from a script?

Many thanks
arikfunke is offline   Reply With Quote
Old 04-23-2012, 04:54 AM   #2
inameiname
Groupie
inameiname can self-interpret dreams as they happen.inameiname can self-interpret dreams as they happen.inameiname can self-interpret dreams as they happen.inameiname can self-interpret dreams as they happen.inameiname can self-interpret dreams as they happen.inameiname can self-interpret dreams as they happen.inameiname can self-interpret dreams as they happen.inameiname can self-interpret dreams as they happen.inameiname can self-interpret dreams as they happen.inameiname can self-interpret dreams as they happen.inameiname can self-interpret dreams as they happen.
 
Posts: 159
Karma: 20390
Join Date: Feb 2009
Device: none
Quote:
Originally Posted by arikfunke View Post
Is there a way to:

1. trigger a framebuffer update? I tried the eips solutions from various posts but nothing seems to work.

2. is it possible to trigger screen rotation from a script?

Many thanks

I'm not sure about (1.) but I think for (2.), you can simply use the Launchpad shortcut, show below, if you use Launchpad; otherwise, simply put that command into a simple script and run via Kite or something:

rotate_screen.ini
Code:
; Rotate Screen
R = !if [ "$(cat /sys/module/eink_fb_hal_broads/parameters/bs_orientation)" == "1" ]; then lipc-send-event -r 3 com.lab126.hal orientationUp & else lipc-send-event -r 3 com.lab126.hal orientationLeft & fi
inameiname is offline   Reply With Quote
Advert
Old 04-23-2012, 05:01 AM   #3
geekmaster
Carpe diem, c'est la vie.
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: 6,433
Karma: 10773668
Join Date: Nov 2011
Location: Multiverse 6627A
Device: K1 to PW3
The framebuffer update sends the contents of the framebuffer to the eink screen. It is used by programs the write directly to the framebuffer. You can do it with eips '' (two single quotes), or you can do it with cat 1 > /proc/eink_fb/update_display, or you can do it with an ioctl() call from a C program.

The eips command works on any eink kindle. The proc port is only for the K3 and earlier (but K4 supports it if booted from main). The K5 does not have the /proc port and uses a different ioctl() call, so the eips command is popular there.

lipc events tell the framework to redraw its screens.

Screen rotation can also be done with /proc ports, but that really confuses the framework, so it is better to ask the framework to do it with lipc commands.


Last edited by geekmaster; 04-23-2012 at 05:05 AM.
geekmaster is offline   Reply With Quote
Old 04-26-2012, 05:38 AM   #4
arikfunke
Enthusiast
arikfunke is an enigma wrapped up in a mystery.arikfunke is an enigma wrapped up in a mystery.arikfunke is an enigma wrapped up in a mystery.arikfunke is an enigma wrapped up in a mystery.arikfunke is an enigma wrapped up in a mystery.arikfunke is an enigma wrapped up in a mystery.arikfunke is an enigma wrapped up in a mystery.arikfunke is an enigma wrapped up in a mystery.arikfunke is an enigma wrapped up in a mystery.arikfunke is an enigma wrapped up in a mystery.arikfunke is an enigma wrapped up in a mystery.
 
Posts: 36
Karma: 41848
Join Date: Mar 2011
Device: iRex
Thanks for the replies so far. The lipc events for screen rotation work perfectly.

From geekmaster's response I suspect that the eips command works just fine on my kindle but that my problem was that I need the framework to redraw its screen instead of just the framebuffer. - What is the correct lipc event for this?

Many thanks!
arikfunke is offline   Reply With Quote
Old 04-26-2012, 10:46 PM   #5
inameiname
Groupie
inameiname can self-interpret dreams as they happen.inameiname can self-interpret dreams as they happen.inameiname can self-interpret dreams as they happen.inameiname can self-interpret dreams as they happen.inameiname can self-interpret dreams as they happen.inameiname can self-interpret dreams as they happen.inameiname can self-interpret dreams as they happen.inameiname can self-interpret dreams as they happen.inameiname can self-interpret dreams as they happen.inameiname can self-interpret dreams as they happen.inameiname can self-interpret dreams as they happen.
 
Posts: 159
Karma: 20390
Join Date: Feb 2009
Device: none
Quote:
Originally Posted by arikfunke View Post
Thanks for the replies so far. The lipc events for screen rotation work perfectly.

From geekmaster's response I suspect that the eips command works just fine on my kindle but that my problem was that I need the framework to redraw its screen instead of just the framebuffer. - What is the correct lipc event for this?

Many thanks!
No problem. And I am also curious of your question to geekmaster as well.
inameiname is offline   Reply With Quote
Advert
Old 04-27-2012, 02:18 AM   #6
geekmaster
Carpe diem, c'est la vie.
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: 6,433
Karma: 10773668
Join Date: Nov 2011
Location: Multiverse 6627A
Device: K1 to PW3
Quote:
Originally Posted by inameiname View Post
No problem. And I am also curious of your question to geekmaster as well.
I do direct access to the framebuffer and input event devices. I have not studied the cvm stuff yet. Some of that is published in the forum, and some may be learned by studying startup scripts and and decompiled javascript. Some projects force keypress events to refresh the screen.

EDIT: My first forum search quickly found this:

lipc-send-event com.lab126.powerd.debug dbg_power_button_pressed

It "presses" the power button. Pressing it two times refreshes framework desktop display.



Last edited by geekmaster; 04-27-2012 at 02:25 AM.
geekmaster is offline   Reply With Quote
Old 04-28-2012, 04:44 AM   #7
inameiname
Groupie
inameiname can self-interpret dreams as they happen.inameiname can self-interpret dreams as they happen.inameiname can self-interpret dreams as they happen.inameiname can self-interpret dreams as they happen.inameiname can self-interpret dreams as they happen.inameiname can self-interpret dreams as they happen.inameiname can self-interpret dreams as they happen.inameiname can self-interpret dreams as they happen.inameiname can self-interpret dreams as they happen.inameiname can self-interpret dreams as they happen.inameiname can self-interpret dreams as they happen.
 
Posts: 159
Karma: 20390
Join Date: Feb 2009
Device: none
Quote:
Originally Posted by geekmaster View Post
I do direct access to the framebuffer and input event devices. I have not studied the cvm stuff yet. Some of that is published in the forum, and some may be learned by studying startup scripts and and decompiled javascript. Some projects force keypress events to refresh the screen.

EDIT: My first forum search quickly found this:

lipc-send-event com.lab126.powerd.debug dbg_power_button_pressed

It "presses" the power button. Pressing it two times refreshes framework desktop display.


Interesting....thanks for sharing.
inameiname is offline   Reply With Quote
Old 04-28-2012, 07:41 AM   #8
drauger
Enthusiast
drauger has every book they ever wanted in electronic form on their reader.drauger has every book they ever wanted in electronic form on their reader.drauger has every book they ever wanted in electronic form on their reader.drauger has every book they ever wanted in electronic form on their reader.drauger has every book they ever wanted in electronic form on their reader.drauger has every book they ever wanted in electronic form on their reader.drauger has every book they ever wanted in electronic form on their reader.drauger has every book they ever wanted in electronic form on their reader.drauger has every book they ever wanted in electronic form on their reader.drauger has every book they ever wanted in electronic form on their reader.drauger has every book they ever wanted in electronic form on their reader.
 
drauger's Avatar
 
Posts: 32
Karma: 46558
Join Date: Feb 2012
Device: Kindle4NT
Quote:
Originally Posted by geekmaster View Post
lipc-send-event com.lab126.powerd.debug dbg_power_button_pressed

It "presses" the power button. Pressing it two times refreshes framework desktop display.
What about lipc-send-event com.lab126.powerd.resuming 1?
drauger is offline   Reply With Quote
Old 04-28-2012, 10:43 AM   #9
geekmaster
Carpe diem, c'est la vie.
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: 6,433
Karma: 10773668
Join Date: Nov 2011
Location: Multiverse 6627A
Device: K1 to PW3
Quote:
Originally Posted by drauger View Post
What about lipc-send-event com.lab126.powerd.resuming 1?
Did you test that? It does not seem to do anything on my K4 when it is showing a screensaver. It does not seem to do anything on my K4 when it is showing a desktop. Did you TEST it? The command I showed actually works both in modes (awake and "asleep"), and there is a lipc "get" command to find out which mode you are in so you can conditionally press the power button only when needed.

On a related note, when asleep the kindles disable keyboard events EXCEPT that on the touch, the waitforkey command returns rotation event "key codes" even when the kindle is asleep. A practical use is to have a SIMPLE background task that calls "inotify" to wake on filesystem events, which would wake when "waitforkey" writes to /tmp (waitforkey >/tmp/key) and then send a power button press to wake up. Picking up your kindle would wake it...


Last edited by geekmaster; 04-28-2012 at 10:48 AM.
geekmaster 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
Hacking my Broken Screen Kindle 3 mpolo Kindle Developer's Corner 0 07-12-2011 05:02 PM
Can hacking the screen saver on the K3 get you black listed? undeliverable Amazon Kindle 5 01-05-2011 12:31 PM
hacking in? omro Astak EZReader 5 12-09-2009 05:59 PM
iLiad hacking the screen refresh cycle DHer iRex Developer's Corner 2 05-13-2008 03:07 PM


All times are GMT -4. The time now is 08:06 AM.


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