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: Using getReport with a HID device...




On Apr 13, 2005, at 8:39 PM, Rob Yepez wrote:

Hi Charles,

The reportID in getReport refers to the report ID associated with the particular feature report you are trying obtain.  This corresponds in the first byte of the report if there are more than one reports associated with the device.  Since your example is modifying the first byte, it's safe to say that there are not multiple reports defined by the device.  In this case, just use 0 for the reportID.

The reportID information should be detailed in the report descriptor for the device.  To view the descriptor on X, use the USB Prober application located in /Developer/Applications/Utilities/.

- Rob


OK, I did the following

HIDPreparsedDataRef dataRef;
long rSize = kBufferSize;
char buffer[kBufferSize];
IOReturn ioReturnValue = kIOReturnSuccess;

// First, open the device...

ioReturnValue = (*hidDeviceInterface)->open( hidDeviceInterface , 0 );

//

ioReturnValue = HIDOpenReportDescriptor ( hidDeviceInterface ,
sizeof( hidDeviceInterface ) ,
&dataRef ,
kHIDFlag_StrictErrorChecking );

ioReturnValue = getReport (hidDeviceInterface, kIOHIDReportTypeInput, 0, buffer, &rSize, -1, nil, nil, nil);

When the system tries to execute getReport the program dies stating that it "...has executed due to signal 10 (SIGBUS)." kBufferSize is 16384. I don't have a clue what "signal 10" is nor am I sure what I did wrong. Can anybody please give me some clues?
 _______________________________________________
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: 
 >Using getReport with a HID device... (From: Charles Reader <email@hidden>)
 >Re: Using getReport with a HID device... (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.