Author Topic: Ir Keyboard Drivers - Alpha Release  (Read 49250 times)

sds

  • Jr. Member
  • **
  • Posts: 81
    • View Profile
Ir Keyboard Drivers - Alpha Release
« Reply #30 on: October 16, 2005, 06:50:55 pm »
Quote
Quote
* Somehow I am unable to type '~'. 'Shift-`' gives back '`'.
I'll look into that one.
I take this back -- problem was with my keyboard sticky keys.

Quote
Quote
* I would like to be able to use the driver as non-root also, however ...
Try the following (as root):
Code: [Select]
# chmod 666 /dev/misc/uinputThat should allow non-root users to open the uinput device.
Thanks, this and chmod-ing /dev/tty/1 to 666 did it.
C3100 pdaXrom

kopsis

  • Sr. Member
  • ****
  • Posts: 329
    • View Profile
    • http://kopsisengineering.com
Ir Keyboard Drivers - Alpha Release
« Reply #31 on: October 17, 2005, 08:32:35 am »
Anyone care to donate a C1000?  Would sure make it easier to debug.

If not, perhaps one of you C1000/C3100 owners could run the following command for me:
Code: [Select]
# find /dev -ls | /home/root/dev_ls.txtand then post the resulting dev_ls.txt file here? Thanks!

kopsis

  • Sr. Member
  • ****
  • Posts: 329
    • View Profile
    • http://kopsisengineering.com
Ir Keyboard Drivers - Alpha Release
« Reply #32 on: October 17, 2005, 08:49:18 am »
cal:

I need two things from you to debug the problem you're having:

1) Model number of your Belkin keyboard (printed on the "hinge"). There are F8U1500 and F8U1500T models and I believe protocols are different. I suspect you have the non-T version. Code in Zkbdd currently supports only the 1500T (but I want to add non-T support).

2) test9600 outputs from a key-down event for the "A" key and a key-up event for the "A" key.

cal

  • Full Member
  • ***
  • Posts: 112
    • View Profile
Ir Keyboard Drivers - Alpha Release
« Reply #33 on: October 17, 2005, 11:32:14 am »
Quote
cal:

I need two things from you to debug the problem you're having:

1) Model number of your Belkin keyboard (printed on the "hinge"). There are F8U1500 and F8U1500T models and I believe protocols are different. I suspect you have the non-T version. Code in Zkbdd currently supports only the 1500T (but I want to add non-T support).

2) test9600 outputs from a key-down event for the "A" key and a key-up event for the "A" key.
[div align=\"right\"][a href=\"index.php?act=findpost&pid=99712\"][{POST_SNAPBACK}][/a][/div]


You are correct, I do have 1500.  I will get you the A code asap...  I didn't bring my keyboard to work.    Thanks for helping, and your hard work.  You are doing a really great job.

g33k

  • Jr. Member
  • **
  • Posts: 59
    • View Profile
Ir Keyboard Drivers - Alpha Release
« Reply #34 on: October 18, 2005, 04:05:45 pm »
I've just tried the palmOne Universal Wireless Keyboard (3169WW) with your drivers on my C860. None of the keys were functional at all. I tried all the stuff you suggested in the thread up to this point. When I load the driver with type test9600, I can see all the scancodes, so it appears that the driver is working fine but lacks mappings for this particular keyboard. Has anyone provided you with the codes for this keyboard yet? If not, I'd be glad to do it... it'd be neat to be able to use a "fullsize" keyboard.

kopsis

  • Sr. Member
  • ****
  • Posts: 329
    • View Profile
    • http://kopsisengineering.com
Ir Keyboard Drivers - Alpha Release
« Reply #35 on: October 18, 2005, 06:49:34 pm »
Quote
Has anyone provided you with the codes for this keyboard yet? If not, I'd be glad to do it... it'd be neat to be able to use a "fullsize" keyboard.
[div align=\"right\"][a href=\"index.php?act=findpost&pid=99909\"][{POST_SNAPBACK}][/a][/div]
I don't have codes for that keyboard yet. Note that it could be the maps or it could be the protocol. If you could initially give me codes for just a couple keys, it would tell me which of those two things is the problem. Thanks!

g33k

  • Jr. Member
  • **
  • Posts: 59
    • View Profile
Ir Keyboard Drivers - Alpha Release
« Reply #36 on: October 19, 2005, 09:21:11 am »
I've PMed you some key codes for the Palm Universal Wireless Keyboard.

Thanks for your swell work on this!

kopsis

  • Sr. Member
  • ****
  • Posts: 329
    • View Profile
    • http://kopsisengineering.com
Ir Keyboard Drivers - Alpha Release
« Reply #37 on: October 19, 2005, 10:06:43 am »
Got it. Looks like the new Palm keyboards are way different than the old ones. But with g33k's help I should have the Palm 3169WW working in the next release (hopefully by the end of the week).

jimjimbobim

  • Newbie
  • *
  • Posts: 5
    • View Profile
Ir Keyboard Drivers - Alpha Release
« Reply #38 on: October 19, 2005, 11:29:28 pm »
Any idea on how to fix the right click on the SL-6000?

Srono

  • Jr. Member
  • **
  • Posts: 83
    • View Profile
    • http://
Ir Keyboard Drivers - Alpha Release
« Reply #39 on: October 20, 2005, 10:03:17 am »
Thank g33k and kopsis very much!! :X
Kopsis asked me to send some key also but i was so busy for the last few days :">
[span style=\'font-size:7pt;line-height:100%\']C3100 /w Meanie's pdaxii13 5.2alpha
SL5500 collecting dust.

[/span]

kopsis

  • Sr. Member
  • ****
  • Posts: 329
    • View Profile
    • http://kopsisengineering.com
Ir Keyboard Drivers - Alpha Release
« Reply #40 on: October 20, 2005, 02:35:28 pm »
Step right up folks and get your copy of zkbdd v0.2!

This release features a major architectural shift from hard-coded drivers to driver "scripts". That means you can change the driver code and/or add new drivers without ever "building" any binaries. I don't have much documentation on how to actually do that yet, but assuming that this version works well for people, documentation will follow. If you want to take a peek at the driver scripts you'll find them in /usr/share/zkbdd/drivers after you install the new IPK.

In addition to the architectural changes, I've added (with g33k's generous assistance) an "untested" driver script for the Palm 3169WW Universal Wireless keyboard. I've also added a default config file (/etc/zkbdd.conf) which you can edit to reflect your keyboard type and then you'll be able to run zkbdd with no parameters.

Note that some keyboard types have changed (eg. belkinf8 is now belking_f8u1500t) -- do a "zkbdd -h" for a list of new driver names.

Also note that only the zkbdd package is updated. The kernel modules are still at the 0.1 release so just continue using the version you have installed. I still need a C1000 owner to volunteer to provide me some info so I can get the kernel module packages updated.

Last but not least, I've started putting together a Zkbdd project site with links, instructions, release notes, etc. It's a little light right now -- suggestions are welcome.

Good luck and as always, I encourage you to share your results

Srono

  • Jr. Member
  • **
  • Posts: 83
    • View Profile
    • http://
Ir Keyboard Drivers - Alpha Release
« Reply #41 on: October 20, 2005, 05:17:22 pm »
Wow, Your weekend comes so fast  (just kidding) Thanks for the good news and the new update!
I tried the new driver with my palm 3169ww. Here is the result:
+ The config file work well.
+ I run zkbdd after 2 modprobe command. The built-in keyboard still worked fine after that. Then i used my ir-keyboard, something very weird happened:
- the keymap seemed to be working as it can detect the correct key i typed in.
- but when i pressed one button, for example: g, it was ok  if i did not release the button. When i released, it automatically entered ggggggggggggggggggggggggg (nonstop) until i pressed another key h. Then i released h -> hhhhhhhhhhhhh
- After that, even when i pressed any button in the built-in keyboard, for example g -> h,  it returned gggggg (stop) hhhhh (stop)
- After i kill zkbdd -> everything worked normally.

Can i do something to debug and send u the result ? I'm waiting for g33k to try also  I hope that u understand whay i try to explain :">
Thanks alot !
« Last Edit: October 20, 2005, 05:19:38 pm by Srono »
[span style=\'font-size:7pt;line-height:100%\']C3100 /w Meanie's pdaxii13 5.2alpha
SL5500 collecting dust.

[/span]

g33k

  • Jr. Member
  • **
  • Posts: 59
    • View Profile
Ir Keyboard Drivers - Alpha Release
« Reply #42 on: October 20, 2005, 05:19:40 pm »
I'm sorry to say that this isn't working very well for me. I'm using the palm_3169ww driver (of course).

Some keys don't seem to do anything:

2
w
a
s
z

Some do the wrong thing:

1 registers as 2
TAB registers as q
q registers as w
<, registers /
SPACE registers ^@ (which I assume is a non-printable character, rather than those literal characters)
RSHIFT registers as "
LSHIFT registers as z
CTRL registers as a
ALTGR registers as *

Since I provided the codes for this keyboard, I fear this is my fault. I'm going to see if I can figure out how the keycodes are stored and double-check them.

The primary problem, though, is that once a keypress is registered, unless I press another (working) key almost immediately, the keypress is duplicated endlessly. It's as if I'm holding down the key and key repeat is set very fast. I assume this is because the key release event isn't getting to the OS for whatever reason. I ran the driver in debug mode and it was displaying both keydown and keyup events, so the driver is clearly receiving and processing them.

kopsis

  • Sr. Member
  • ****
  • Posts: 329
    • View Profile
    • http://kopsisengineering.com
Ir Keyboard Drivers - Alpha Release
« Reply #43 on: October 20, 2005, 06:32:56 pm »
So if any of you brave 3169WW owners want to take a shot at debugging, here's some background info ...

If you run in debug mode (the -d switch), each key press/release will produce output like this:
Code: [Select]
lookup_scancode(map_normal, 0x5e)
keycode: 0x01
press 01
0x00000002
0x00000000
0x00000000
0x00000000
0x00000000
0x00000000
0x00000000
0x00000000
lookup_scancode(map_normal, 0x5e)
keycode: 0x01
release 01
0x00000000
0x00000000
0x00000000
0x00000000
0x00000000
0x00000000
0x00000000
0x00000000
Ignore the 0x0000... lines. What you're interested in is the "lookup_scancode(map_normal, 0x5e)" lines. That shows the scancode that is being looked up and the map that is being used. Now if you look in the file "/usr/share/zkbdd/drivers/palm_3169ww.lua" (it's just a text file) you'll see a map with a matching name ("map_normal" in this case). The map is a sequence of values with the first one corresponding to 0x01, the second to 0x02, the 32nd to 0x20, etc. So take the hex number from the "lookup_scancode" message and locate that position in the table (hint: the second line of the table starts with 0x08, third with 0x10, fourth with 0x18, etc.). What you see in that spot is the symbolic code that the driver is going to send the Z.

So in the case of a key that doesn't do anything such as "a", locate it's spot in the table and you'll likely see the value "0". Change it to "ZK_A". Now find the other ZK_A in the table (there will be one) and change it to "0". Kill the driver, restart in normal mode, and press the "a" key. If you did everything right, it should work now. Repeat for the other broken keys.

Of course you're also welcome to just record all those scancode values and the keys that produce them and send them to me and I'll update the maps accordingly ... but sometimes it's fun fixing stuff yourself

Another very important thing to look for -- every "press xx" line needs to be followed by a matching "release xx" line in the next sequence. If that's not happening then my protocol handling is broken. Shoot me a copy of your debug output in that case so I can dig into it.
« Last Edit: October 20, 2005, 06:35:42 pm by kopsis »

g33k

  • Jr. Member
  • **
  • Posts: 59
    • View Profile
Ir Keyboard Drivers - Alpha Release
« Reply #44 on: October 20, 2005, 10:06:59 pm »
It turned out that the boolean value being assigned to key_down in your scancode interpreting routine was inverted - the driver saw the keypress as a keyup, and vice versa. Seeing a keyup, then a keydown for each keypress was causing autorepeat to kick in after a moment, as the keys never seemed to be released. I was very pleased to have been able to fix that!

There were also some codes in the wrong spots in the normal_map. I fixed some easy ones; most of the keys work now. There seem to be some issues with the modifier keys; I'll look at them next.

The updated driver file is attached. (Just remove the .tar from the filename; it's not really a tar.)
« Last Edit: October 20, 2005, 10:24:56 pm by g33k »