Discussion:
USB host Application Development
(too old to reply)
sanju
2009-05-04 12:02:02 UTC
Permalink
Hi All,

I'm new into USB application development and I've to develop a U.S.B
Application for a U.S.B sound device which must be able to run on
Windows XP/Vista. The purpose of this application is to get the data
from the USB port, sent by the USB sound device. The application has
to fetch the data at a good rate and without any compromise in the
data integrity.

In order to achieve the above said things, i need answers for the
questions below.

1. Which of the 3 options can be used to get access to the sound
device?
a.UMDF
b.KMDF
c.WinUSB

2.The device driver for this device is still not implemented, and on
what type of transfer could it be developed for this sound device?

a.Isochronous.
b.Bulk

If I assume it to be Isochronous then the retransmission will not be
possible. If i assume it to be Bulk Transfer, the data transfer cannot
happen continuously. Which of these 2 transfers are best suited for
the data transfer without much loss in the data?

3.In the 'WinUSB how to use WinUSB to communicate with a USB
device.doc', the control command usage and construction of a setup
packet are expalined, however these code snippets are not found in the
UMDF/KMDF. Is it specific to only WinUSB?

4.In the WDK source code sample, the USB application in the path given
below belongs to which of the 3 options?(UMDF,KMDF,WinUSB)?
C:\WinDDK\6001.18002\src\usb\isousb\exe
C:\WinDDK\6001.18002\src\usb\bulkusb\exe

Please help.

Regards,
Sanjay
Doron Holan [MSFT]
2009-05-05 17:48:24 UTC
Permalink
do you want this device to appear to windows as an audio device (e.g. one
that windows can play sounds on?)

d
--
This posting is provided "AS IS" with no warranties, and confers no rights.
Post by sanju
Hi All,
I'm new into USB application development and I've to develop a U.S.B
Application for a U.S.B sound device which must be able to run on
Windows XP/Vista. The purpose of this application is to get the data
from the USB port, sent by the USB sound device. The application has
to fetch the data at a good rate and without any compromise in the
data integrity.
In order to achieve the above said things, i need answers for the
questions below.
1. Which of the 3 options can be used to get access to the sound
device?
a.UMDF
b.KMDF
c.WinUSB
2.The device driver for this device is still not implemented, and on
what type of transfer could it be developed for this sound device?
a.Isochronous.
b.Bulk
If I assume it to be Isochronous then the retransmission will not be
possible. If i assume it to be Bulk Transfer, the data transfer cannot
happen continuously. Which of these 2 transfers are best suited for
the data transfer without much loss in the data?
3.In the 'WinUSB how to use WinUSB to communicate with a USB
device.doc', the control command usage and construction of a setup
packet are expalined, however these code snippets are not found in the
UMDF/KMDF. Is it specific to only WinUSB?
4.In the WDK source code sample, the USB application in the path given
below belongs to which of the 3 options?(UMDF,KMDF,WinUSB)?
C:\WinDDK\6001.18002\src\usb\isousb\exe
C:\WinDDK\6001.18002\src\usb\bulkusb\exe
Please help.
Regards,
Sanjay
sunwins
2009-05-07 11:51:20 UTC
Permalink
Hi Doron,

Thanks for your response.

Actually, the device how it should appear and all depends on the drive
developer, right?..He decides which class this device belongs to, i
could be an audio class device/custom device. I want to be ready t
develop an application for either of the options.

The device gives sound output for sure. Its kind of a device whic
gives ultrasound, and its not just another music device or anything lik
it. This ultrasound has to be accessible only by another applicatio
which sits on top of my application.

So i have to develop an application which can access data from the US
port sent by my device, and copy it to a buffer, do no modification
whatsoever so that the application sitting above my application cn tak
it.

Can I use the SetUp APIs lik
SetUpDiGetClassDivs()(),SetupDiEnumDeviceInterfaces()..etc to get th
data from the port, or is there any better way to do it?

Please reply.

Thanks,
Sanja

--
sunwin
-----------------------------------------------------------------------
sunwins's Profile: http://forums.techarena.in/members/96929.ht
View this thread: http://forums.techarena.in/windows-device-drivers/1173403.ht

http://forums.techarena.i
Doron Holan [MSFT]
2009-05-07 21:27:36 UTC
Permalink
if you want windows to treat it as an audio device which windows renders
audio to, you hsould conform to the usb audio class spec. if you want a
device that you can speak to with a custom app, you can make it a custom
device that does not belong to any defined device class. if you do not use
isoch pipes, you can use winusb and not even have to write a driver. if you
need isoch, then you must write your own driver, I would start with usbsamp
in the latest wdk.
SetUpDiGetClassDivs()(),SetupDiEnumDeviceInterfaces()..etc to get the
these let you find the device, CreateFile/DeviceIoControl are the ones that
let you open it and send it io

d
--
This posting is provided "AS IS" with no warranties, and confers no rights.
Hi Doron,
Thanks for your response.
Actually, the device how it should appear and all depends on the driver
developer, right?..He decides which class this device belongs to, it
could be an audio class device/custom device. I want to be ready to
develop an application for either of the options.
The device gives sound output for sure. Its kind of a device which
gives ultrasound, and its not just another music device or anything like
it. This ultrasound has to be accessible only by another application
which sits on top of my application.
So i have to develop an application which can access data from the USB
port sent by my device, and copy it to a buffer, do no modifications
whatsoever so that the application sitting above my application cn take
it.
Can I use the SetUp APIs like
SetUpDiGetClassDivs()(),SetupDiEnumDeviceInterfaces()..etc to get the
data from the port, or is there any better way to do it?
Please reply.
Thanks,
Sanjay
--
sunwins
------------------------------------------------------------------------
sunwins's Profile: http://forums.techarena.in/members/96929.htm
http://forums.techarena.in/windows-device-drivers/1173403.htm
http://forums.techarena.in
sanju
2009-05-12 04:56:58 UTC
Permalink
On May 8, 2:27 am, "Doron Holan [MSFT]"
Post by Doron Holan [MSFT]
if you want windows to treat it as an audio device which windows renders
audio to,  you hsould conform to the usb audio class spec.  if you want a
device that you can speak to with a custom app, you can make it a custom
device that does not belong to any defined device class.  if you do not use
isoch pipes, you can use winusb and not even have to write a driver.  if you
need isoch, then you must write your own driver, I would start with usbsamp
in the latest wdk.
SetUpDiGetClassDivs()(),SetupDiEnumDeviceInterfaces()..etc to get the
these let you find the device, CreateFile/DeviceIoControl are the ones that
let you open it and send it io
d
--
This posting is provided "AS IS" with no warranties, and confers no rights.
Hi Doron,
Thanks for your response.
Actually, the device how it should appear and all depends on the driver
developer, right?..He decides which class this device belongs to, it
could be an audio class device/custom device. I want to be ready to
develop an application for either of the options.
The device gives sound output for sure. Its kind of a device which
gives ultrasound, and its not just another music device or anything like
it. This ultrasound has to be accessible only by another application
which sits on top of my application.
So i have to develop an application which can access data from the USB
port sent by my device, and copy it to a buffer, do no modifications
whatsoever so that the application sitting above my application cn take
it.
Can I use the SetUp APIs like
SetUpDiGetClassDivs()(),SetupDiEnumDeviceInterfaces()..etc to get the
data from the port, or is there any better way to do it?
Please reply.
Thanks,
Sanjay
--
sunwins
------------------------------------------------------------------------
sunwins's Profile:http://forums.techarena.in/members/96929.htm
http://forums.techarena.in/windows-device-drivers/1173403.htm
http://forums.techarena.in
thanks doron. Thanks for your help.
sanju
2009-05-25 05:10:23 UTC
Permalink
I found few device class specific functions that are used in some
applications,
For ex, for the HID devices, the Hidd_GetHidGuid, Hidd_GetAttributes,
HidD_GetPreParsedData are used along with the standard USB setup API
functions.
Does all the device classes have such device class specific functions
that have to be made use while developing the application?
Doron Holan [MSFT]
2009-05-26 23:15:48 UTC
Permalink
some classes like HID have APIs that you can call, others have
CreateFile/DeviceIoControl. Some have COM wrappers. there is no standard,
each class has its own APIs and API style

d
--
This posting is provided "AS IS" with no warranties, and confers no rights.
Post by sanju
I found few device class specific functions that are used in some
applications,
For ex, for the HID devices, the Hidd_GetHidGuid, Hidd_GetAttributes,
HidD_GetPreParsedData are used along with the standard USB setup API
functions.
Does all the device classes have such device class specific functions
that have to be made use while developing the application?
sanju
2009-05-27 10:24:08 UTC
Permalink
okay thanks doron.

Loading...