On 2/27/03 2:47 AM, Carlyang wrote:
> I have a Hid device. When I write a report it, it behave correctly(do what I
> want it to do), though the return value is NOT equal to kIOReturnSucess(the
> return value is -536854447). when I try to read from it, I can get nothing
> from it. All datas I preset in the buffer do not been changed. The return
> value is -536854449.
> What do the both return values mean?
GNU gdb 5.3-20021014 (Apple version gdb-250) (Sat Dec 7 02:14:27 GMT 2002)
Copyright 2002 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for details.
This GDB was configured as "powerpc-apple-macos10".
(gdb) p/x -536854447
$1 = 0xe0004051
(gdb) p/x -536854449
$2 = 0xe000404f
/* ************* USB Family error codes ************* */
#define iokit_usb_err(return) (sys_iokit|sub_iokit_usb|return)
#define kIOUSBUnknownPipeErr iokit_usb_err(97) // 0x61 Pipe ref not
#define kIOUSBTooManyPipesErr iokit_usb_err(96) // 0x60 Too many
#define kIOUSBNoAsyncPortErr iokit_usb_err(95) // 0x5f no async port
#define kIOUSBNotEnoughPipesErr iokit_usb_err(94) // 0x5e not enough
pipes in interface
#define kIOUSBNotEnoughPowerErr iokit_usb_err(93) // 0x5d not enough
power for selected configuration
#define kIOUSBEndpointNotFound iokit_usb_err(87) // 0x57 Not found
#define kIOUSBConfigNotFound iokit_usb_err(86) // 0x56 Not found
#define kIOUSBTransactionTimeout iokit_usb_err(81) // 0x51 time out
#define kIOUSBTransactionReturned iokit_usb_err(80) // 0x50 The
transaction has been returned to the caller
#define kIOUSBPipeStalled iokit_usb_err(79) // 0x4f Pipe has
stalled, error needs to be cleared
#define kIOUSBInterfaceNotFound iokit_usb_err(78) // 0x4e Interface
ref not recognized
#define kIOUSBLowLatencyBufferNotPreviouslyAllocated iokit_usb_err(77) //
0x4d Attempted to use user land low latency isoc calls w/out calling
#define kIOUSBLowLatencyFrameListNotPreviouslyAllocated iokit_usb_err(76)
// 0x4c Attempted to use user land low latency isoc calls w/out calling
So, your first error is a kIOUSBTransactionTimeout error. The device never
responded to your request and it timed out after 5 seconds. The second
error is kIOUSBPipeStalled. Your device did not understand your request.
A getReport() will be sent as a request on the default (control) pipe. If
your reports are coming through the interrupt IN pipe you will need to use
the HID Manager to get the desired elements. There is currently no way to
get the raw report.
We are looking into fixing getReport() so that you get all reports,
regardless of which pipe they come in. No estimate on whether and when we
will deliver this fix.
Fernando Urbina mailto:email@hidden
USB Technology Team work: 719.534.9387
Apple Computer, Inc. fax: 719.532.0981
usb mailing list | email@hidden
Do not post admin requests to the list. They will be ignored.