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 08-17-2016, 11:59 AM   #46
Yourcat
Groupie
Yourcat knows the way to San Jose.Yourcat knows the way to San Jose.Yourcat knows the way to San Jose.Yourcat knows the way to San Jose.Yourcat knows the way to San Jose.Yourcat knows the way to San Jose.Yourcat knows the way to San Jose.Yourcat knows the way to San Jose.Yourcat knows the way to San Jose.Yourcat knows the way to San Jose.Yourcat knows the way to San Jose.
 
Posts: 175
Karma: 54048
Join Date: Mar 2016
Device: PW3 5.6.5-usbnet
A KUAL extension is a 'standard' package so the idea is fine. If one really wants to use a Kindle with a broken touch screen following the manual instructions shouldn't be too hard. A u-dev rule would be indeed nice. I hope that it's easy to implement.
Yourcat is offline   Reply With Quote
Old 08-17-2016, 12:16 PM   #47
knc1
99.44/100% On Holiday
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,176
Karma: 18200597
Join Date: Feb 2012
Location: Central Texas
Device: No K1, PW2, KV, KOA
Quote:
Originally Posted by Yourcat View Post
A KUAL extension is a 'standard' package so the idea is fine. If one really wants to use a Kindle with a broken touch screen following the manual instructions shouldn't be too hard. A u-dev rule would be indeed nice. I hope that it's easy to implement.
Since you made a KUAL extension, you probably have a script already written to do the setp -
Just call that script from your new custom u-dev rule.
knc1 is offline   Reply With Quote
Advert
Old 08-17-2016, 12:46 PM   #48
coplate
Guru
coplate ought to be getting tired of karma fortunes by now.coplate ought to be getting tired of karma fortunes by now.coplate ought to be getting tired of karma fortunes by now.coplate ought to be getting tired of karma fortunes by now.coplate ought to be getting tired of karma fortunes by now.coplate ought to be getting tired of karma fortunes by now.coplate ought to be getting tired of karma fortunes by now.coplate ought to be getting tired of karma fortunes by now.coplate ought to be getting tired of karma fortunes by now.coplate ought to be getting tired of karma fortunes by now.coplate ought to be getting tired of karma fortunes by now.
 
Posts: 634
Karma: 1512746
Join Date: Jun 2009
Device: prs-505, Kindle Keyboard 3g, PW3
Quote:
Originally Posted by knc1 View Post
...
How does someone use a KUAL extension to install the external mouse handler when the touch screen isn't working?...
Why not add a u-dev rule that installs the external mouse handler when the external mouse is plugged in?

yeah, In hindsight that didn't make a lot of sense.

Right now i'm at the point where my script
Loads the .ko modules
mount --bind to a custom makexconf and cursor
restart x

I have seperately my program that refreshes the cursor on the screen that needs to run as a daemon ( its not daemonized yet )

I was next going to try to use /dev/uniput to create a "mouse" thats active wether or not an actual mouse is connected.

This is becuase xorg.conf apparenlty cannot respect hotplugging evdev devices, it needs to have /dev/input/eventX thats active at the time it is restarted. And if you ever unplug it, you need to restart x after its plugged in again. the PW implementation alo won't load the "mouse" driver, to use '/dev/input/mice'.

The idea there being that the daemon 'pointer.c' would be able to detect a real mouse plugged unplugged and clone all the events into /dev/uinput, opened up, so that whenever the daemon is running, there will be a mouse, it just won't generate events unless an actual mouse is plugged in.

( I dont want to force an x restart every time the mouse is plugged in )


leading to a final script that looks like:

load hid.ko and friends
start daemon with
bind makexconf and cursor ( based on device - or patch makexconf instead of harcoding )
restart x


for the cloning, this code might be something to look at,
https://github.com/MerlijnWajer/uinp...master/c/map.c

Does anyone have any good info on udev, where rules live on the kindle or otherwise?


The refreshing program is based on xrefresh.c: http://opensource.apple.com//source/...0.2/xrefresh.c

Mixed with a program called hhpc: https://github.com/aktau/hhpc/blob/master/hhpc.c

From hhpc I took the code that eavesdrops on all mouse movemnt events, and then passes them along to where they should go.

From xfrefresh I took the actual refresh part - open a transparent window over the whole screen, which will redraw the mouse ( when I had it only drawing over the cursor location, it would leave multiple cursors )

Last edited by coplate; 08-17-2016 at 03:04 PM.
coplate is offline   Reply With Quote
Old 08-17-2016, 02:34 PM   #49
lucida
Enthusiast
lucida 's ceiling is 100% spider-free.lucida 's ceiling is 100% spider-free.lucida 's ceiling is 100% spider-free.lucida 's ceiling is 100% spider-free.lucida 's ceiling is 100% spider-free.lucida 's ceiling is 100% spider-free.lucida 's ceiling is 100% spider-free.lucida 's ceiling is 100% spider-free.lucida 's ceiling is 100% spider-free.lucida 's ceiling is 100% spider-free.lucida 's ceiling is 100% spider-free.
 
Posts: 30
Karma: 118906
Join Date: Jul 2016
Device: PW3
Quote:
Originally Posted by coplate View Post

for the cloning, this code might be something to look at,
https://github.com/MerlijnWajer/uinp...master/c/map.c

Does anyone have any good info on udev, where rules live on the kindle or otherwise?

Check this code for generating uinput from input_event.

http://www.linux.it/~rubini/docs/inp...udpmouse-get.c


kindle's udev rules are in:
/etc/udev/rules.d
lucida is offline   Reply With Quote
Old 08-17-2016, 02:39 PM   #50
lucida
Enthusiast
lucida 's ceiling is 100% spider-free.lucida 's ceiling is 100% spider-free.lucida 's ceiling is 100% spider-free.lucida 's ceiling is 100% spider-free.lucida 's ceiling is 100% spider-free.lucida 's ceiling is 100% spider-free.lucida 's ceiling is 100% spider-free.lucida 's ceiling is 100% spider-free.lucida 's ceiling is 100% spider-free.lucida 's ceiling is 100% spider-free.lucida 's ceiling is 100% spider-free.
 
Posts: 30
Karma: 118906
Join Date: Jul 2016
Device: PW3
/dev/input/mice is not working because the required driver(mouse_drv.so) is missing in kindle

/usr/lib/xorg/modules/input/


Maybe build one and put to kindle? seems easier than the daemon approach.
lucida is offline   Reply With Quote
Advert
Old 08-17-2016, 02:59 PM   #51
coplate
Guru
coplate ought to be getting tired of karma fortunes by now.coplate ought to be getting tired of karma fortunes by now.coplate ought to be getting tired of karma fortunes by now.coplate ought to be getting tired of karma fortunes by now.coplate ought to be getting tired of karma fortunes by now.coplate ought to be getting tired of karma fortunes by now.coplate ought to be getting tired of karma fortunes by now.coplate ought to be getting tired of karma fortunes by now.coplate ought to be getting tired of karma fortunes by now.coplate ought to be getting tired of karma fortunes by now.coplate ought to be getting tired of karma fortunes by now.
 
Posts: 634
Karma: 1512746
Join Date: Jun 2009
Device: prs-505, Kindle Keyboard 3g, PW3
Quote:
Originally Posted by lucida View Post
/dev/input/mice is not working because the required driver(mouse_drv.so) is missing in kindle

/usr/lib/xorg/modules/input/


Maybe build one and put to kindle? seems easier than the daemon approach.
What I meant by this is - if you try to set up xorg.conf with a configuration entry of type "mouse", instead of "evdev", the log states

"<some thing I can't remember from memory but is like AllowEmptyDevices is turned on>" - "Disableing drivers of "keyboard and mouse"

And when I turned that on, it also said another message, and disabled the drivers of "keyboard" and "mouse." I can get the full error messages tonight.

but they could be because the xorg drivers don't exist, yeah.

This daemon could make the keyboard work to, since there's no match for /dev/input/keyboards like there is /dev/input/mice

Last edited by coplate; 08-17-2016 at 03:02 PM.
coplate is offline   Reply With Quote
Old 08-17-2016, 07:50 PM   #52
coplate
Guru
coplate ought to be getting tired of karma fortunes by now.coplate ought to be getting tired of karma fortunes by now.coplate ought to be getting tired of karma fortunes by now.coplate ought to be getting tired of karma fortunes by now.coplate ought to be getting tired of karma fortunes by now.coplate ought to be getting tired of karma fortunes by now.coplate ought to be getting tired of karma fortunes by now.coplate ought to be getting tired of karma fortunes by now.coplate ought to be getting tired of karma fortunes by now.coplate ought to be getting tired of karma fortunes by now.coplate ought to be getting tired of karma fortunes by now.
 
Posts: 634
Karma: 1512746
Join Date: Jun 2009
Device: prs-505, Kindle Keyboard 3g, PW3
Quote:
Originally Posted by geekmaster View Post
Thanks. That should help me get unstuck when doing testing where I need menu access when the touchscreen is acting up.
Here you go, give this a try:
in mouse.sh, go ahead and adjust your paths.

And if you need to, adjust your makexconfig to have the touchscreen from your kindle if it is different.

Also in makexconfig, the mouse is hardcoded to /dev/input/event3 - because I have a keyboard/mouse combo, and the keyboard mounts first, so if you have a mouse only, you may need to change that to event2

the source is in here, the tweaks to be made are the size of the refresh window ( default full screen ), and the refresh frequency ( right now, after all mouse events are consumed )
Attached Files
File Type: zip cursor2.zip (83.2 KB, 85 views)
coplate is offline   Reply With Quote
Old 08-18-2016, 04:31 AM   #53
encol
Addict
encol ought to be getting tired of karma fortunes by now.encol ought to be getting tired of karma fortunes by now.encol ought to be getting tired of karma fortunes by now.encol ought to be getting tired of karma fortunes by now.encol ought to be getting tired of karma fortunes by now.encol ought to be getting tired of karma fortunes by now.encol ought to be getting tired of karma fortunes by now.encol ought to be getting tired of karma fortunes by now.encol ought to be getting tired of karma fortunes by now.encol ought to be getting tired of karma fortunes by now.encol ought to be getting tired of karma fortunes by now.
 
Posts: 394
Karma: 750286
Join Date: Apr 2016
Location: Italy
Device: Kindle PW3 5.8.5.0.1
Nice work!
Thanks for sharing
encol is offline   Reply With Quote
Old 08-18-2016, 05:23 AM   #54
glasnost
Connoisseur
glasnost with a running start, can leap into geosynchronous orbitglasnost with a running start, can leap into geosynchronous orbitglasnost with a running start, can leap into geosynchronous orbitglasnost with a running start, can leap into geosynchronous orbitglasnost with a running start, can leap into geosynchronous orbitglasnost with a running start, can leap into geosynchronous orbitglasnost with a running start, can leap into geosynchronous orbitglasnost with a running start, can leap into geosynchronous orbitglasnost with a running start, can leap into geosynchronous orbitglasnost with a running start, can leap into geosynchronous orbitglasnost with a running start, can leap into geosynchronous orbit
 
Posts: 54
Karma: 60222
Join Date: Aug 2016
Device: PW3, Kobo Aura H2O
Thumbs up

Quote:
Originally Posted by coplate View Post
I'm going to plug in a real keyboard, and check page up etc, that my handheld one doesn't have.
You are my hero :-) I am following this thread with bated breath. Now to find an old wired keyboard lying around (and figure out why my battery keeps shutting off when connected to the otg hub.)

My hope is to connect the keyboard so I can use the kindle as a low power writing source in the sun. Thank you for pursuing this project and I hope to help contribute once I find that last wire...
glasnost is offline   Reply With Quote
Old 08-19-2016, 08:52 PM   #55
coplate
Guru
coplate ought to be getting tired of karma fortunes by now.coplate ought to be getting tired of karma fortunes by now.coplate ought to be getting tired of karma fortunes by now.coplate ought to be getting tired of karma fortunes by now.coplate ought to be getting tired of karma fortunes by now.coplate ought to be getting tired of karma fortunes by now.coplate ought to be getting tired of karma fortunes by now.coplate ought to be getting tired of karma fortunes by now.coplate ought to be getting tired of karma fortunes by now.coplate ought to be getting tired of karma fortunes by now.coplate ought to be getting tired of karma fortunes by now.
 
Posts: 634
Karma: 1512746
Join Date: Jun 2009
Device: prs-505, Kindle Keyboard 3g, PW3
@lucida

Quote:
Originally Posted by lucida View Post
@coplate
Sorry for the late reply. good to see you got everything working. My setup is a little different as I use Amazon's official toolchain. There is a HOWTO included in the source so just follow the instruction to install. To compile invoke the gcc like

Did you keep instructions on setting up their crosscompiler with kernel?

If I'm going to try to write a kernel module, I figure I should use thier source tree.

When I just tired on ubuntu, I got the cross compiler to go, but trying to compile the kernel gave some missing header files.
Quote:
drivers/power/bd7181x-power.c:28:18: fatal error: llog.h: No such file or directory
#include <llog.h>
I also have the kernel from 5.8 ( 3.10.53 ) instad of 5.7 ( 3.0.35 ), though I don't know enough about kernel modules to know if thats an issue long term. I'm going to go get that source tree and start woking on it
coplate is offline   Reply With Quote
Old 08-19-2016, 08:59 PM   #56
knc1
99.44/100% On Holiday
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,176
Karma: 18200597
Join Date: Feb 2012
Location: Central Texas
Device: No K1, PW2, KV, KOA
You will have to build the module for a specific kernel(s).
knc1 is offline   Reply With Quote
Old 08-19-2016, 09:28 PM   #57
lucida
Enthusiast
lucida 's ceiling is 100% spider-free.lucida 's ceiling is 100% spider-free.lucida 's ceiling is 100% spider-free.lucida 's ceiling is 100% spider-free.lucida 's ceiling is 100% spider-free.lucida 's ceiling is 100% spider-free.lucida 's ceiling is 100% spider-free.lucida 's ceiling is 100% spider-free.lucida 's ceiling is 100% spider-free.lucida 's ceiling is 100% spider-free.lucida 's ceiling is 100% spider-free.
 
Posts: 30
Karma: 118906
Join Date: Jul 2016
Device: PW3
Quote:
Originally Posted by coplate View Post
@lucida




Did you keep instructions on setting up their crosscompiler with kernel?

If I'm going to try to write a kernel module, I figure I should use thier source tree.

When I just tired on ubuntu, I got the cross compiler to go, but trying to compile the kernel gave some missing header files.


I also have the kernel from 5.8 ( 3.10.53 ) instad of 5.7 ( 3.0.35 ), though I don't know enough about kernel modules to know if thats an issue long term. I'm going to go get that source tree and start woking on it

Use 5.8.1 source

Kindle_src_5.8.1_2974910023.tar.gz


The 5.8.2 source code is for KindleBasic2 only with a 3.10.53 kernel, but Amazon released it for all 5.8.2 devices.

All other iMX6 devices(PW2 to KOA) are still using 3.0.35 as of firmware 5.8.2 so just use 5.8.1 source which is correct and has llog.h included.
lucida is offline   Reply With Quote
Old 08-19-2016, 09:56 PM   #58
coplate
Guru
coplate ought to be getting tired of karma fortunes by now.coplate ought to be getting tired of karma fortunes by now.coplate ought to be getting tired of karma fortunes by now.coplate ought to be getting tired of karma fortunes by now.coplate ought to be getting tired of karma fortunes by now.coplate ought to be getting tired of karma fortunes by now.coplate ought to be getting tired of karma fortunes by now.coplate ought to be getting tired of karma fortunes by now.coplate ought to be getting tired of karma fortunes by now.coplate ought to be getting tired of karma fortunes by now.coplate ought to be getting tired of karma fortunes by now.
 
Posts: 634
Karma: 1512746
Join Date: Jun 2009
Device: prs-505, Kindle Keyboard 3g, PW3
Quote:
Originally Posted by lucida View Post
Use 5.8.1 source

Kindle_src_5.8.1_2974910023.tar.gz


The 5.8.2 source code is for KindleBasic2 only with a 3.10.53 kernel, but Amazon released it for all 5.8.2 devices.

All other iMX6 devices(PW2 to KOA) are still using 3.0.35 as of firmware 5.8.2 so just use 5.8.1 source which is correct and has llog.h included.
ah,thanks.
I did grab 5.8.2 source, not 5.8.1, I'll check that out.
coplate is offline   Reply With Quote
Old 08-25-2016, 08:03 AM   #59
glasnost
Connoisseur
glasnost with a running start, can leap into geosynchronous orbitglasnost with a running start, can leap into geosynchronous orbitglasnost with a running start, can leap into geosynchronous orbitglasnost with a running start, can leap into geosynchronous orbitglasnost with a running start, can leap into geosynchronous orbitglasnost with a running start, can leap into geosynchronous orbitglasnost with a running start, can leap into geosynchronous orbitglasnost with a running start, can leap into geosynchronous orbitglasnost with a running start, can leap into geosynchronous orbitglasnost with a running start, can leap into geosynchronous orbitglasnost with a running start, can leap into geosynchronous orbit
 
Posts: 54
Karma: 60222
Join Date: Aug 2016
Device: PW3, Kobo Aura H2O
Quote:
Originally Posted by lucida View Post
Long story short, since a DIY kindle USB audio adapter can be made from a regular USB OTG cable + USB audio adapter, I believe that any kindle supporting the USB audio adapter(PW3 as well as KV KOA) should have OTG compatible hardware.

Works on my PW3 5.8.1 and 5.8.2.
Lucida! This works marvelously well with all of the mice that I have attached to my PW3 5.8.1 - thank you.

Now I just need to get my toolchain up and running and do the same with a keyboard module (unless someone has already done that). Coplate?
glasnost is offline   Reply With Quote
Old 08-25-2016, 12:47 PM   #60
coplate
Guru
coplate ought to be getting tired of karma fortunes by now.coplate ought to be getting tired of karma fortunes by now.coplate ought to be getting tired of karma fortunes by now.coplate ought to be getting tired of karma fortunes by now.coplate ought to be getting tired of karma fortunes by now.coplate ought to be getting tired of karma fortunes by now.coplate ought to be getting tired of karma fortunes by now.coplate ought to be getting tired of karma fortunes by now.coplate ought to be getting tired of karma fortunes by now.coplate ought to be getting tired of karma fortunes by now.coplate ought to be getting tired of karma fortunes by now.
 
Posts: 634
Karma: 1512746
Join Date: Jun 2009
Device: prs-505, Kindle Keyboard 3g, PW3
Quote:
Originally Posted by glasnost View Post
Lucida! This works marvelously well with all of the mice that I have attached to my PW3 5.8.1 - thank you.

Now I just need to get my toolchain up and running and do the same with a keyboard module (unless someone has already done that). Coplate?
lucida's attachment here should work for mouse and keyboard
https://www.mobileread.com/forums/sho...4&postcount=26

It just needs to know what device to point at ( /dev/input/event1, /dev/input/event2, etc. ) and which keys you want to trigger it.


I'm still working on one that would support hot-swapping, but I've been distracted by World of Warcraft's Legion invasion.

It still needs the hid.ko and everything from the starg-otg.sh scripts, but it would replace the './mouseturn $(./config.sh) &' line, with one that points at your device and button configurations.

Last edited by coplate; 08-25-2016 at 12:49 PM.
coplate 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
Tools Software Jailbreak for PW2, PW3, PW3W, KT2, KV, KOA and KT3 knc1 Kindle Developer's Corner 3350 09-12-2019 07:05 AM
USB device to turn the page arnicas Kindle Developer's Corner 23 02-20-2017 01:20 PM
CC and USB/OTG support GEB Calibre Companion 2 05-30-2015 12:24 PM
ebook android readers and usb host - otg support sasimako Which one should I buy? 4 02-18-2015 06:26 AM
USB OTG Mythic Bookeen 7 11-11-2007 12:39 PM


All times are GMT -4. The time now is 09:06 PM.


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