Mailing Lists: Apple Mailing Lists

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

setInterruptReportHandlerCallback don't work in Mac OS X 10.4




Hi,

  I'm working on an HID device. All input data come in via an interruptPipe(End Point 1). I must receive all  the input data in my program.

   First, I write a code-less kext cause the HID driver not to match my device,
then I read from the interrupt pipe in my user-client application. It works fine in OS 10.2, 10.3 and 10.4. But when I told our customer they need to install the kext with a root account, they said this is not so user-friendly because the root account is disable by default in MAC OS X. Most of user don't known how to enable it and most of our MAC software does not require the user to login as the root user. How can I make my kext work without enable the root account?


  So I had to give up the kext method and receive data by using the setInterruptReportHandlerCallback method. It works OK in OS 10.3 but not in 10.4. In 10.4 the interrupt callback function just not happen when data come in.

 Here is my code:
---------code begin------------------------
//createasynceventsource

      CFRunLoopSourceRef CFRunLoopSourceRef = CFRunLoopGetCurrent();

    kr = (*(IOHIDDeviceInterface**) upsDataRef->hidDeviceInterface)->createAsyncEventSource(upsDataRef->hidDeviceInterface,&CFRunLoopSourceRef);    
   
    //set interrupt call back

    receivebufferlen = 64;
    memset(receivebuf,0,64);

    kr = (*(IOHIDDeviceInterface122**) upsDataRef->hidDeviceInterface)->setInterruptReportHandlerCallback(upsDataRef->hidDeviceInterface,receivebuf,receivebufferlen,myIOHIDCallbackFunction,NULL,NULL);    
--------------code end-----------------------------------------------

It's very urgent for to solve this problem. Would anyone be able to help me figure out this problem? Any help would be much appreciated. Thank you.

Thanks,
Beth

 _______________________________________________
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



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.