Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Possible to ignore kIOHIDOptionsTypeSeizeDevice ?



Thanks for the information. I was able to prevent the Griffin Driver from getting exclusive access and, unfortunately, from working at all. Eventually we hope to find a way to coexist with their driver rather than just preempting it. Any suggestions?

We came across another question while working on this. We are trying to get the most data we can from this device. We're working with other devices that have wheels also, such as mice with scroll wheels. The problem we are having is that there are not as many events being generated by them as we would expect. For example, when capturing scrollWheel events from the Powermate we only see about 3 or 4 events per quarter-turn when the knob is turned quickly. My scroll mouse is about the same. Is this determined in the USB devices' hardware or is the system throttling the information down somewhere down the line? I know that the mouse pointer generates lots of events every time you move it even a little bit. Is it possible to get that kind of granularity from scroll-wheels or are they limited in hardware? I ran USBProber and it seems to get a lot of info every time the knob twitches but I don't know what information is being passed there.
Thanks in advance for any information.



-Ben



On Aug 16, 2005, at 11:04 AM, Rob Yepez wrote:

Hi Ben,

In this case though, you want to make sure that the IOUSBHIDDriver matches on this device. This will allow you use the HID Manager for this device. To do so you, make sure you add/replace the following keys/values to the example personality:

            <key>CFBundleIdentifier</key>
            <string>com.apple.iokit.IOUSBHIDDriver</string>
            <key>IOClass</key>
            <string>IOUSBHIDDriver</string>

- Rob

On Aug 16, 2005, at 9:43 AM, Rich Kubota wrote:


Ben,

I will send an example of a codeless kext which is designed to keep the white apple USB Extended Keyboard from matching the the system HID driver. It renders the keyboard useless. The purpose of the sample is more as an example. You would only want to test with it by manually loading it with kextload.

Note the attachement will come in a separate email directly for you.

The project creates a kext call "HIDNoMatchDevice"

to modify it to work with your device,
1. open the project file
2. in the project window open the "Info.plist" file
Note the following IOKit Personality

    <key>IOKitPersonalities</key>
    <dict>
        <key>White AppleKeyboard</key>
        <dict>
            <key>CFBundleIdentifier</key>
            <string>com.apple.kernel.iokit</string>
            <key>IOClass</key>
            <string>IOservice</string>
            <key>IOProviderClass</key>
            <string>IOUSBInterface</string>
            <key>bConfigurationValue</key>
            <integer>1</integer>
            <key>bInterfaceNumber</key>
            <integer>1</integer>
            <key>bcdDevice</key>
            <integer>290</integer>
            <key>idProduct</key>
            <integer>516</integer>
            <key>idVendor</key>
            <integer>1452</integer>
        </dict>
    </dict>


You want to set the following properties to match your device

bConfigurationValue
bInterfaceNumber
bcdDevice
idProduct
idVendor

Save the file and build the kext.

Use kextload to manually load the kernel extension, then attach your device. Use USBProber to verify that the kext was match to your device with a probe score of 10000.

rich kubota

At 10:19 AM -0600 8/16/05, Ben Hanks wrote:


If anybody has pointers on how to write such a kext I would appreciate it.

-Ben


On Aug 15, 2005, at 5:45 PM, Raleigh Ledet wrote:



 Ben,




I thought that the
kIOHIDOptionsTypeSeizeDevice was supposed to be able to grab control from
everyone else...?





If you think about it, letting any software grab control of the device at any time would be a bad thing. For instance, you don't want some other app coming along and Seizing the device after you seized it. (Particularly if you are in the middle of an important read.)


I would venture to guess that the Griffin driver is already opening the device for exclusive use. If that's the case, all you can do is either not install the Griffin driver, or write your own kext that matches at a lower level and can selectively route the data to your app or back up the normal IO chain to the griffin driver.

You should, however, be getting either a kIOReturnExclusiveAccess, or kIOReturnNotPrivileged errors. Do you get back a different error if you try to open the device normally?

 -raleigh

 -----------------------------------------------
 Raleigh Ledet, <email@hidden>
 Wacom Technology Corp.
 Mac Software Engineer






_______________________________________________ Do not post admin requests to the list. They will be ignored. Usb mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/usb/email@hidden

This email sent to email@hidden



-- Sincerely, Rich Kubota email@hidden (408) 974-6212 _______________________________________________ Do not post admin requests to the list. They will be ignored. Usb mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/usb/email@hidden

This email sent to email@hidden






_______________________________________________ Do not post admin requests to the list. They will be ignored. Usb mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/usb/email@hidden

This email sent to email@hidden
References: 
 >Re: Possible to ignore kIOHIDOptionsTypeSeizeDevice ? (From: Rob Yepez <email@hidden>)
 >Re: Possible to ignore kIOHIDOptionsTypeSeizeDevice ? (From: "Ben Hanks" <email@hidden>)
 >Re: Possible to ignore kIOHIDOptionsTypeSeizeDevice ? (From: Raleigh Ledet <email@hidden>)
 >Re: Possible to ignore kIOHIDOptionsTypeSeizeDevice ? (From: Ben Hanks <email@hidden>)
 >Re: Possible to ignore kIOHIDOptionsTypeSeizeDevice ? (From: Rich Kubota <email@hidden>)
 >Re: Possible to ignore kIOHIDOptionsTypeSeizeDevice ? (From: Rob Yepez <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.