unbit / foohid

OSX IOKit driver for implementing virtual HID devices (joypads, keyboards, mices, ...) from userspace
MIT License
265 stars 36 forks source link

'Unable to create HID device' if running examples twice #2

Closed albhm closed 8 years ago

albhm commented 8 years ago

Hi,

Great project (hope the kext gets signed some day)! Only one minor complaint: If the C examples are killed with ctrl-c and are run again they don't work because the destroy method never got called. That confused me at first until I decided to just comment out the corresponding exit(1).

aldur commented 8 years ago

Thanks for reporting. You're right, it's counter-intuitive, I'll fix that. For the signature: The latest release should be already signed:

aldur@AldursMacbook: /Library/Extensions
      » codesign -dv foohid.kext
Executable=/Library/Extensions/foohid.kext/Contents/MacOS/foohid
Identifier=it.unbit.foohid
Format=bundle with Mach-O thin (x86_64)
CodeDirectory v=20200 size=439 flags=0x0(none) hashes=15+3 location=embedded
Signature size=8595
Timestamp=24 Mar 2016 10:18:47
Info.plist entries=21
TeamIdentifier=M7LZE6X8GL
Sealed Resources version=2 rules=12 files=0
Internal requirements count=1 size=176

Can you please check and report back? :)

albhm commented 8 years ago

I'm too lazy to re-enable SIP right now, so I'll believe you ;-) The link in the readme is pointing to release 0.1 and that didn't work. After that I compiled from source and didn't check for newer releases. But if I'll ever re-enable the SIP 'feature' and it stops working I'll tell you!

Not that I really care, but os x is warning me that the installer is from an unidentified developer. Maybe you can use your mighty signing powers on that as well...

aldur commented 8 years ago

Again, thanks for spotting that. Commits 68c554946d6604393aa63d236ab6e104a5aefcf6 and 2f13fa319232b05e6f913f4d5ad601f22edff6c8 should solve, respectively, the issue with the latest release not being linked correctly in the README.md and the one with the examples.

For the installer, are we still talking about release 0.1? The latest should be signed too: screen shot 2016-03-26 at 19 38 00

albhm commented 8 years ago

Thanks for your quick response. I'm pretty sure I got the 'unidentified developer' warning when opening the 0.2.1 installer for the first time. I don't know how to repeat that though. I could test it on another mac in a few days. OS version is 10.11.4. Upon closer inspection it likely is some funny behavior of my system unrelated to foohid. If I remember correctly I also got the warning for a flight simulator I installed today ( http://www.cgm-online.com/rc-heli-simulator/_download.html). I now checked it and it seems to be properly signed too. System preferences are set to allow 'mac app store + indentified developer' but it acts like 'mac app store' only.

aldur commented 8 years ago

It may indeed be system dependent, I tried it on different Macs and it worked flawlessly. Thanks again and feel free to re-open this if you encounter the same problem on other machines.

albhm commented 8 years ago

I also tried it today on another mac on which it worked well too. So everything's fine for now!