07-21-2016, 05:36 AM | #1 |
Enthusiast
Posts: 30
Karma: 118906
Join Date: Jul 2016
Device: PW3
|
USB OTG mouse support and page turn on PW3(possible KV/KOA)
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.
So I compiled necessary USB mouse modules from PW3 5.8.1 source and wrote a small app to monitor the mouse click and turn page accordingly. To install, download and extract the content to /mnt/us/extensions, plug in the OTG cable and USB mouse then start from KUAL menu. To stop, remove the OTG cable first then stop from KUAL. Configuration is in bin/config.sh which detects kindle model automatically. By default, left click/scroll wheel down = next page, right click/wheel up = previous page, middle click = menu(top area) Other thoughts Is it possible to add the mouse entry to /etc/xorg.conf? and would be great if someone can build a KUAL extension so it can be installed and run without usbnet. Supported Devices Works on my PW3 5.8.1 and 5.8.2. Also confirmed to work on KV and KOA 5.8.1, 5.8.2 is untested on these two yet. On KOA battery case must be attached. Need some test on PW2 and KT2, maybe KT3. Last edited by lucida; 08-04-2016 at 06:16 PM. |
07-21-2016, 06:02 AM | #2 |
Member
Posts: 24
Karma: 10
Join Date: Nov 2015
Device: none
|
It would be great to have wired or even wireless mouse connected to Kindle's micro USB port and turn pages using mouse wheel. A LOT of people around here would love you for that!
|
Advert | |
|
07-21-2016, 06:56 AM | #3 | |
Carpe diem, c'est la vie.
Posts: 6,433
Karma: 10773668
Join Date: Nov 2011
Location: Multiverse 6627A
Device: K1 to PW3
|
Quote:
Also, be sure to unload (rmmod) your module when done using it so it does not interfere with shared kindle USB drive data transfers (by intercepting USB packets not intended for it). You need a multiplex driver to support multiple USB devices (or gadgets) simultaneously over a single USB port. You should be easily able to modify an existing (simple) KUAL extension to support this. Last edited by geekmaster; 07-21-2016 at 07:56 AM. |
|
07-21-2016, 08:24 AM | #4 |
Addict
Posts: 229
Karma: 136002
Join Date: Apr 2013
Device: PW
|
This is very very cool!
Thanks for the work and most of all sharing it. I hope this gets improved, it could be quite slick. |
07-22-2016, 02:08 AM | #5 | ||
Enthusiast
Posts: 30
Karma: 118906
Join Date: Jul 2016
Device: PW3
|
Quote:
Quote:
Edit: can't modify the first post, so here is the KUAL extension. Unpack and put the folder to /mnt/us/extensions, then launch from KUAL. Last edited by lucida; 08-01-2016 at 08:22 PM. |
||
Advert | |
|
07-22-2016, 04:04 AM | #6 | |
Going Viral
Posts: 17,212
Karma: 18210809
Join Date: Feb 2012
Location: Central Texas
Device: No K1, PW2, KV, KOA
|
Quote:
Just make a few more posts to the forum and then the system will allow you to edit your existing posts. |
|
07-22-2016, 08:21 AM | #7 |
Member
Posts: 11
Karma: 226
Join Date: Oct 2015
Device: KPW3
|
|
07-22-2016, 09:10 AM | #8 |
Carpe diem, c'est la vie.
Posts: 6,433
Karma: 10773668
Join Date: Nov 2011
Location: Multiverse 6627A
Device: K1 to PW3
|
|
07-22-2016, 05:49 PM | #9 |
BLAM!
Posts: 13,479
Karma: 26012494
Join Date: Jun 2010
Location: Paris, France
Device: Kindle 2i, 3g, 4, 5w, PW, PW2, PW5; Kobo H2O, Forma, Elipsa, Sage, C2E
|
IIRC, I stopped playing with rmmod/insmod since the K4 w/ USBNet for various weird reasons (and instead ask the framework to do it for me, here, via volumd).
The usbnet script probably still have my ramblings on that subject in the comments. Looking into that very thing with the introduction of OTG was the incentive for the PW3 @knc1 is currently tweaking for me, so, TBC . |
07-23-2016, 12:47 AM | #10 |
Addict
Posts: 229
Karma: 136002
Join Date: Apr 2013
Device: PW
|
I'm excited about this, I'm wondering what kind of mouse you would recommend in conjunction with this. I love the idea of remote page turning, and the thing I did previusly, relying on phone+wifi was a bit annoying.
Maybe something like https://www.amazon.co.uk/dp/B00DT2Q9OM/ or something like https://www.amazon.co.uk/dp/B008M4X6UW/ would be very cool because there would be no cable in the way. Ideally something comfortable! |
07-30-2016, 05:36 AM | #11 |
Enthusiast
Posts: 30
Karma: 118906
Join Date: Jul 2016
Device: PW3
|
Got a new OTG cable and same issue. I noticed that, once the cable was plugged in, even without kernel module and USB mouse, Kindle toggled between host&gadget mode, however USB audio works....
Upon checking I found sth. interesting in arch/arm/mach-mx6/usb_dr.c(complied to fsl_otg_arc.ko) Code:
int audio_enumerated; EXPORT_SYMBOL(audio_enumerated); TL;DR: Find some hidden check in kernel source but can't test it. |
07-30-2016, 08:43 AM | #12 |
Going Viral
Posts: 17,212
Karma: 18210809
Join Date: Feb 2012
Location: Central Texas
Device: No K1, PW2, KV, KOA
|
Hard coding the result of the kernel's USB hardware enumeration process is not the answer.
It is a dynamic process for very good reasons. |
07-30-2016, 01:14 PM | #13 | |
Enthusiast
Posts: 30
Karma: 118906
Join Date: Jul 2016
Device: PW3
|
Quote:
It's only used in otg_enum_fn() and we got "otg_enum_fn not enumerated, catcha!" message when OTG cable is plugged in without usb audio card. Spoiler:
Last edited by lucida; 07-30-2016 at 01:19 PM. |
|
08-01-2016, 07:17 PM | #14 |
Enthusiast
Posts: 30
Karma: 118906
Join Date: Jul 2016
Device: PW3
|
OK got it working now. audio_enumerated is used to check usb audio card and its safe to set it to 1 which keeps the device in host mode when OTG cable is plugged.
Here is an updated version of the KUAL extension. Plug in the OTG cable and USB mouse then start from KUAL menu. To stop, remove the OTG cable first then stop from KUAL. Configuration is in bin/config.sh which detects kindle model automatically. By default, left click/scroll wheel down = next page, right click/wheel up = previous page, middle click = menu(top area) Have fun. See first post for downloading. Last edited by lucida; 08-01-2016 at 08:22 PM. |
08-01-2016, 08:04 PM | #15 | |
Going Viral
Posts: 17,212
Karma: 18210809
Join Date: Feb 2012
Location: Central Texas
Device: No K1, PW2, KV, KOA
|
Quote:
|
|
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 |