08-17-2016, 11:59 AM | #46 |
Groupie
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.
|
08-17-2016, 12:16 PM | #47 | |
Going Viral
Posts: 17,212
Karma: 18210809
Join Date: Feb 2012
Location: Central Texas
Device: No K1, PW2, KV, KOA
|
Quote:
Just call that script from your new custom u-dev rule. |
|
Advert | |
|
08-17-2016, 12:46 PM | #48 | |
Guru
Posts: 645
Karma: 1888888
Join Date: Jun 2009
Device: prs-505, Kindle Keyboard 3g, PW3
|
Quote:
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. |
|
08-17-2016, 02:34 PM | #49 | |
Enthusiast
Posts: 30
Karma: 118906
Join Date: Jul 2016
Device: PW3
|
Quote:
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 |
|
08-17-2016, 02:39 PM | #50 |
Enthusiast
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. |
Advert | |
|
08-17-2016, 02:59 PM | #51 | |
Guru
Posts: 645
Karma: 1888888
Join Date: Jun 2009
Device: prs-505, Kindle Keyboard 3g, PW3
|
Quote:
"<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. |
|
08-17-2016, 07:50 PM | #52 | |
Guru
Posts: 645
Karma: 1888888
Join Date: Jun 2009
Device: prs-505, Kindle Keyboard 3g, PW3
|
Quote:
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 ) |
|
08-18-2016, 04:31 AM | #53 |
Evangelist
Posts: 415
Karma: 750442
Join Date: Apr 2016
Location: Italy
Device: Kindle PW3 5.8.5.0.1
|
Nice work!
Thanks for sharing |
08-18-2016, 05:23 AM | #54 | |
Connoisseur
Posts: 54
Karma: 60222
Join Date: Aug 2016
Device: PW3, Kobo Aura H2O
|
Quote:
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... |
|
08-19-2016, 08:52 PM | #55 | ||
Guru
Posts: 645
Karma: 1888888
Join Date: Jun 2009
Device: prs-505, Kindle Keyboard 3g, PW3
|
@lucida
Quote:
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:
|
||
08-19-2016, 08:59 PM | #56 |
Going Viral
Posts: 17,212
Karma: 18210809
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).
|
08-19-2016, 09:28 PM | #57 | |
Enthusiast
Posts: 30
Karma: 118906
Join Date: Jul 2016
Device: PW3
|
Quote:
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. |
|
08-19-2016, 09:56 PM | #58 | |
Guru
Posts: 645
Karma: 1888888
Join Date: Jun 2009
Device: prs-505, Kindle Keyboard 3g, PW3
|
Quote:
I did grab 5.8.2 source, not 5.8.1, I'll check that out. |
|
08-25-2016, 08:03 AM | #59 | |
Connoisseur
Posts: 54
Karma: 60222
Join Date: Aug 2016
Device: PW3, Kobo Aura H2O
|
Quote:
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? |
|
08-25-2016, 12:47 PM | #60 | |
Guru
Posts: 645
Karma: 1888888
Join Date: Jun 2009
Device: prs-505, Kindle Keyboard 3g, PW3
|
Quote:
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. |
|
Tags |
otg, usb |
|
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 | 3376 | 05-31-2023 09:43 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 |