Google Answers Logo
View Question
 
Q: Host USB sample ( No Answer,   2 Comments )
Question  
Subject: Host USB sample
Category: Computers > Programming
Asked by: marinero_joven-ga
List Price: $15.00
Posted: 29 Dec 2003 18:35 PST
Expires: 28 Jan 2004 18:35 PST
Question ID: 291280
I need a sample of software for the host computer USB to send data to
an already developed USB firmware.  I am using Windows 2000, VC++ 6.0,
and win32 API (not MFC).  I have already searched MSDN.

Clarification of Question by marinero_joven-ga on 08 Jan 2004 05:44 PST
In regards to comment about overwriting firmware, the answer is no.  I
am looking for API or procedure/function for talking to a USB device
in an application.  In reflecting on this, you could use the same
software to load the memory on the USB device.  There are WIN32 API's
for Serial ports, printers, etc. but I haven't found any for USB.

Thanks,

John
Answer  
There is no answer at this time.

Comments  
Subject: Re: Host USB sample
From: scubapup-ga on 07 Jan 2004 10:39 PST
 
Is this like overwriting the existing firmware?
Subject: Re: Host USB sample
From: drdigits-ga on 19 Jan 2004 11:44 PST
 
marinero_joven-ga,

There is no seperate API for reading/writing to a USB device. 
Instead, you use the CreateFile/ReadFile/WriteFile routines.  However,
in order to do this, you must have a "Device Driver" for the device.

USB has four seperate ways of "Talking".  These are called "Control
Transfers", "Interrupt Transfers", "Bulk Transfers", and "Isochronous
Transfers".  All devices use Control Transfers to connect to the
computer.  The devices announce their device type, and Windows then
searches for the installed driver.  The driver connects to the device
and presents a "Device Name" for you to Open().

If your device is a common one, go to the manufacturers site to
download the driver.  If you are working with a custom device, you
will need to speak with whoever programmed the firmware to find out
about the driver.  If you are the firmware programmer, you need to
spend some time learning about the protocol.

I'd be happy to answer specific questions.

Important Disclaimer: Answers and comments provided on Google Answers are general information, and are not intended to substitute for informed professional medical, psychiatric, psychological, tax, legal, investment, accounting, or other professional advice. Google does not endorse, and expressly disclaims liability for any product, manufacturer, distributor, service or service provider mentioned or any opinion expressed in answers or comments. Please read carefully the Google Answers Terms of Service.

If you feel that you have found inappropriate content, please let us know by emailing us at answers-support@google.com with the question ID listed above. Thank you.
Search Google Answers for
Google Answers  


Google Home - Answers FAQ - Terms of Service - Privacy Policy