From: sinosoidal on
Hi,

I'm adapting hidusbfx2 sample to use isoc transfer. To do that i'm basing
myself on the usbsamp sample.

While in the first, a continuous reader is being used to get the data from
the device and we just need to configure the reader and start it, the second,
has a lot more configuration and it prepares a scenario for handling explict
IO control codes.

My questions resides if the isoc transfers are always happening but the data
is only transfered to the user mode on request or if, the user mode request
triggers the data request from the device at that point.

I wanted a similar schema in order to start the reading and have something
similar like a callback on data request completion.

Otherwise, the only thing that occurs to me at this point is that I'll need
some kind of timer to invoke the ReadIsocPipe function from time to time.

As I don't know very well the possibilities provided by the WDK I would love
to hear the opinion of more experienced users and developers.

With my best regards,

Nuno
From: Tim Roberts on
sinosoidal <sinosoidal(a)discussions.microsoft.com> wrote:
>
>I'm adapting hidusbfx2 sample to use isoc transfer. To do that i'm basing
>myself on the usbsamp sample.

HID devices cannot use isochronous pipes. They are required to use
interrupt. That's part of the HID class spec.

>My questions resides if the isoc transfers are always happening but the data
>is only transfered to the user mode on request or if, the user mode request
>triggers the data request from the device at that point.

It depends on what you need. Both schemes are done. Sometimes, the driver
creates its own set of URBs, copying into its own circular buffer, and
returns data to the user mode app when needed. Sometimes, the driver waits
for a request from above.

>I wanted a similar schema in order to start the reading and have something
>similar like a callback on data request completion.

Fine. That's commonly done.

>As I don't know very well the possibilities provided by the WDK I would love
>to hear the opinion of more experienced users and developers.

Opinion on what?
--
Tim Roberts, timr(a)probo.com
Providenza & Boekelheide, Inc.
From: sinosoidal on
Hi Tim,

Maybe you don't know hidusbfxz2 sample. What it does is to map a non hid
device, which in this case is a usb device based on bulk transfers to a hid
device, using a miniport driver. Of course I know that HID don't support iso
transfer! :)

As I have told you the other response you gave me is that I don't know how
to prepare the invocation of isoc transfers without being based on user
requests because the only reference code I have is the usbsamp for isoc
transfers.

If you could point me out an example in which this is done in other way or
something else that helps me to understand what has to be done in order to
accomplish that.

I have a very reduced knowledge about WDK and its foundations because i'm
only working with this for the last 2 months.

With my best regards,

Nuno

"Tim Roberts" wrote:

> sinosoidal <sinosoidal(a)discussions.microsoft.com> wrote:
> >
> >I'm adapting hidusbfx2 sample to use isoc transfer. To do that i'm basing
> >myself on the usbsamp sample.
>
> HID devices cannot use isochronous pipes. They are required to use
> interrupt. That's part of the HID class spec.
>
> >My questions resides if the isoc transfers are always happening but the data
> >is only transfered to the user mode on request or if, the user mode request
> >triggers the data request from the device at that point.
>
> It depends on what you need. Both schemes are done. Sometimes, the driver
> creates its own set of URBs, copying into its own circular buffer, and
> returns data to the user mode app when needed. Sometimes, the driver waits
> for a request from above.
>
> >I wanted a similar schema in order to start the reading and have something
> >similar like a callback on data request completion.
>
> Fine. That's commonly done.
>
> >As I don't know very well the possibilities provided by the WDK I would love
> >to hear the opinion of more experienced users and developers.
>
> Opinion on what?
> --
> Tim Roberts, timr(a)probo.com
> Providenza & Boekelheide, Inc.
>
From: Egidio [MSFT] on
Doesn't look like there are other samples on this (do a search for 'isoc' in
the sample directory).
Isoc input is not very common and how it is done depends a lot on the type
of technology that sits behind the USB bus: Bluetooth, audio/video,
proprietary device, other. I.e., each environment has it own standards and
constraints on how the isoc transfer needs to be accomplished.
Like Tim suggested, one possible solutions is:
(a) app sends down an irp to let the driver know when to start reading.
(b) driver reads input with a isoc continuous reader, puts data in its
internal buffer.
(c) app sends down other irps to read this data

Egi.


"sinosoidal" <sinosoidal(a)discussions.microsoft.com> wrote in message
news:920CB12C-8C9E-46D2-A632-FD5C39399771(a)microsoft.com...
> Hi Tim,
>
> Maybe you don't know hidusbfxz2 sample. What it does is to map a non hid
> device, which in this case is a usb device based on bulk transfers to a
> hid
> device, using a miniport driver. Of course I know that HID don't support
> iso
> transfer! :)
>
> As I have told you the other response you gave me is that I don't know how
> to prepare the invocation of isoc transfers without being based on user
> requests because the only reference code I have is the usbsamp for isoc
> transfers.
>
> If you could point me out an example in which this is done in other way or
> something else that helps me to understand what has to be done in order to
> accomplish that.
>
> I have a very reduced knowledge about WDK and its foundations because i'm
> only working with this for the last 2 months.
>
> With my best regards,
>
> Nuno
>
> "Tim Roberts" wrote:
>
>> sinosoidal <sinosoidal(a)discussions.microsoft.com> wrote:
>> >
>> >I'm adapting hidusbfx2 sample to use isoc transfer. To do that i'm
>> >basing
>> >myself on the usbsamp sample.
>>
>> HID devices cannot use isochronous pipes. They are required to use
>> interrupt. That's part of the HID class spec.
>>
>> >My questions resides if the isoc transfers are always happening but the
>> >data
>> >is only transfered to the user mode on request or if, the user mode
>> >request
>> >triggers the data request from the device at that point.
>>
>> It depends on what you need. Both schemes are done. Sometimes, the
>> driver
>> creates its own set of URBs, copying into its own circular buffer, and
>> returns data to the user mode app when needed. Sometimes, the driver
>> waits
>> for a request from above.
>>
>> >I wanted a similar schema in order to start the reading and have
>> >something
>> >similar like a callback on data request completion.
>>
>> Fine. That's commonly done.
>>
>> >As I don't know very well the possibilities provided by the WDK I would
>> >love
>> >to hear the opinion of more experienced users and developers.
>>
>> Opinion on what?
>> --
>> Tim Roberts, timr(a)probo.com
>> Providenza & Boekelheide, Inc.
>>
From: sinosoidal on
Hi Egidio,

I would for the b option, however, as I know there is no continuous reader
for isoc endpoints... right?

At least, I have tried already and they don't work... am I right?

That would be the most easy option.

Please tell me that i'm wrong! :P

Nuno

"Egidio [MSFT]" wrote:

> Doesn't look like there are other samples on this (do a search for 'isoc' in
> the sample directory).
> Isoc input is not very common and how it is done depends a lot on the type
> of technology that sits behind the USB bus: Bluetooth, audio/video,
> proprietary device, other. I.e., each environment has it own standards and
> constraints on how the isoc transfer needs to be accomplished.
> Like Tim suggested, one possible solutions is:
> (a) app sends down an irp to let the driver know when to start reading.
> (b) driver reads input with a isoc continuous reader, puts data in its
> internal buffer.
> (c) app sends down other irps to read this data
>
> Egi.
>
>
> "sinosoidal" <sinosoidal(a)discussions.microsoft.com> wrote in message
> news:920CB12C-8C9E-46D2-A632-FD5C39399771(a)microsoft.com...
> > Hi Tim,
> >
> > Maybe you don't know hidusbfxz2 sample. What it does is to map a non hid
> > device, which in this case is a usb device based on bulk transfers to a
> > hid
> > device, using a miniport driver. Of course I know that HID don't support
> > iso
> > transfer! :)
> >
> > As I have told you the other response you gave me is that I don't know how
> > to prepare the invocation of isoc transfers without being based on user
> > requests because the only reference code I have is the usbsamp for isoc
> > transfers.
> >
> > If you could point me out an example in which this is done in other way or
> > something else that helps me to understand what has to be done in order to
> > accomplish that.
> >
> > I have a very reduced knowledge about WDK and its foundations because i'm
> > only working with this for the last 2 months.
> >
> > With my best regards,
> >
> > Nuno
> >
> > "Tim Roberts" wrote:
> >
> >> sinosoidal <sinosoidal(a)discussions.microsoft.com> wrote:
> >> >
> >> >I'm adapting hidusbfx2 sample to use isoc transfer. To do that i'm
> >> >basing
> >> >myself on the usbsamp sample.
> >>
> >> HID devices cannot use isochronous pipes. They are required to use
> >> interrupt. That's part of the HID class spec.
> >>
> >> >My questions resides if the isoc transfers are always happening but the
> >> >data
> >> >is only transfered to the user mode on request or if, the user mode
> >> >request
> >> >triggers the data request from the device at that point.
> >>
> >> It depends on what you need. Both schemes are done. Sometimes, the
> >> driver
> >> creates its own set of URBs, copying into its own circular buffer, and
> >> returns data to the user mode app when needed. Sometimes, the driver
> >> waits
> >> for a request from above.
> >>
> >> >I wanted a similar schema in order to start the reading and have
> >> >something
> >> >similar like a callback on data request completion.
> >>
> >> Fine. That's commonly done.
> >>
> >> >As I don't know very well the possibilities provided by the WDK I would
> >> >love
> >> >to hear the opinion of more experienced users and developers.
> >>
> >> Opinion on what?
> >> --
> >> Tim Roberts, timr(a)probo.com
> >> Providenza & Boekelheide, Inc.
> >>
>