thefloweringash / iousbhiddriver-descriptor-override

Fix broken USB HID descriptors. Now with Noppoo Choc Mini support!
http://thefloweringash.github.io/iousbhiddriver-descriptor-override
GNU Lesser General Public License v3.0
204 stars 25 forks source link

A brief HOWTO would be helpful? #1

Closed x1a0 closed 12 years ago

x1a0 commented 12 years ago

Hi,

I have a Noppoo Choc Mini and wanna to make it work for my Mac. Your post seems to be the most likely solution for me and lead me to this repository.

I checked out the codes and build it in xcode, then I copied the kext to /System/Library/Extensions and restart. However the problem of this keyboard is still there... same as before.

Not sure what I should do to make it work. Could you please provide a brief HOWTO to explain how to make it work?

Thank you very much!

thefloweringash commented 12 years ago

Hi,

I don't know the correct way to make the kernel module load on startup, which is mostly likely the reason it's not working. Try unplugging the keyboard and loading the module with kextload (and checking it was loaded with kextstat) before plugging the keyboard in.

$ sudo kextload /System/Library/Extensions/IOUSBHIDDriverDescriptorOverride.kext
$ kextstat | grep ryangoulden.driver.IOUSBHIDDriverDescriptorOverride
  177    0 0xffffff7f810e8000 0x2000     0x2000     ryangoulden.driver.IOUSBHIDDriverDescriptorOverride (1) <57 25 4 3>

Hope this helps.

x1a0 commented 12 years ago

Hi,

Thanks for the reply and I am now typing this comment with my Noppoo Choc Mini - awesome!

I think there are still some problem. I tried to read the source code and the info.plist file however I cannot figure it out from there.

Could you give a clue about how to resolve these problems, Thanks!

thefloweringash commented 12 years ago

Hi,

The source here isn't too interesting, with the only contribution being the added descriptors for the Noppoo. The unencoded versions are easier to read. To compile them you'll need LUFA's HIDReportData.h.

I don't know about the Caps Lock key, I don't tend to have it enabled. I'll look in to it and see if there's something I missed.

On MacOS, the modifier state is per-keyboard. That is, if you plug in two keyboards, press shift on one and a letter key on the other, the letter will be lowercase. The shift key on the Noppoo is effectively on a different keyboard the punctuation. Fortunately this can be changed by installing KeyRemap4MacBook. Just installing it is enough.

Hope this helps.

kns7977 commented 12 years ago

Hi floweringash, Thank you for making this solution for the noppoo owners. I've bought noppoo choc mini recently, but at the same time I switched to mac. Any kext modification i've even done was with actual .kext file, so I'm a bit lost with your source code. I've tempered with xCode Dev tool, but couldn't find a way to make a .kext file. (I loaded your git repository and it made a clone, but I'm stuck from here) Do you think you can help me a little with this?

ozanmakes commented 12 years ago

Hi @thefloweringash

I'm a new Mac OS X user with a Noppoo keyboard, but mine is a full sized Noppoo Choc Pro. I tried your kext and it didn't fix all the keys. I've been trying to add support for my keyboard but I'm lost. Can you give a few pointers on what steps did you take to analyze and add support for Choc Mini?

Thanks, Ozan.

thefloweringash commented 12 years ago

Hi @meegee

In short:

  1. Use the USB Prober (part of Hardware IO Tools for Xcode) to examine the device's HID report descriptor.
  2. Identify the problem. The Choc Mini has one input with both Usage Minimum and Usage Maximum as well as literal Usage values in the same Input.
  3. Get an editable version of the HID report descriptor. I did this by hand, and produced a .c file using LUFA's HIDReportData.h that would output a plist compatible encoding of the new descriptors. This step could certainly be improved.
  4. Edit! Fix the issue :-)
  5. Make a new entry in the Info.plist that matches your keyboard with the updated report descriptor.

When reading the descriptor, the HID Usage Tables may be useful.

If you have any more questions feel free to ask.

Hope this helps

thefloweringash commented 12 years ago

I have updated the plist file to load the module on startup and added an installer package to the download section. I believe this resolves this issue.

The modifier keys (including caps lock) are outside of the scope of this project.

thefloweringash commented 12 years ago

Hi @meegee,

How far did you get with support for the Choc Pro? If you're able to extract the HID descriptor for the keyboard but aren't sure how to fix it, consider posting it somewhere so I can see if I can help.

Thanks

ozanmakes commented 12 years ago

Hi @thefloweringash, Sorry for the delay and making you write step by step instructions, turns out I did not need them all (perhaps they will be useful for someone with a board like Ducky). Anyways, I made a pull request.