kernelnewbies.kernelnewbies.org archive mirror
 help / color / mirror / Atom feed
From: greg@kroah.com (Greg KH)
To: kernelnewbies@lists.kernelnewbies.org
Subject: need help with my first device driver
Date: Tue, 3 May 2011 10:22:40 -0700	[thread overview]
Message-ID: <20110503172240.GA9560@kroah.com> (raw)
In-Reply-To: <BANLkTim4v6C0RRo6r8XpkPx9B6LhcMQjOw@mail.gmail.com>

On Tue, May 03, 2011 at 10:35:02PM +0530, Prashant Shah wrote:
> On Fri, Apr 29, 2011 at 8:51 PM, Greg KH <greg@kroah.com> wrote:
> > On Fri, Apr 29, 2011 at 03:10:53PM +0530, Prashant Shah wrote:
> >> Hi,
> >>
> >> I am trying to write a comedi (drivers/staging/comedi) based driver
> >> for the National Instruments USB 6008 USB based data acquisition card.
> >>
> 
> I want to ask a quick question on USB.
> 
> When I do a lsusb on the device it shows it has 4 end points (two bulk
> in and two bulk out). How do I send commands to the device since there
> are no control endpoints ?

It all depends on your device, what is the protocol for talking to your
device?  Some accept commands on bulk endpoints, others on the control
one.

And there is always endpoint 0, the default control endpoint, should you
use that?

> What I am doing currently is creating a
> bulk receive pipe and trying to read data in the completion handler
> but I dont get any data.

Are you sure data is being sent?  Did you ask the device to send it to
you with the correct command?  Your data sheet on the device should give
you the correct information on how to get data from your device, right?

hope this helps,

greg k-h

      reply	other threads:[~2011-05-03 17:22 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-04-29  9:40 need help with my first device driver Prashant Shah
2011-04-29 15:21 ` Greg KH
2011-05-03 17:05   ` Prashant Shah
2011-05-03 17:22     ` Greg KH [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20110503172240.GA9560@kroah.com \
    --to=greg@kroah.com \
    --cc=kernelnewbies@lists.kernelnewbies.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).