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 02-26-2012, 10:43 AM   #31
knc1
Helpdesk Junkie
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: 6,995
Karma: 6314536
Join Date: Feb 2012
Device: Too many.
Network access to /proc/?

If using the Netcat (nc) built into Busybox, you will need to adjust the following nc command to match its limitations.

Objective: Send strings via network to /proc/keypad
Kindle: Listen on all interfaces, using some port number of your choosing (12345)
Remote machine: Assume Kindle appears as 192.168.2.1 on that machines network

Using a full copy of Netcat (nc) and assuming you haven't blocked new UDP connections in the Kindle's iptables setup (that is, open your above choice of port for UDP, state:new).

On Kindle:
(Listen, IPv4, re-start a new connection, no DNS lookups, UDP)
nc -l -4 -k -n -u 12345 >/proc/keypad

On remote machine:
echo "send 104" > nc -4 -n -u 192.168.2.1:12345

The Kindle end will auto-restart its listening for the next connection when it finishes receiving the above UDP packet.
I.E: You don't have to repeat the Kindle nc command, it will continue until you kill it.

Embellish as desired.
Such as start the Kindle nc command "on demand" using inetd and inetd.conf (in which case you don't need the "-k" - inetd will take care of start/stop of nc).

Last edited by knc1; 02-26-2012 at 10:53 AM.
knc1 is offline   Reply With Quote
Old 02-26-2012, 05:34 PM   #32
nick-tech
Enthusiast
nick-tech can read ebooks with the screen turned offnick-tech can read ebooks with the screen turned offnick-tech can read ebooks with the screen turned offnick-tech can read ebooks with the screen turned offnick-tech can read ebooks with the screen turned offnick-tech can read ebooks with the screen turned offnick-tech can read ebooks with the screen turned offnick-tech can read ebooks with the screen turned offnick-tech can read ebooks with the screen turned offnick-tech can read ebooks with the screen turned offnick-tech can read ebooks with the screen turned off
 
Posts: 29
Karma: 97692
Join Date: Feb 2012
Device: kindle touch
Code:
arecord -c 1 -r 16000 -f S16_LE test.wav
gives pretty good results, I'm quite impressed by the quality of that microphone. Perhaps one day we'll have a skype app for the androidized kindle...
nick-tech is offline   Reply With Quote
Old 02-26-2012, 09:32 PM   #33
knc1
Helpdesk Junkie
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: 6,995
Karma: 6314536
Join Date: Feb 2012
Device: Too many.
Quote:
Originally Posted by knc1 View Post
If using the Netcat (nc) built into Busybox, you will need to adjust the following nc command to match its limitations.

Objective: Send strings via network to /proc/keypad
Kindle: Listen on all interfaces, using some port number of your choosing (12345)
Remote machine: Assume Kindle appears as 192.168.2.1 on that machines network

Using a full copy of Netcat (nc) and assuming you haven't blocked new UDP connections in the Kindle's iptables setup (that is, open your above choice of port for UDP, state:new).

On Kindle:
(Listen, IPv4, re-start a new connection, no DNS lookups, UDP)
nc -l -4 -k -n -u 12345 >/proc/keypad

On remote machine:
echo "send 104" > nc -4 -n -u 192.168.2.1:12345

The Kindle end will auto-restart its listening for the next connection when it finishes receiving the above UDP packet.
I.E: You don't have to repeat the Kindle nc command, it will continue until you kill it.

Embellish as desired.
Such as start the Kindle nc command "on demand" using inetd and inetd.conf (in which case you don't need the "-k" - inetd will take care of start/stop of nc).
I seem to be having trouble, following my own directions.
Some versions don't know about -4/-6 (IPv4 / IPv6 selection).

Note: You can test the two nc ends by "talking" over the local-loopback (127.0.0.1)
No need to trash up your Kindle until you get what you want working locally.
knc1 is offline   Reply With Quote
Old 02-27-2012, 09:24 AM   #34
Nyoxi
Connoisseur
Nyoxi can really shake a tail feather.Nyoxi can really shake a tail feather.Nyoxi can really shake a tail feather.Nyoxi can really shake a tail feather.Nyoxi can really shake a tail feather.Nyoxi can really shake a tail feather.Nyoxi can really shake a tail feather.Nyoxi can really shake a tail feather.Nyoxi can really shake a tail feather.Nyoxi can really shake a tail feather.Nyoxi can really shake a tail feather.
 
Posts: 55
Karma: 116549
Join Date: Jan 2012
Device: Kindle Touch
Quote:
Originally Posted by knc1 View Post
I seem to be having trouble, following my own directions.
Some versions don't know about -4/-6 (IPv4 / IPv6 selection).
Unfortunately there is a dozen of different netcat variants. But for the purposes of this thread anything should be good enough. Anyway if you find yourself compiling your own netcat somewhere you may as well consider using socat instead (much more powerful).
Nyoxi is offline   Reply With Quote
Old 10-07-2012, 01:05 PM   #35
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 bubnikv View Post
If you want a voice control on Kindle, why don't you do it on the Kindle itself.
The Kindle has a built in microphone, which is accessible on Kindle using the alsalib. Porting a simple phrase recognition software from Linux to Kindle is not a big deal. A good candidate may be

http://www.kiecza.net/daniel/linux/

Vojtech
libncurses4 (>= 4.2-3.1) required for this.
(sadly I have ncurses-5.9, so possibly some hackery required)

Thanks for the tip. I will put it on my list to try.

Last edited by twobob; 10-07-2012 at 01:13 PM. Reason: host-ncurses-5.9
twobob is offline   Reply With Quote
Old 10-07-2012, 02:36 PM   #36
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:
Ncurses library and header files
Pthreads library
OSS sound library (sys/soundcard.h)
Humph. sounds like a job for buildroot. Will move to other pile. : )
twobob is offline   Reply With Quote
Reply

Tags
accessibility, key-press, simulate, voice, voice-control

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Accessories DIY Kindle Cover djulian Amazon Kindle 11 02-26-2011 09:12 PM
iPad Enable voice control on iPad (jailbreak) scottjl Apple Devices 0 05-03-2010 07:17 PM
The Clerkenwell Presses ShortNCuddlyAm Writers' Corner 16 01-30-2010 07:21 PM
Free on Kindle - The Voice koland Deals, Freebies, and Resources (No Self-Promotion) 0 12-09-2009 03:06 PM
DIY Kindle Case EnginerdLisa Amazon Kindle 3 09-27-2008 11:56 PM


All times are GMT -4. The time now is 10:20 PM.


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