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 04-01-2017, 12:18 AM   #181
knc1
Ex-Helpdesk Addict
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: 13,831
Karma: 15332065
Join Date: Feb 2012
Location: Central Texas
Device: No K1, PW2, KV, KOA
You where careful but correct.
The mouse and keyboard technical details have not changed much since when the PS2 "standard" was introduced.

The connectors have changed, and some are wireless connections, but everything "speaks" PS2 coding regardless of the connection media.

(Well, HP may still be different, but then who cares?)
knc1 is offline   Reply With Quote
Advert
Old 04-18-2017, 12:19 PM   #182
coplate
Groupie
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: 158
Karma: 833578
Join Date: Jun 2009
Device: prs-505, Kindle Keyboard 3g, PW3
zxczxc,

I'm almost done with a kernel module that can make the usb hot swappable. and wanted to get your ideas.

In the KindleLazy, you open both event 2 and event3 ( kbd and mouse ).

One option in my module could make both of those events available at the same device, or split them into kbd/mouse devices.

Anyone have thoughts on that?
coplate is online now   Reply With Quote
Old 04-20-2017, 10:22 AM   #183
zxczxc
Addict
zxczxc knows how many angels can dance on the head of a pin.zxczxc knows how many angels can dance on the head of a pin.zxczxc knows how many angels can dance on the head of a pin.zxczxc knows how many angels can dance on the head of a pin.zxczxc knows how many angels can dance on the head of a pin.zxczxc knows how many angels can dance on the head of a pin.zxczxc knows how many angels can dance on the head of a pin.zxczxc knows how many angels can dance on the head of a pin.zxczxc knows how many angels can dance on the head of a pin.zxczxc knows how many angels can dance on the head of a pin.zxczxc knows how many angels can dance on the head of a pin.
 
Posts: 227
Karma: 136000
Join Date: Apr 2013
Device: PW
Quote:
Originally Posted by coplate View Post
zxczxc,

I'm almost done with a kernel module that can make the usb hot swappable. and wanted to get your ideas.

In the KindleLazy, you open both event 2 and event3 ( kbd and mouse ).

One option in my module could make both of those events available at the same device, or split them into kbd/mouse devices.

Anyone have thoughts on that?
Hi, I check both keyboard and mouse events simply because the wireless presenter I use has some 'mouse' butttons and some 'keyboard' buttons, and so it appears as separate input devices.

Ideally I just would just want to check for a specific button press, and not care about what device it is coming from.

So I'm not sure what to tell you with regards to your module, maybe I misunderstand something, sorry.

Hot swappable would be great

Thanks for your work!
zxczxc is offline   Reply With Quote
Old 04-20-2017, 09:00 PM   #184
coplate
Groupie
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: 158
Karma: 833578
Join Date: Jun 2009
Device: prs-505, Kindle Keyboard 3g, PW3
Hot swappable kernal module

OK, here is the simplest version I have made, I'm not entirely happy with it, but it's time to put it out into the world.



Usage should be in the form:

Code:
insmod hid.ko  2>&1
sleep 1
insmod usbhid.ko 2>&1
sleep 1
insmod mousedev.ko 2>&1 # ( I have no idea why, but like you saw, if I don't use this we often get the device disconnecting and reconnecting repeatedly
sleep 1
insmod mdcbug.ko 2>&1
sleep 1

killall kindlelazy > /dev/null 2>&1
sleep 3
./kindlelazy  &
It will make a device named /dev/mdcdev.

You will need to change kindlelazy to use this device.
Maybe you could make the device part of the configuration. I do plan on changing this module considerably in the future though, this name is not well though out, just my initials. I'm thinking of something like 'evhot' to mimic 'evdev'.



Can you give this a test, changing your source code to open device /dev/mdcdev instead of inputs 2 and 3.


Current limitations:

The device can only be opened by one application.
( So you cannot read it in kindlelazy, and tail it from the command line ).

It has a very basic device filter - anythign with eh left mouse button, or the "enter" key.

Device does not support most ioctl calls, so it cannot be used by evtest or Xorg, it can only be read.

Long term plans:

My long term plan for this module would be for it:

To work on any linux device.

Be opened by any number of applications.

Provide multiple /dev/somethng_mouse, something_kbd, something_all devices. So that like Xorg can open jsut the keyboard part.

For this, I will need to implement all of the ioctl calls, and provide a list of events that I can actually support.


Edit:
When I put the device to sleep running a copy of kindlelazy that just showed all the events, the device crashed on wakeup. Do not use this yet.

Edit2:

I have uploaded a new version that does not open the touchscreen of the power button.

It will only register for certain mice ( must have a left button ) and certain keyboards ( must have an ENTER key ) now.


Tested again, and no crash on reboot. I had it just write all the events to a file, the following 4 test cases worked. ( of cource including the test case of leaving it unplugged )


Plug in, suspend, wakeup,
Plug in, unplug, suspend, wakeup, plug in.
Plug in, suspend, unplug, wakeup, plug in.
Plug in, suspend, unplug, plug in, wakeup.


zxczxc, if you get the change, can you give me the output of
evtest /dev/input2
and
evtest /dev/input3 on your presenter.

If it registers as a mouse and keyboard, but it doesn't have an enter key, I wonder which keys it lists.
Attached Files
File Type: zip mdcbug.zip (9.0 KB, 24 views)

Last edited by coplate; 04-20-2017 at 11:41 PM.
coplate is online now   Reply With Quote
Old 04-24-2017, 02:38 PM   #185
I.hate.reading
Junior Member
I.hate.reading began at the beginning.
 
Posts: 2
Karma: 10
Join Date: Apr 2017
Device: kindle PW3
Only if i could do jailbreak!
I.hate.reading 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
Aura HD Brightness control too bright cefarix Kobo Reader 7 05-04-2014 02:28 PM
Advanced Automatic Brightness and Wifi Control hieronymos Kobo Tablets 2 12-02-2011 09:51 AM
hardware backlight control for brightness? bells Apple Devices 3 10-26-2011 11:39 AM
remote control? shawn Sony Reader 2 10-10-2007 12:02 PM
Remote Control ecm Which one should I buy? 5 03-20-2007 12:08 AM


All times are GMT -4. The time now is 11:41 AM.


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