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 10-06-2012, 05:30 AM   #31
anonimo200
Enthusiast
anonimo200 knows what time it isanonimo200 knows what time it isanonimo200 knows what time it isanonimo200 knows what time it isanonimo200 knows what time it isanonimo200 knows what time it isanonimo200 knows what time it isanonimo200 knows what time it isanonimo200 knows what time it isanonimo200 knows what time it isanonimo200 knows what time it is
 
Posts: 36
Karma: 2438
Join Date: Dec 2011
Device: Kindle DXG
I did changed the codes.
It seems that when I press a key the "key" file is created in /tmp but it's always empty so probably that's why the script doesn't work (I'm guessing, I've no idea...)
By the way. In order to run the script I've to delete every lines in pageturn but

#!/bin/sh
echo $$ > /tmp/pageturn.pid
_FUNCTIONS=/etc/rc.d/functions
[ -f ${_FUNCTIONS} ] && . ${_FUNCTIONS}
while true; do
{
waitforkey > /tmp/key
case "$(cat /tmp/key)" in
"14 1")
next_page;;
"28 1")
prev_page;;
esac
}
done

If not, the key file is not created (nor pageturn.pid) When it runs, there are two pageturn.pid and a key file (empty) in tmp...
Thank you two

Edit: I run waitforkey in myts and ended rebooting the kindle (didn't know how to exit...)

Last edited by anonimo200; 10-06-2012 at 05:55 AM.
anonimo200 is offline   Reply With Quote
Old 10-06-2012, 10:53 AM   #32
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,070
Karma: 6789001
Join Date: Nov 2011
Location: Щедрость не имеет пределов.
Device: *.*
These PMs are relevant to this discussion, so I am reposting them publicly:
Quote:
Originally Posted by geekmaster
Quote:
Originally Posted by anonimo200
Good morning geekmaster. In the past I was unable to enter debug mode in the kindle's command line and you explained me that I had to use `instead of ' and it worked. Now I've a replacement kindle and any of them work, I've to use ;debugOn and then `help to show the private shortcuts. I'm having problems with myts and pageturn because of the keymaps (I think), and I'm unable to run waitforkey (with ; or `nothing happens). How can I know my kindle keymap? and why debug mode works now with ; and not with `? Should I reset to factory? Software version is the same, 2.5.8
Thank you once again for your help and regards
The "waitforkey" command is a linux command that you type at an SSH prompt at the linux command line in the kindle. It is not a searchbar shortcut command. You need to install USBnetwork from NiLuJe.
Quote:
Originally Posted by geekmaster
Quote:
Originally Posted by anonimo200
Strange. I run waitforkey in ssh and press kindle's keys. Home returns 98 when 102 is expected, and Back 91 instead of 158...
Okay, you have waitforkey running.

The keycode number might depend on your firmware versions (2.x or 3.x) because keycodes are logical values assigned in firmware and the 3.x firmware was designed for a K3.

Whatever codes you see from waitforkey are what you need to use to read that key in a script or program.
Quote:
Originally Posted by geekmaster
Quote:
Originally Posted by anonimo200
Ok, please, forget all about that... probably I run debug mode with ;debugOn and had problems running `help, it's a long time since I didn't enter debug mode...
I'll post in pageturn topic and try to solve it :-)
geekmaster, thanks for all your help and sorry for bothering you with noob's nonsenses
What are you trying to do in the search bar shortcuts? Just like keycodes, the shortcut commands depend on firmware versions, and 3.x firmware will use the same commands whether on a DXG or a K3.

2.x firmware uses backtab '`' and 3.x firmware uses tilde '~'. So, `help is for 2.x on a DXG, and ~help is for 3.x on a K3 or a DXG. As far as I know, because I have not tested it...
Now others who wish to give advice have the same information that I have.
geekmaster is offline   Reply With Quote
Old 10-06-2012, 12:03 PM   #33
anonimo200
Enthusiast
anonimo200 knows what time it isanonimo200 knows what time it isanonimo200 knows what time it isanonimo200 knows what time it isanonimo200 knows what time it isanonimo200 knows what time it isanonimo200 knows what time it isanonimo200 knows what time it isanonimo200 knows what time it isanonimo200 knows what time it isanonimo200 knows what time it is
 
Posts: 36
Karma: 2438
Join Date: Dec 2011
Device: Kindle DXG
Thank you geekmaster. Sumarizing: I'm trying to make pageturn work so tried "waitforkey" in the kindle's search bar (missundertood you) Then, when trying to access debug mode, I was unable with `debugOn but could enter with ;debugOn (separate question...) In fact it's a long time since I don't use debugOn so probably it has worked always with ;debugOn not `debugOn and I used ` to run commands. Ok, all this is a different vortex I got into so let's forget it :-)

Once I was able to run waitforkey using ssh, the key codes I got were not the same you can see in myts (althought they are the same as launchpad) so I spent some more time trying to guess what happened. In the end I remembered I'd to add something else to myts' keydefs.ini to make DXG work. Second vortex. Survived too...

Present situation: pageturn doesn't yet work; it creates "key" (empty) file in /tmp when pressing the mapped key but does nothing.

I'm sorry for disturbing you, they all are problems related with my absolute and deep ignorance... I hope you (and the rest of the members) will forgive me for being so a pain in the ***

Regads and "Long live and prosperity"
anonimo200 is offline   Reply With Quote
Old 10-06-2012, 02:04 PM   #34
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: 5,241
Karma: 5164853
Join Date: Jun 2010
Location: Paris, France
Device: Kindle 2i, 3g, 4, 5w, PW & PW2; Kobo H2O
The ` to ~ switch since FW 3.x only applies to *private* commands. Public commands (debugOn being one of those, as is help, IIRC) always use ;
NiLuJe is offline   Reply With Quote
Old 10-06-2012, 02:32 PM   #35
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,070
Karma: 6789001
Join Date: Nov 2011
Location: Щедрость не имеет пределов.
Device: *.*
Quote:
Originally Posted by NiLuJe View Post
The ` to ~ switch since FW 3.x only applies to *private* commands. Public commands (debugOn being one of those, as is help, IIRC) always use ;
Ahh, so my example used the wrong command. Thanks for correcting that.
geekmaster is offline   Reply With Quote
Old 10-17-2012, 02:24 PM   #36
anonimo200
Enthusiast
anonimo200 knows what time it isanonimo200 knows what time it isanonimo200 knows what time it isanonimo200 knows what time it isanonimo200 knows what time it isanonimo200 knows what time it isanonimo200 knows what time it isanonimo200 knows what time it isanonimo200 knows what time it isanonimo200 knows what time it isanonimo200 knows what time it is
 
Posts: 36
Karma: 2438
Join Date: Dec 2011
Device: Kindle DXG
Ok, I keep on trying... this time I "sshed", copied the script and pasted it. The system waits for the key press and it it's any of the two which codes I used in the script it says "next_page not found" or "prev_page" not found:

-sh: next_page: not found
-sh: next_page: not found
-sh: prev_page: not found
-sh: prev_page: not found

Any help anyone?
Thanks
anonimo200 is offline   Reply With Quote
Old 10-17-2012, 02:37 PM   #37
twobob
( ͡° ͜ʖ ͡°){ʇlnɐɟ ƃǝs}Tır
twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.
 
twobob's Avatar
 
Posts: 6,552
Karma: 6021146
Join Date: Jun 2012
Location: uti gratia usura (Yao ying da ying; Mo ying da yieng)
Device: PW-WIFI|K5-3G+WIFI| K4|K3-3G|DXG|K2| Rooted Nook Touch
looks like it is trying to launch the app "next_page" did you mean next_page() or something
twobob is offline   Reply With Quote
Old 10-17-2012, 02:41 PM   #38
anonimo200
Enthusiast
anonimo200 knows what time it isanonimo200 knows what time it isanonimo200 knows what time it isanonimo200 knows what time it isanonimo200 knows what time it isanonimo200 knows what time it isanonimo200 knows what time it isanonimo200 knows what time it isanonimo200 knows what time it isanonimo200 knows what time it isanonimo200 knows what time it is
 
Posts: 36
Karma: 2438
Join Date: Dec 2011
Device: Kindle DXG
I'm just pasting the content of pageturn file:

echo $$ > /tmp/pageturn.pid
_FUNCTIONS=/etc/rc.d/functions
[ -f ${_FUNCTIONS} ] && . ${_FUNCTIONS}
#big loop
while true; do
{
#write input to temporary file
waitforkey > /tmp/key
#read which key was pressed
case "$(cat /tmp/key)" in
"46 1")
next_page;;
"28 1")
prev_page;;
esac
}
done

Thank you twobob
anonimo200 is offline   Reply With Quote
Old 10-17-2012, 02:45 PM   #39
twobob
( ͡° ͜ʖ ͡°){ʇlnɐɟ ƃǝs}Tır
twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.
 
twobob's Avatar
 
Posts: 6,552
Karma: 6021146
Join Date: Jun 2012
Location: uti gratia usura (Yao ying da ying; Mo ying da yieng)
Device: PW-WIFI|K5-3G+WIFI| K4|K3-3G|DXG|K2| Rooted Nook Touch
well. from my reading of that.

I suggest you test the actual "Turn the page" function works without all the wrapping. (on the DX)

once you have that syntax working (Turn page from command line) then you have the rest of the script.


it's precompiled

Last edited by twobob; 10-17-2012 at 03:32 PM.
twobob is offline   Reply With Quote
Old 10-17-2012, 02:48 PM   #40
anonimo200
Enthusiast
anonimo200 knows what time it isanonimo200 knows what time it isanonimo200 knows what time it isanonimo200 knows what time it isanonimo200 knows what time it isanonimo200 knows what time it isanonimo200 knows what time it isanonimo200 knows what time it isanonimo200 knows what time it isanonimo200 knows what time it isanonimo200 knows what time it is
 
Posts: 36
Karma: 2438
Join Date: Dec 2011
Device: Kindle DXG
Ok, how can I do that? I enter by ssh, try "next_page" and gives me an error (I don't remember exactly what it says...)
anonimo200 is offline   Reply With Quote
Old 10-17-2012, 03:19 PM   #41
twobob
( ͡° ͜ʖ ͡°){ʇlnɐɟ ƃǝs}Tır
twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.
 
twobob's Avatar
 
Posts: 6,552
Karma: 6021146
Join Date: Jun 2012
Location: uti gratia usura (Yao ying da ying; Mo ying da yieng)
Device: PW-WIFI|K5-3G+WIFI| K4|K3-3G|DXG|K2| Rooted Nook Touch
it says the same error. I will bet. the "scripting to keys" bit is secondary.

you need to find out how the "Page Turn" invocation works. *ah cripes* I'll read the top post BRB...


EDIT: Hmm, it's precompiled. guess I would have to test it on a DX.

strace -fF -o /mnt/us/Documents/straceOutput.txt /mnt/us/pageturn/pageturn
via ssh

and then do some stuff.

then read the output? might not hurt. assuming you have a strace for your DX...
Other than that I am out of ideas. could be that the implementation on the DX is slightly different enough to make it not work.

I would have to check. apologies can't help further right now. I don't see any obvious errors. DPavlin posted some DX keycodes but they wont fix a non-working app.

Are there any DX success reports with this app?

Last edited by twobob; 10-17-2012 at 03:32 PM.
twobob is offline   Reply With Quote
Old 10-17-2012, 03:27 PM   #42
anonimo200
Enthusiast
anonimo200 knows what time it isanonimo200 knows what time it isanonimo200 knows what time it isanonimo200 knows what time it isanonimo200 knows what time it isanonimo200 knows what time it isanonimo200 knows what time it isanonimo200 knows what time it isanonimo200 knows what time it isanonimo200 knows what time it isanonimo200 knows what time it is
 
Posts: 36
Karma: 2438
Join Date: Dec 2011
Device: Kindle DXG
... I'm completely lost... Tell where do I have to start reading and I'll, I promise.
Thank you again twobob. I'm afraid I can't give you karma before giving to someone else...
anonimo200 is offline   Reply With Quote
Old 10-17-2012, 03:34 PM   #43
twobob
( ͡° ͜ʖ ͡°){ʇlnɐɟ ƃǝs}Tır
twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.
 
twobob's Avatar
 
Posts: 6,552
Karma: 6021146
Join Date: Jun 2012
Location: uti gratia usura (Yao ying da ying; Mo ying da yieng)
Device: PW-WIFI|K5-3G+WIFI| K4|K3-3G|DXG|K2| Rooted Nook Touch
Quote:
Originally Posted by anonimo200 View Post
... I'm completely lost... Tell where do I have to start reading and I'll, I promise.
Thank you again twobob. I'm afraid I can't give you karma before giving to someone else...
Honestly. I would try to find someone with a DX. and ask them to check your findings.
twobob is offline   Reply With Quote
Old 10-17-2012, 03:38 PM   #44
anonimo200
Enthusiast
anonimo200 knows what time it isanonimo200 knows what time it isanonimo200 knows what time it isanonimo200 knows what time it isanonimo200 knows what time it isanonimo200 knows what time it isanonimo200 knows what time it isanonimo200 knows what time it isanonimo200 knows what time it isanonimo200 knows what time it isanonimo200 knows what time it is
 
Posts: 36
Karma: 2438
Join Date: Dec 2011
Device: Kindle DXG
Thank you twobob. I really apreciate your help.

http://www.kewego.es/video/iLyROoafzo3K.html

:-)
anonimo200 is offline   Reply With Quote
Old 10-17-2012, 03:54 PM   #45
twobob
( ͡° ͜ʖ ͡°){ʇlnɐɟ ƃǝs}Tır
twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.
 
twobob's Avatar
 
Posts: 6,552
Karma: 6021146
Join Date: Jun 2012
Location: uti gratia usura (Yao ying da ying; Mo ying da yieng)
Device: PW-WIFI|K5-3G+WIFI| K4|K3-3G|DXG|K2| Rooted Nook Touch
Quote:
Originally Posted by anonimo200 View Post
Thank you twobob. I really apreciate your help.

http://www.kewego.es/video/iLyROoafzo3K.html

:-)
10/10 , got my vote.

I DO have a DX but not here right now.

I could test this if you can wait a bit.

Anything for a fellow musician
twobob 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
5-way button for page turning bosie Amazon Kindle 5 04-28-2011 10:53 AM
Right button (next page) not always responding andrewcrlucas Kobo Reader 28 07-16-2010 12:03 PM
Request Continuous (PAN and Next Page) Mode with the Next Page button AnuragSethi enTourage Archive 4 06-18-2010 05:25 PM
Next page button pushed in too far? jurat Amazon Kindle 5 06-02-2010 04:59 AM
Wierd page up/down button dcubed2 enTourage Archive 9 05-04-2010 01:19 PM


All times are GMT -4. The time now is 04:07 AM.


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