KMDF 1.1 Isochronous Transfer

Also don’t use HTML with links back out to the internet. This signatures are not appreciated.
“braj” wrote in message news:xxxxx@ntdev…
Hi,

Wondering if any one has worked on isochronous transfer using kmdf 1.1.

and would be interested to let me ask some doubt on write/read from usb device.

Thanks

On Mon, 17 Jul 2006 Lyris ListManager wrote :
>
>Welcome to the NTDEV Discussion List!
>
>Please read this message completely. It includes info on how to
>access the list as well as a list of appropriate behaviors.
>
>This is the Windows System Software Development discussion list, with a
>world-wide membership. To send messages to the mailing list use the
>address:
>
> xxxxx@lists.osr.com
>
>Your message will automatically be distributed to all members of
>the list. Only list members can post to the list. The means that
>the address from which you post must be the address you subscribe
>to the list with.
>
>PURPOSE
>This list is maintained by OSR Open Systems Resources, Inc. for the
>overall benefit of the Windows system software development community.
>The purpose of this list is to facilitate discussion of technical
>topics relating to Windows system software development.
>
>Most questions about using/accessing the list are answered by the
>List FAQ. You can find this at:
>
>http://www.osronline.com/page.cfm?name=ListServerFAQ
>
>We suggest that you go read it now.
>
>BEHAVIOR
>The following are specifically inappropriate regarding this list:
>
>1) Commercial postings - This is a technical list, and the only
>posts that are allowed are technical in nature. Please don’t post
>advertisements or announcements for your products, services, or
>activities to the list. Your posting will NOT be considered
>technical(and thus legitimate), just because it starts with “I just
>wanted all you to know that we’ve released a new version of” some
>software. On the other hand, if somebody posts question saying
>“Can anybody recommend a good XYZ?”, it’s perfectly fine to answer
>“Yeah, we make XYZ’s and we think they’re pretty cool. Please
>contact me off-list for more info.”
>
>2) Job solicitations - Not from commercial concerns looking for
>developers, not from head hunters, not from small companies, not
> from people looking for work, not from consultants looking for
>clients. There is a Windows drivers job posting bulletin board
>for both people seeking jobs and people who are looking for
>developers at http://www.osronline.com. Use it, not this list.
>
>3) Salary, consulting rate or price discussions - Something about
>the laws here in the States about price fixing comes into play here.
>Please just don’t do it.
>
>4) Use of the email addresses of list members for “direct mail
>advertising” of any type.
>
>5) Anything that, in the judgment of the list managers, is not in
>keeping with the overall purpose of the list or is not in the best
>interest of the Windows system software development community.
>
>Multiple incidents of inappropriate conduct on the list will result
>in that member, and perhaps all members from the offender’s company,
>being banned from the list.
>
>There are a number of other items that are seriously discouraged,
>and tend to annoy the List Slaves (those who administer the lists).
>For example, PLEASE DO NOT POST THE SAME QUESTION TO BOTH NTDEV and
>NTFSD. Also, please do the list members the courtesy of searching
>the archives before you post a question.
>
>READING, POSTING, SEARCHING
>You may read messages from, and post messages to, this list in either of
>three ways:
>
>1) Via email (discussion, digest, or index). Select the type via
>the web interface (see “Managing Your List Membership” below).
>
>2) Via a news reader (such as outlook express). Point your
>newsreader to lists.osr.com, use your email address as your
>username and supply the password that you used when you signed up.
>
>A complete description of how to participate in the list, including
>a detailed description of how to set-up and use the Outlook Newsreader
>with NTDEV is available at http://www.osronline.com/page.cfm?name=ListServer
>
>The list archive is maintained on the web, in full text searchable
>form. The search facility is available from the homepage at
>http://www.osronline.com (select NTDEV from the drop-down menu in
>the SEARCH box on the left).
>
>Postings to this list should be in plain ASCII text (postings in
>HTML are presently allowed, but not greatly appreciated by the list
>members). Postings with attachments (or multiple body parts) will be
>rejected.
>
>MANAGING YOUR LIST MEMBERSHIP
>Almost everything that you might ever need to do regarding your list
>membership is most easily and effectively performed via Lyris’s Web
>interface at http://www.osronline.com/page.cfm?name=ListServer.
>Go check it out now…
>
>The web interface allows you to select which TYPE of membership
>(discussion, digest, index, no mail), allows you to manage your
>list password (which can be different from your OSR Online password),
>and allows you to re-set your account when it has been put on “hold”.
>
>Every message you receive has a footer that tells you how to get off
>this list. Please, we beg you, Do NOT send administrative requests
>to the posting address “xxxxx@lists.osr.com”.
>
>If you have ANY problems related to the ntdev Discussion List,
>please do not post them to the list. List managers (A.K.A. List
>Slaves) are at your disposal for this very purpose; please avail
>yourself of the resource:
>
> xxxxx@lists.osr.com
>
>The List Slaves do not monitor the list every day. Mostly, the list
>just runs itself. If you experience problems with the list, or you
>stop getting postings from the list for several days, please don’t
>hesitate to contact the List Slaves.
>
>Once again, welcome to the NTDEV Discussion List.
>
>The List Team
>OSR Open Systems Resources, Inc.

I sent this out yesterday, repeating the first part again…

KMDF does not support ISO transfers using it’s read/write pipe routines WdfUsbTargetPipeFormatRequestForWrite/ WdfUsbTargetPipeFormatRequestForRead nor with the continuous reader. KMDF does support the continuous reader on INT or BULK pipes.

You can get around this restriction of no IOSCH support by using WdfUsbTargetDeviceSendUrbSynchronously/WdfUsbTargetDeviceFormatRequestForUrb and formatting your own URB for the transfer. KMDF will create a WDFUSBPIPE for each isoch endpoint when the appropriate interface has been selected. Since the WDFUSBPIPE handle is basically a WDFIOTARGET handle with special formatting, rolling your own reader is rather trivial and the synchronization of starting/stopping it can be done with calls to WdfIoTargetStop/Start.

So in conclusion, you can use KMDF to read/write your ISO endpoints, it just takes a little bit more work to do so.

d

– I can spell, I just can’t type.
From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of braj
Sent: Monday, July 17, 2006 5:54 AM
To: Windows System Software Devs Interest List
Subject: [ntdev] KMDF 1.1 Isochronous Transfer

? Hi,

Wondering if any one has worked on isochronous transfer using kmdf 1.1.

and would be interested to let me ask some doubt on write/read from usb device.

Thanks

On Mon, 17 Jul 2006 Lyris ListManager wrote :

Welcome to the NTDEV Discussion List!

Please read this message completely.? It includes info on how to
access the list as well as a list of appropriate behaviors.

This is the Windows System Software Development discussion list, with a
world-wide membership.? To send messages to the mailing list use the
address:

? ? ? ? xxxxx@lists.osr.com

Your message will automatically be distributed to all members of
the list.? Only list members can post to the list. The means that
the address from which you post must be the address you subscribe
to the list with.

PURPOSE
This list is maintained by OSR Open Systems Resources, Inc. for the
overall benefit of the Windows system software development community.
The purpose of this list is to facilitate discussion of technical
topics relating to Windows system software development.

Most questions about using/accessing the list are answered by the
List FAQ.? You can find this at:

http://www.osronline.com/page.cfm?name=ListServerFAQ

We suggest that you go read it now.

BEHAVIOR
The following are specifically inappropriate regarding this list:

  1. Commercial postings - This is a technical list, and the only
    posts that are allowed are technical in nature.? Please don’t post
    advertisements or announcements for your products, services, or
    activities to the list.? Your posting will NOT be considered
    technical(and thus legitimate), just because it starts with “I just
    wanted all you to know that we’ve released a new version of” some
    software.? On the other hand, if somebody posts question saying
    “Can anybody recommend a good XYZ?”, it’s perfectly fine to answer
    “Yeah, we make XYZ’s and we think they’re pretty cool.? Please
    contact me off-list for more info.”

  2. Job solicitations - Not from commercial concerns looking for
    developers, not from head hunters, not from small companies, not
    from people looking for work, not from consultants looking for
    clients.? There is a Windows drivers job posting bulletin board
    for both people seeking jobs and people who are looking for
    developers at http://www.osronline.com.? Use it, not this list.

  3. Salary, consulting rate or price discussions - Something about
    the laws here in the States about price fixing comes into play here.
    Please just don’t do it.

  4. Use of the email addresses of list members for “direct mail
    advertising” of any type.

  5. Anything that, in the judgment of the list managers, is not in
    keeping with the overall purpose of the list or is not in the best
    interest of the Windows system software development community.

Multiple incidents of inappropriate conduct on the list will result
in that member, and perhaps all members from the offender’s company,
being banned from the list.

There are a number of other items that are seriously discouraged,
and tend to annoy the List Slaves (those who administer the lists).
For example, PLEASE DO NOT POST THE SAME QUESTION TO BOTH NTDEV and
NTFSD.? Also, please do the list members the courtesy of searching
the archives before you post a question.

READING, POSTING, SEARCHING
You may read messages from, and post messages to, this list in either of
three ways:

  1. Via email (discussion, digest, or index).? Select the type via
    the web interface (see “Managing Your List Membership” below).

  2. Via a news reader (such as outlook express).? Point your
    newsreader to lists.osr.com, use your email address as your
    username and supply the password that you used when you signed up.

A complete description of how to participate in the list, including
a detailed description of how to set-up and use the Outlook Newsreader
with NTDEV is available at http://www.osronline.com/page.cfm?name=ListServer

The list archive is maintained on the web, in full text searchable
form. The search facility is available from the homepage at
http://www.osronline.com (select NTDEV from the drop-down menu in
the SEARCH box on the left).

Postings to this list should be in plain ASCII text (postings in
HTML are presently allowed, but not greatly appreciated by the list
members). Postings with attachments (or multiple body parts) will be
rejected.

MANAGING YOUR LIST MEMBERSHIP
Almost everything that you might ever need to do regarding your list
membership is most easily and effectively performed via Lyris’s Web
interface at http://www.osronline.com/page.cfm?name=ListServer.
Go check it out now…

The web interface allows you to select which TYPE of membership
(discussion, digest, index, no mail), allows you to manage your
list password (which can be different from your OSR Online password),
and allows you to re-set your account when it has been put on “hold”.

Every message you receive has a footer that tells you how to get off
this list. Please, we beg you, Do *NOT* send administrative requests
to the posting address “xxxxx@lists.osr.com”.

If you have ANY problems related to the ntdev Discussion List,
*please* do not post them to the list. List managers (A.K.A. List
Slaves) are at your disposal for this very purpose; please avail
yourself of the resource:

? ? xxxxx@lists.osr.com

The List Slaves do not monitor the list every day. Mostly, the list
just runs itself.? If you experience problems with the list, or you
stop getting postings from the list for several days, please don’t
hesitate to contact the List Slaves.

Once again, welcome to the NTDEV Discussion List.

The List Team
OSR Open Systems Resources, Inc.

— Questions? First check the Kernel Driver FAQ at http://www.osronline.com/article.cfm?id=256 To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer

>> I sent this out yesterday, repeating the first part again…

Where did you post this? I searched the archives for KMDF and isochronous on NTDEV and did not find it. I am very interested in learning about how to do isochronous transfers (read and write) with KMDF, is there a code sample for doing isochronous USB transfers using KMDF? I also noticed you stated that isochronous transfers cannot use the continuous read function. That is not called out in the KDMF documentation.chm file, it says (at least the version I have) any endpoint can use that feature. Could one simulate the continuous read using a timer object?

Trying again for the *4th* time, pls accept my apologies if this ever
went through . . .

KMDF does not support ISO transfers using it’s read/write pipe routines
nor with the continuous reader. It does support the reader on INT or
BULK pipes. You can get around this restriction by using
WdfUsbTargetDeviceSendUrbSynchronously/WdfUsbTargetDeviceFormatRequestFo
rUrb and formatting your own URB for the transfer. KMDF will create a
WDFUSBPIPE for each isoch endpoint when the appropriate interface has
been selected. Since the WDFUSBPIPE handle is basically a WDFIOTARGET
handle with special formatting, rolling your own reader is rather
trivial and the synchronization of starting/stopping it can be done with
calls to WdfIoTargetStop/Start.

With that said, there is a bug in KMDF v1.1 if the interface has
settings with different number of endpoints. This has been fixed in
KMDF v1.5 (the version that ships in Vista and in the WDK). To work
around this issue, you can either

a) select the interface setting which has the active endpoints in your
select config call using
WDF_USB_DEVICE_SELECT_CONFIG_PARAMS_INIT_MULTIPLE_INTERFACES and passing
an array of one element, selecting Setting 1

or

b) if you can change the firmware, add the endpoints to setting 0
(whose max packet size is zero) so that both settings have the same
number of endpoints.

Queue setup has nothing to do with USB functionality. They are
completely independent of each other. While independent, you can choose
a design in which the queues and USB handles work together and reduce
the complexity in your driver.

To answer your question about implementing a continuous reader on your
own, no you don’t use a timer. Instead, from the completion routine of
the transfer, you format the request again for a new transfer and
resubmit the request from the completion routine.

d

Thanks for your quick response and reposting! Interesting about the 1.1 bug, that could explain my bugcheck because I have the exact condition you explained.

I justed signed up for the WDK beta program to get the 1.5 version (build 5456). But in the 5 hours it is going to take to download the iso, I will look into the two workarounds you presented.

Is there some sample code showing how to do isochronous transfers using KMDF using the above method? What is trivial to you in driver design, sure isn’t to me :wink:

mm