OpenQNX :: The QNX Community Portal

Jul 19, 2008 - 03:23 PM
Google
  Web openqnx.com   
     Create an account Home · Submit News · QNX Forums · QNX Download · Search   
_
Main Menu
Who's Online
There are 47 unlogged users and 1 registered user online.

You can log-in or register for a user account here.

Post new topic   Reply to topic
View previous topic Printable version Log in to check your private messages View next topic
Author Message
duttn
Post subject: usbd_open_pipe  PostPosted: Jul 06, 2007 - 03:22 PM
New Member


Joined: Jul 06, 2007
Posts: 5

Hi,

I am trying to writing code to open and interact with the USB stack. When I call usbd_open_pipe, it works properly for the control endpoint and the Bulk Out endpoint, but not for the Bulk In endpoint.

I know that the device I am using is a Bulk Input/Output device. Below is a part of the output form usb -vvv.

Configurations : 1
Configuration : 1
Attributes : 0x80 (Bus-powered)
Max Power : 60 mA
Interfaces : 1
Interface : 0 / 0
Class : 0xff (Vendor-specific)
Subclass : 0xff
Protocol : 0xff
Endpoints : Control + 2
Endpoint : 0
Attributes : Control
Max Packet Size: 8
Endpoint : 1
Attributes : Bulk/IN
Max Packet Size: 64
Endpoint : 2
Attributes : Bulk/OUT
Max Packet Size: 64

I am using the following code to access the endpoints.

endpt0 = usbd_endpoint_descriptor(device, 1, 0, 0, 0, &node);
if(endpt0 == 0)
printf("control error \n");

endpt1 = usbd_endpoint_descriptor(device, 1, 0, 0, 1, &node);
if(endpt1 == 0)
printf("Bulk IN error \n");

endpt2 = usbd_endpoint_descriptor(device, 1, 0, 0, 2, &node);
if(endpt2 == 0)
printf("Bulk OUT error \n");

I would be very grateful, if anybody could help me with this problem. Thank you so much.
 
 View user's profile Send private message  
Reply with quote Back to top
duttn
Post subject: RE: usbd_open_pipe  PostPosted: Jul 06, 2007 - 03:31 PM
New Member


Joined: Jul 06, 2007
Posts: 5

I missed adding some code to the above message. Here it is:

res0 = usbd_open_pipe(device, endpt0, &pipe_ctrl);
if(res0 != EOK)
printf("Control error \n");

res1 = usbd_open_pipe(device, endpt1, &pipe_in);
if(res1 != EOK)
printf("Bulk IN error \n");

res2 = usbd_open_pipe(device, endpt2, &pipe_out);
if(res2 != EOK)
printf("Bulk OUT error \n");

Thanks again.
 
 View user's profile Send private message  
Reply with quote Back to top
Display posts from previous:     
Jump to:  
All times are GMT
Post new topic   Reply to topic
View previous topic Printable version Log in to check your private messages View next topic
Powered by PNphpBB2 © 2003-2007 The PNphpBB Group
Credits
All logos and trademarks in this site are property of their respective owners. The comments are property of their posters.
Powered by OpenQNX: The QNX Community Portal Site
QNX and the QNX logo are registered trademarks of QNX Software Systems.