Re: USB Diagnostic Application by nutty
nutty
Tue Oct 03 09:12:59 CDT 2006
Valter Minute wrote:
> nutty.sawant@gmail.com wrote in
> news:1159416245.553629.275230@m73g2000cwd.googlegroups.com:
>
> > Hello ALL,
> >
> > I m a biginner in WinCE 5.0, I don't know much about it.
> > My project is to write one diagnostic application for the USB. I.e
> > to check the functionality of the USB port like open the port,
> > write some data to the USB device, the Rad back and compare the
> > data,etc.
> >
> > Please let me know can i use the same CreateFile() function to
> > check whether USB port is there are not.
>
> USB "ports" cannot be accessed directly.
> USB is a complex protocol and can support a "chain" of devices
> connected directly through the USB host controller ports or via one
> or more hubs.
> You may have a USB host controller and in this case to exchange
> information with a USB device you will have to open a "pipe" to one
> of his endpoints (a device can have multiple input and output
> endpoints) using the right transfer type (interrupt, block, control,
> Isochronous) for that endpoint.
> If your device has a USB device port it should be connected to a
> host and you have to write the code to provide endpoints required by
> the specific protocol you're going to support.
> Windows CE provides some drivers that can be used to control devices
> via USB host (mass-storage, RNDIS, printer, Human Interface Devices,
> bluetooth dongles etc.) and also drivers to support some protocols
> from the device side (mass-storage, RNDIS, activesync).
> You will also need a low-level driver that will allow the high-level
> layers of the OS to interact with your hardware controller. Usually
> those drivers are provided by the device manufacturer (for embedded
> processors) or support a standard (OHCI, UHCI etc.).
>
> I suggest to read the "USB Devices" article in PB help and the links
> it provides to have a more detailed explanation of how USB works and
> how you can access it on Windows CE.
>
> --
> Valter Minute
> (the reply address of this message is invalid)
> (l'indirizzo di reply di questo messaggio non =E8 valido)
Hello,
Thanks for ur reply.
Please tell me the API to Access the USB poet i.e the api which will
return me the USB HANDLE.
Somewhere in the Platform Builder Help Menu, i have read that the
CreateFile Function is used to open the Usb Handle. Is it right??
In the open pipe API the first parameter is the USB_HANDLE. How to get
this parameter??
Please guide me...
Thanks & Regards,
Nutty