Page 1 of 3 123 LastLast
Results 1 to 10 of 28

Thread: Howto: HTPC Ortek Wireless mini Thumb Keyboard Mouse Combo PKB-1700

  1. #1
    Join Date
    Jul 2007
    Location
    Burlington, NC
    Beans
    1,994
    Distro
    Ubuntu 10.04 Lucid Lynx

    Howto: HTPC Ortek Wireless mini Thumb Keyboard Mouse Combo PKB-1700

    I bought this keyboard/mouse combo for my birthday: http://www.ortek.com/prod_detail.asp...pid=101&id=164

    The mouse thumbstick and media hotkeys work out of the box but not the keyboard.
    Googling I found this solution but it's in German: http://forum.ubuntuusers.de/topic/ge.../#post-2628472

    After translating, it looks like an easy fix whereby the existing
    Ortek WKB2000 driver tweak from here: http://patchwork.kernel.org/patch/74366/
    works perfectly with the PKB-1700. The kernel just doesn't know to load this driver module
    for the different model and the module itself doesn't know to claim the model.

    The German post uses an "either/or" approach that fixes the PKB1700 by breaking the WKB2000.
    I've used this knowledge to add support for the PKB1700 without breaking the WKB2000 -
    creating my first ever real Linux kernel patch!!

    If you have this keyboard too, you can use this method: https://wiki.ubuntu.com/KernelCustomBuild
    to quickly compile just the hid modules with my patch and get your keyboard working.

    I worked out these steps on Ubuntu Desktop 10.04 with kernel "2.6.32-25-generic"
    Assuming you've downloaded the patch to your Desktop ...

    Code:
    #get the kernel source
    sudo apt-get install linux-source
    
    #extract just the hid code
    tar jxvf /usr/src/linux-source-2.6.32.tar.bz2 linux-source-2.6.32/drivers/hid
    
    #change dir and apply the patch
    cd linux-source-2.6.32/drivers/hid
    zcat ~/Desktop/pkb1700-usb-hid.patch.gz | patch
    
    #compile
    make -C /usr/src/linux-headers-$(uname -r) M=$(pwd) modules
    
    #copy to "install" the patched binary modules
    sudo cp -v hid.ko hid-ortek.ko /lib/modules/$(uname -r)/kernel/drivers/hid/
    sudo cp -v usbhid/usbhid.ko /lib/modules/$(uname -r)/kernel/drivers/hid/usbhid/
    
    #remove/reinsert modules
    # this is all together because the first step will disable HID keyboards/mice
    sudo rmmod usbhid hid; sudo depmod -a; sudo modprobe usbhid
    ^this last step may need adjustment if you have HID bluetooth devices.

    EDIT: If you are using an initial ramdisk (initrd) style of booting, which *buntu
    typically does, you'll also have to update the hid modules inside the initrd...

    Code:
    sudo update-initramfs -u
    ^this will make sure the new patched modules get loaded at boot time.

    Remember you will have to re-do this procedure for future kernel upgrades!
    Last edited by asmoore82; November 1st, 2010 at 04:34 AM.

  2. #2
    Join Date
    Jul 2007
    Location
    Burlington, NC
    Beans
    1,994
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: Howto: HTPC Ortek Wireless mini Thumb Keyboard Mouse Combo PKB-1700

    Oops! Here's the patch.
    Code:
    diff -rup ../oldhid/hid-core.c ./hid-core.c
    --- ../oldhid/hid-core.c	2010-10-11 20:58:34.000000000 -0400
    +++ ./hid-core.c	2010-10-11 21:00:23.000000000 -0400
    @@ -1338,6 +1338,7 @@ static const struct hid_device_id hid_bl
     	{ HID_USB_DEVICE(USB_VENDOR_ID_MICROSOFT, USB_DEVICE_ID_WIRELESS_OPTICAL_DESKTOP_3_0) },
     	{ HID_USB_DEVICE(USB_VENDOR_ID_MONTEREY, USB_DEVICE_ID_GENIUS_KB29E) },
     	{ HID_USB_DEVICE(USB_VENDOR_ID_NTRIG, USB_DEVICE_ID_NTRIG_TOUCH_SCREEN) },
    +	{ HID_USB_DEVICE(USB_VENDOR_ID_ORTEK, USB_DEVICE_ID_ORTEK_PKB1700) },
     	{ HID_USB_DEVICE(USB_VENDOR_ID_ORTEK, USB_DEVICE_ID_ORTEK_WKB2000) },
     	{ HID_USB_DEVICE(USB_VENDOR_ID_PETALYNX, USB_DEVICE_ID_PETALYNX_MAXTER_REMOTE) },
     	{ HID_USB_DEVICE(USB_VENDOR_ID_QUANTA, USB_DEVICE_ID_QUANTA_OPTICAL_TOUCH) },
    diff -rup ../oldhid/hid-ids.h ./hid-ids.h
    --- ../oldhid/hid-ids.h	2010-10-11 20:58:34.000000000 -0400
    +++ ./hid-ids.h	2010-10-11 21:00:04.000000000 -0400
    @@ -366,6 +366,7 @@
     #define USB_DEVICE_ID_ONTRAK_ADU100	0x0064
     
     #define USB_VENDOR_ID_ORTEK		0x05a4
    +#define USB_DEVICE_ID_ORTEK_PKB1700	0x1700
     #define USB_DEVICE_ID_ORTEK_WKB2000	0x2000
     
     #define USB_VENDOR_ID_PANJIT		0x134c
    diff -rup ../oldhid/hid-ortek.c ./hid-ortek.c
    --- ../oldhid/hid-ortek.c	2010-10-11 20:58:34.000000000 -0400
    +++ ./hid-ortek.c	2010-10-11 21:01:03.000000000 -0400
    @@ -30,6 +30,7 @@ static void ortek_report_fixup(struct hi
     }
     
     static const struct hid_device_id ortek_devices[] = {
    +	{ HID_USB_DEVICE(USB_VENDOR_ID_ORTEK, USB_DEVICE_ID_ORTEK_PKB1700) },
     	{ HID_USB_DEVICE(USB_VENDOR_ID_ORTEK, USB_DEVICE_ID_ORTEK_WKB2000) },
     	{ }
     };
    Attached Files Attached Files

  3. #3
    Join Date
    Jan 2008
    Beans
    2

    Re: Howto: HTPC Ortek Wireless mini Thumb Keyboard Mouse Combo PKB-1700

    Thanks for this!

    This keyboard is also being sold in Maplins at the moment (http://www.maplin.co.uk/Module.aspx?ModuleNo=399217). Your patch didn't quite compile in 10.10, it complained of the addition of the line in hid-ortek.c - I added this manually though and the compile was fine.

  4. #4
    Join Date
    Mar 2006
    Beans
    Hidden!

    Re: Howto: HTPC Ortek Wireless mini Thumb Keyboard Mouse Combo PKB-1700

    Typing this from my PKB1700!!!

    Thanks for the howto and for teaching me how you only compile modules and not the whole kernel.Much quicker and easier (unlike typing on this keypad )

    Also you need to put a sudo in front of the tar & make commands

    oh, this worked for me on Xubuntu 10.04 - off to try it out on XBMC LIVE

    EDIT: there doesn't seem to be a hid.ko file in XMBC Live - how can that be?
    Last edited by Jose Catre-Vandis; October 27th, 2010 at 11:47 PM.
    No longer participating......

  5. #5
    Join Date
    Oct 2010
    Beans
    2

    Talking Re: Howto: HTPC Ortek Wireless mini Thumb Keyboard Mouse Combo PKB-1700

    Thanks for this, it works almost perfectly in XBMC Live Dharma B3.

    I say almost because on reboot the controller goes back to mouse function only.

    I have discovered that if you re-enter the last line:

    sudo rmmod usbhid hid; sudo depmod -a; sudo modprobe usbhid

    ....it works again.

    Can anyone tell me (Linux Newbie) how to make this unloading and loading of usbhid permanant? I am running XBMC off a Hard Drive.

    Thanks again for this patch, you have made my life so much easier!

    Dan.

  6. #6
    Join Date
    Jan 2008
    Beans
    2

    Re: Howto: HTPC Ortek Wireless mini Thumb Keyboard Mouse Combo PKB-1700

    I believe what is happening is that when you reboot, the kernel loads the usbhid driver which is already 'baked' into it.

    I think the solution here is to build a new kernel with the newer driver. It would be really good to get this patch submitted for inclusion into a newer kernel, but i'm pretty clueless on how to do that

  7. #7
    Join Date
    Mar 2006
    Beans
    Hidden!

    Re: Howto: HTPC Ortek Wireless mini Thumb Keyboard Mouse Combo PKB-1700

    Quote Originally Posted by Eastender1970 View Post
    Thanks for this, it works almost perfectly in XBMC Live Dharma B3.

    I say almost because on reboot the controller goes back to mouse function only.

    I have discovered that if you re-enter the last line:

    sudo rmmod usbhid hid; sudo depmod -a; sudo modprobe usbhid

    ....it works again.

    Can anyone tell me (Linux Newbie) how to make this unloading and loading of usbhid permanant? I am running XBMC off a Hard Drive.

    Thanks again for this patch, you have made my life so much easier!

    Dan.
    If all the commands are required on each boot, then try putting them in your rc.local file.
    No longer participating......

  8. #8
    Join Date
    Oct 2010
    Beans
    2

    Re: Howto: HTPC Ortek Wireless mini Thumb Keyboard Mouse Combo PKB-1700

    Quote Originally Posted by Jose Catre-Vandis View Post
    If all the commands are required on each boot, then try putting them in your rc.local file.
    Thanks Jose, that worked a treat.

  9. #9
    Join Date
    May 2010
    Beans
    2

    Re: Howto: HTPC Ortek Wireless mini Thumb Keyboard Mouse Combo PKB-1700

    Many thanks from me as well, worked great... although I had to take the instructions from the German site (link given) to change the files manually, probably as I'm running on Maverick. And I'm a complete noob at this.

  10. #10
    Join Date
    Mar 2006
    Beans
    Hidden!

    Re: Howto: HTPC Ortek Wireless mini Thumb Keyboard Mouse Combo PKB-1700

    If it helps anyone, here is the patch that was implemented on kernels prior to Lucid to get the Ortek WKB 2000 keyboard working. The OP's patch augments this one.

    diff -uprN linux-2.6.32.3.vanilla/drivers/hid/Kconfig linux-2.6.32.3/drivers/hid/Kconfig
    --- linux-2.6.32.3.vanilla/drivers/hid/Kconfig 2010-01-11 20:09:17.876428259 +0000
    +++ linux-2.6.32.3/drivers/hid/Kconfig 2010-01-11 21:16:24.529052956 +0000
    @@ -204,6 +204,13 @@ config HID_NTRIG
    ---help---
    Support for N-Trig touch screen.

    +config HID_ORTEK
    + tristate "Ortek" if EMBEDDED
    + depends on USB_HID
    + default !EMBEDDED
    + ---help---
    + Support for Ortek WKB-2000 wireless keyboard + mouse trackpad.
    +
    config HID_PANTHERLORD
    tristate "Pantherlord support" if EMBEDDED
    depends on USB_HID
    diff -uprN linux-2.6.32.3.vanilla/drivers/hid/Makefile linux-2.6.32.3/drivers/hid/Makefile
    --- linux-2.6.32.3.vanilla/drivers/hid/Makefile 2010-01-11 20:09:17.877427529 +0000
    +++ linux-2.6.32.3/drivers/hid/Makefile 2010-01-11 21:14:29.281429408 +0000
    @@ -34,6 +34,7 @@ obj-$(CONFIG_HID_LOGITECH) += hid-logite
    obj-$(CONFIG_HID_MICROSOFT) += hid-microsoft.o
    obj-$(CONFIG_HID_MONTEREY) += hid-monterey.o
    obj-$(CONFIG_HID_NTRIG) += hid-ntrig.o
    +obj-$(CONFIG_HID_ORTEK) += hid-ortek.o
    obj-$(CONFIG_HID_PANTHERLORD) += hid-pl.o
    obj-$(CONFIG_HID_PETALYNX) += hid-petalynx.o
    obj-$(CONFIG_HID_SAMSUNG) += hid-samsung.o
    diff -uprN linux-2.6.32.3.vanilla/drivers/hid/hid-core.c linux-2.6.32.3/drivers/hid/hid-core.c
    --- linux-2.6.32.3.vanilla/drivers/hid/hid-core.c 2010-01-11 20:09:17.872426973 +0000
    +++ linux-2.6.32.3/drivers/hid/hid-core.c 2010-01-11 21:56:44.505053026 +0000
    @@ -1333,6 +1333,7 @@ static const struct hid_device_id hid_bl
    { HID_USB_DEVICE(USB_VENDOR_ID_MICROSOFT, USB_DEVICE_ID_WIRELESS_OPTICAL_DESKTOP_3_0) },
    { HID_USB_DEVICE(USB_VENDOR_ID_MONTEREY, USB_DEVICE_ID_GENIUS_KB29E) },
    { HID_USB_DEVICE(USB_VENDOR_ID_NTRIG, USB_DEVICE_ID_NTRIG_TOUCH_SCREEN) },
    + { HID_USB_DEVICE(USB_VENDOR_ID_ORTEK, USB_DEVICE_ID_ORTEK_WKB2000) },
    { HID_USB_DEVICE(USB_VENDOR_ID_PETALYNX, USB_DEVICE_ID_PETALYNX_MAXTER_REMOTE) },
    { HID_USB_DEVICE(USB_VENDOR_ID_SAMSUNG, USB_DEVICE_ID_SAMSUNG_IR_REMOTE) },
    { HID_USB_DEVICE(USB_VENDOR_ID_SONY, USB_DEVICE_ID_SONY_PS3_CONTROLLER) },
    diff -uprN linux-2.6.32.3.vanilla/drivers/hid/hid-ids.h linux-2.6.32.3/drivers/hid/hid-ids.h
    --- linux-2.6.32.3.vanilla/drivers/hid/hid-ids.h 2010-01-11 20:09:17.880426925 +0000
    +++ linux-2.6.32.3/drivers/hid/hid-ids.h 2010-01-11 20:20:01.931428309 +0000
    @@ -352,6 +352,9 @@
    #define USB_VENDOR_ID_ONTRAK 0x0a07
    #define USB_DEVICE_ID_ONTRAK_ADU100 0x0064

    +#define USB_VENDOR_ID_ORTEK 0x05a4
    +#define USB_DEVICE_ID_ORTEK_WKB2000 0x2000
    +
    #define USB_VENDOR_ID_PANJIT 0x134c

    #define USB_VENDOR_ID_PANTHERLORD 0x0810
    diff -uprN linux-2.6.32.3.vanilla/drivers/hid/hid-ortek.c linux-2.6.32.3/drivers/hid/hid-ortek.c
    --- linux-2.6.32.3.vanilla/drivers/hid/hid-ortek.c 1970-01-01 01:00:00.000000000 +0100
    +++ linux-2.6.32.3/drivers/hid/hid-ortek.c 2010-01-12 18:37:32.203180509 +0000
    @@ -0,0 +1,56 @@
    +/*
    + * HID driver for Ortek WKB-2000 (wireless keyboard + mouse trackpad).
    + * Fixes LogicalMaximum error in USB report description, see
    + * http://bugzilla.kernel.org/show_bug.cgi?id=14787
    + *
    + * Copyright (c) 2010 Johnathon Harris <jmharris@gmail.com>
    + */
    +
    +/*
    + * This program is free software; you can redistribute it and/or modify it
    + * under the terms of the GNU General Public License as published by the Free
    + * Software Foundation; either version 2 of the License, or (at your option)
    + * any later version.
    + */
    +
    +#include <linux/device.h>
    +#include <linux/hid.h>
    +#include <linux/module.h>
    +
    +#include "hid-ids.h"
    +
    +static void ortek_report_fixup(struct hid_device *hdev, __u8 *rdesc,
    + unsigned int rsize)
    +{
    + if (rsize >= 56 && rdesc[54] == 0x25 && rdesc[55] == 0x01) {
    + dev_info(&hdev->dev, "Fixing up Ortek WKB-2000 "
    + "report descriptor.\n");
    + rdesc[55] = 0x92;
    + }
    +}
    +
    +static const struct hid_device_id ortek_devices[] = {
    + { HID_USB_DEVICE(USB_VENDOR_ID_ORTEK, USB_DEVICE_ID_ORTEK_WKB2000) },
    + { }
    +};
    +MODULE_DEVICE_TABLE(hid, ortek_devices);
    +
    +static struct hid_driver ortek_driver = {
    + .name = "ortek",
    + .id_table = ortek_devices,
    + .report_fixup = ortek_report_fixup
    +};
    +
    +static int __init ortek_init(void)
    +{
    + return hid_register_driver(&ortek_driver);
    +}
    +
    +static void __exit ortek_exit(void)
    +{
    + hid_unregister_driver(&ortek_driver);
    +}
    +
    +module_init(ortek_init);
    +module_exit(ortek_exit);
    +MODULE_LICENSE("GPL");
    No longer participating......

Page 1 of 3 123 LastLast

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •