Register Guidelines E-Books Today's Posts Search

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

Notices

Reply
 
Thread Tools Search this Thread
Old 07-15-2012, 12:33 PM   #16
inuxy
Junior Member
inuxy began at the beginning.
 
Posts: 8
Karma: 12
Join Date: Jul 2012
Device: kindle touch
Quote:
Originally Posted by geekmaster View Post
Does waitforkey return a keycode for headphone events on your K3?

Because waitforkey does WAIT for an event, I ran it in a background loop and piped its output to a temp file. Then a foreground script could periodically check that file to see if any new keycodes had been generated.

Firmware 5.0.x also returned rotation events for waitforkey. Perhaps 5.1.0 removed headphone events too, when they removed accelerometer events.

UPDATE: I just tested this from K5 diags SSH, and waitforkey DOES return headphone keycodes (insert=60 remove=59). It is not reliably seeing all events though (but my headphone jack seems "loose and sloppy" so maybe the switch is not working right). I used to test my scripts in diags because it has a lot more free ram than main with cvm and Xorg running.
How did you finally get the events, and are they available in kindle normal mode?
inuxy is offline   Reply With Quote
Old 07-15-2012, 12:55 PM   #17
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 inuxy View Post
How did you finally get the events, and are they available in kindle normal mode?
Only working on K5 diags for now... There are probably other ways to get them (perhaps from a log file, if nothing else).
geekmaster is offline   Reply With Quote
Old 07-15-2012, 02:08 PM   #18
MaPePeR
Connoisseur
MaPePeR can shake the floor when laughingMaPePeR can shake the floor when laughingMaPePeR can shake the floor when laughingMaPePeR can shake the floor when laughingMaPePeR can shake the floor when laughingMaPePeR can shake the floor when laughingMaPePeR can shake the floor when laughingMaPePeR can shake the floor when laughingMaPePeR can shake the floor when laughingMaPePeR can shake the floor when laughingMaPePeR can shake the floor when laughing
 
Posts: 58
Karma: 63518
Join Date: Apr 2012
Device: KT
maybe lipc has a event for that?
MaPePeR is offline   Reply With Quote
Old 08-27-2012, 11:57 AM   #19
chris_c
Member Retired
chris_c can bend spoons with a thought.chris_c can bend spoons with a thought.chris_c can bend spoons with a thought.chris_c can bend spoons with a thought.chris_c can bend spoons with a thought.chris_c can bend spoons with a thought.chris_c can bend spoons with a thought.chris_c can bend spoons with a thought.chris_c can bend spoons with a thought.chris_c can bend spoons with a thought.chris_c can bend spoons with a thought.
 
Posts: 38
Karma: 134108
Join Date: Aug 2012
Device: kindle touch
does anyone know the wiring for the earphone jack as i think it includes a mic connection, we could then listen for tones.

My phone ear/mic uses rest of the world wiring and doesnt work
when using the apple wiring adaptor for my headset the headphones seem to work but i think one of the ear pieces is acting like a mic when I use arecord

anyhow my idea for using my K5 in the bath is a small micro controller with real switches that can be activated through a water proof case.
the mC would send "tones" meaning page back and so forth.

is there any inter-process communications with the framework?

I suppose a touch event could be injected into the xorg event system, but does the framework use it?

really would like to be able to use my K5 in the bath!
chris_c is offline   Reply With Quote
Old 08-27-2012, 12:05 PM   #20
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 chris_c View Post
does anyone know the wiring for the earphone jack as i think it includes a mic connection, we could then listen for tones.

My phone ear/mic uses rest of the world wiring and doesnt work
when using the apple wiring adaptor for my headset the headphones seem to work but i think one of the ear pieces is acting like a mic when I use arecord

anyhow my idea for using my K5 in the bath is a small micro controller with real switches that can be activated through a water proof case.
the mC would send "tones" meaning page back and so forth.

is there any inter-process communications with the framework?

I suppose a touch event could be injected into the xorg event system, but does the framework use it?

really would like to be able to use my K5 in the bath!
The microphone is behind a small rectangular opening next to the USB port. The headpone jack is for stereo headphones, not for a mic/earphone headset.

There is now a USB host stack for some microcontrollers, which could see the kindle as a USB device, and send it commands. Or you could just wire remote switches across the kindle internal prev-page and next-page switches and skip the microcontroller.

Last edited by geekmaster; 08-27-2012 at 12:08 PM.
geekmaster is offline   Reply With Quote
Old 08-27-2012, 12:07 PM   #21
chris_c
Member Retired
chris_c can bend spoons with a thought.chris_c can bend spoons with a thought.chris_c can bend spoons with a thought.chris_c can bend spoons with a thought.chris_c can bend spoons with a thought.chris_c can bend spoons with a thought.chris_c can bend spoons with a thought.chris_c can bend spoons with a thought.chris_c can bend spoons with a thought.chris_c can bend spoons with a thought.chris_c can bend spoons with a thought.
 
Posts: 38
Karma: 134108
Join Date: Aug 2012
Device: kindle touch
are you absolutely *sure* about that? i know there is a mic by the usb port but my kindle was under the duvet when i tried the recording tests.

is there a definitive wiring diagram for the headphone socket?
chris_c is offline   Reply With Quote
Old 08-27-2012, 12:19 PM   #22
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 chris_c View Post
are you absolutely *sure* about that? i know there is a mic by the usb port but my kindle was under the duvet when i tried the recording tests.

is there a definitive wiring diagram for the headphone socket?
I am never ABSOLUTELY sure of anything. All of my beliefs are subject to change if I discover compelling evidence that requires it. Speaking or believing in absolutes is often risky, especially when you do not allow new facts to interfere with your beliefs.

After all, it is possible that a production change could be made at some point to add such a feature as a remote microphone.

But my current knowledge based on eink kindle product specifications suggests that the earphone jack only supports 3-wire cables as used for stereo headphones and earbuds, but NOT the 4-wire cables like are used for stereo headsets with microphone, such as for apple products.

EDIT: Empirical/ad-hoc "evidence" such as your "under the duvet" claim do not rule out the possibility that the built-in kindle microphone (with AGC) may be sensitive enough to record your voice while speaking into the headset. Such evidence is no more reliable than other "small statistical sample" conclusions.

References:
Apple 4-pin pinout: https://discussions.apple.com/thread...art=0&tstart=0
Kindle Touch specs "3.5 mm stereo audio jack": http://www.amazon.com/gp/product/B005890G8Y
Standard 3.5 mm stereo pinout: http://pinouts.ru/connector/3_pin_st...onnector.shtml

If you have conclusive evidence to the contrary, I am anxious to see it so that I can have the opportunity to update my personal knowledge base. Please provides links and references. Thanks.

Last edited by geekmaster; 08-27-2012 at 12:37 PM.
geekmaster is offline   Reply With Quote
Old 08-27-2012, 12:20 PM   #23
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
None known.
Here is your chance to get out a very bright light, a magnifing glass and a camera to make the first one.

(The bright light is because the layers are thin enough you can actually see trace shadows from several layer deep.)
knc1 is offline   Reply With Quote
Old 08-27-2012, 12:23 PM   #24
chris_c
Member Retired
chris_c can bend spoons with a thought.chris_c can bend spoons with a thought.chris_c can bend spoons with a thought.chris_c can bend spoons with a thought.chris_c can bend spoons with a thought.chris_c can bend spoons with a thought.chris_c can bend spoons with a thought.chris_c can bend spoons with a thought.chris_c can bend spoons with a thought.chris_c can bend spoons with a thought.chris_c can bend spoons with a thought.
 
Posts: 38
Karma: 134108
Join Date: Aug 2012
Device: kindle touch
i have a micro controller that I can program to emulate a usb keyboard , is the usb OTG known to work for sure or is it still just in theory....
chris_c is offline   Reply With Quote
Old 08-27-2012, 12:28 PM   #25
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
No one has yet posted a "complete solution" - but there is a lot of interest, I assume it is a "work in progress" at the home of many of the members.
knc1 is offline   Reply With Quote
Old 08-27-2012, 12:31 PM   #26
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
You could also just ssh into the machine with an immediate command to be executed.
I.E: ssh also has all the functions of rsh.
It does not have to be used inter-actively.
knc1 is offline   Reply With Quote
Old 08-27-2012, 12:34 PM   #27
chris_c
Member Retired
chris_c can bend spoons with a thought.chris_c can bend spoons with a thought.chris_c can bend spoons with a thought.chris_c can bend spoons with a thought.chris_c can bend spoons with a thought.chris_c can bend spoons with a thought.chris_c can bend spoons with a thought.chris_c can bend spoons with a thought.chris_c can bend spoons with a thought.chris_c can bend spoons with a thought.chris_c can bend spoons with a thought.
 
Posts: 38
Karma: 134108
Join Date: Aug 2012
Device: kindle touch
hmm using ssh, how would that be useful from the bath.... ???
chris_c is offline   Reply With Quote
Old 08-27-2012, 12:39 PM   #28
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 chris_c View Post
i have a micro controller that I can program to emulate a usb keyboard , is the usb OTG known to work for sure or is it still just in theory....
It is known to work on the Nook Simple Touch, which uses similar hardware. The NST project may be a good starting point for a kindle port.

If you could get the USB host stack working on your microcontroller so it can act as a host PC, it would be fairly trivial to connect to the kindle using the USB serial gadget, with no need to wait for USB OTG on the kindle.

You can also remote-control your kindle over wifi, so no USB cable needed.

Or, if the goal is a "bathtub ereader", put your kindle in a ziplock bag and press the buttons through the plastic.

Last edited by geekmaster; 08-27-2012 at 12:43 PM.
geekmaster is offline   Reply With Quote
Old 08-27-2012, 02:09 PM   #29
chris_c
Member Retired
chris_c can bend spoons with a thought.chris_c can bend spoons with a thought.chris_c can bend spoons with a thought.chris_c can bend spoons with a thought.chris_c can bend spoons with a thought.chris_c can bend spoons with a thought.chris_c can bend spoons with a thought.chris_c can bend spoons with a thought.chris_c can bend spoons with a thought.chris_c can bend spoons with a thought.chris_c can bend spoons with a thought.
 
Posts: 38
Karma: 134108
Join Date: Aug 2012
Device: kindle touch
unfortunately injecting X11 mouse events doesn't seem to work

not only that but the framework becomes unresponsive

possible this is due to the mouse click giving some other (hidden) window the focus, I'm going to iterate through window titles and see if I can find which I think is the framework window and give that focus first....

anyone else got any equally mad ideas
chris_c is offline   Reply With Quote
Old 08-27-2012, 02:17 PM   #30
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
I just tried a ziplock bag. It messes up the infrared light path and creates false touches. That plastic bag idea did not work for the kindle touch, but should be fine for non-touch kindles. You would need a stiff clear plastic cover over the front of the K5 before putting it in the bag, in which case a non-touch solution would be needed, like you are looking for. Perhaps some kind of "pulse code" presses on the K5 Home button (simpler than Morse code)?
geekmaster is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
[KT]Turn store button on search bar to browser button aditya3098 Kindle Developer's Corner 74 05-19-2017 08:33 PM
DIY Kindle voice control (simulating key presses) Acorn Kindle Developer's Corner 35 10-07-2012 01:36 PM
Filling a memory card externally to the reader lininjim Sony Reader 4 10-27-2011 08:21 PM
DR800 updating metadata externally Mr. X iRex 7 04-10-2010 12:14 PM
The Clerkenwell Presses ShortNCuddlyAm Writers' Corner 16 01-30-2010 06:21 PM


All times are GMT -4. The time now is 10:13 AM.


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