Objective*Full USB OTG keyboard support so that my kindle can be used as a long-lasting outdoor writing device.
StatusSolution (inelegant, kludged together, but working for now):
lucida's usb otg kindlet (start otg service, then plug in hub/keyboard)
coplate's makexconfig copied to /var/local/kindlekbd per knc1 and:
Code:
# mntroot rw
# mount -o bind /var/local/kindlekbd /etc/upstart/makexconfig
# mntroot ro
# restart x
*work in progress
Current (known) problems & Next Steps
* external battery does not power the hub, so writing time will be shortened
* automate all this in a KUAL extension (probably just modifying lucida's scripts)
* learn more about why my earlier attempts failed in such an odd manner
Hardware/softwareEarlier aspects of post, put in spoiler b/c I can't seem to format a strikethrough font ;-)
Spoiler:
SetupInstalling lucida's Kindlet was simple and straightforward - put the decompressed files in /mnt/us/extensions/
From the KUAL extension, I started the OTG module/service
Checking that the modules were added to recognize the device:
Code:
#lsmod
...
mousedev 9072 1
usbhid 18029 0
hid 67608 1 usbhid
I plug the power into the hub & turn it on; plug the hub into the kindle & see the blue led light up; and plug the keyboard into the hub.
Next to verify that the OS sees the device:
Code:
#dmesg | grep -i input
[ 263.772366] input: CM Storm QuickFire Rapid keyboard as /devices/platform/fsl-ehci.0/usb1/1-1/1-1.4/1-1.4:1.0/input/input2
[ 263.773820] generic-usb 0003:2516:0004.0001: input: USB HID v1.10 Keyboard [CM Storm QuickFire Rapid keyboard] on usb-fsl-ehci.0-1.4/input0
[ 263.819798] input: CM Storm QuickFire Rapid keyboard as /devices/platform/fsl-ehci.0/usb1/1-1/1-1.4/1-1.4:1.1/input/input3
[ 263.828242] generic-usb 0003:2516:0004.0002: input: USB HID v1.10 Device [CM Storm QuickFire Rapid keyboard] on usb-fsl-ehci.0-1.4/input1
everything is registered properly, so I verify that input will work:
Code:
#evtest /dev/input/input2
List of supported events i.e. keys I can press
Testing ... (interrupt to exit)
Q
Event: time 1472263694.041622, type 4 (Misc), code 4 (ScanCode), value 70014
Event: time 1472263694.041639, type 1 (Key), code 16 (Q), value 1
Event: time 1472263694.041647, -------------- Report Sync ------------
Event: time 1472263694.138610, type 4 (Misc), code 4 (ScanCode), value 70014
Event: time 1472263694.138623, type 1 (Key), code 16 (Q), value 0
Event: time 1472263694.138629, -------------- Report Sync ------------
ctrl C
Looks good.
Next StepsI suspect the easiest path is to simply create a custom xorg.conf file that defines this input device as a keyboard.
*But, will that function in xterm? Presumably yes, but I'm not entirely positive
So, following in the path of
coplate, but with further instructions from
knc1 I:
Code:
#cat /etc/xorg.conf > /var/local/xorg.conf.project
and added the appropriate input device sections to my new xorg.conf.
Next:
Code:
# mount -o bind /var/local/xorg.conf.project /etc/xorg.conf
#killall -s KILL Xorg
#restart x
And my shiny new xorg? Well, the bind mount didn't stick, and the device reverted to the old code.
Also, the external battery doesn't stay on when just the keyboard is connected to the hub, so there is a slightly higher drain on my kindle battery than I'd like. Not sure where to start with that one. I've tried two different hubs, same thing happens with both. The external battery does not shut off when directly charging the kindle, so I suspect it is some sort of a 'very low amperage' shutoff mechanism.
Any thoughts are welcome and appreciated as I continue to tinker on this. I created a separate thread, as I didn't want to hijack lucida's (which seems to have a different end goal), but I'll merge this if that's the etiquette/most useful idea here here.