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: USBNotification sample code error



In FindInterfaces() it should start at 1, but be <= intfNumEndpoints.
Is it possible that the endpoint is isochronous instead of bulk?
For high speed, the max packet size for isochronous endpoints is 1024 bytes, and for full speed 1023 bytes.
Do you have the assembly code for the device descriptor? If so you can verify the endpoint descriptors.

-Andrew

On 23-Mar-07, at 4:40 PM, email@hidden wrote:

I was having trouble getting information about the interfaces on a device I am trying to work with that uses the Cypress FX2 chip.

My code was based on the Apple "USBNotification" code but my code was not getting information from the last interface from my device. USB Prober showed the interface but my code did not.

It turns out the line:

for (pipeRef = 1; pipeRef < intfNumEndpoints; pipeRef++) // in function FindInterfaces()

should be:

for (pipeRef = 0; pipeRef <= intfNumEndpoints; pipeRef++) // use "<=" in the for loop

Now my code sees the last interface from the device but it sees a maxPacketSize of 1024 (US Prober sees this too).

Barry Twycross wrote: "1024 byte would be an illegal value for a high speed bulk endpoint. "

I think that the firmware of the device may have incorrect device descriptor data in it.

When I try to read from that endpoint my code prints:

unable to do bulk read (e00002e8)
unable to find interfaces on device: e00002e8

Does anyone have any ideas what is going on? (The device works fine with the firmware that I have under Windows XP)

Thanks for any help

Check Out the new free AIM(R) Mail -- 2 GB of storage and industry-leading spam and email virus protection.
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Usb mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

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: 
 >USBNotification sample code error (From: 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.