kernelnewbies.kernelnewbies.org archive mirror
 help / color / mirror / Atom feed
From: pshah.mumbai@gmail.com (Prashant Shah)
To: kernelnewbies@lists.kernelnewbies.org
Subject: need help with my first device driver
Date: Tue, 3 May 2011 22:35:02 +0530	[thread overview]
Message-ID: <BANLkTim4v6C0RRo6r8XpkPx9B6LhcMQjOw@mail.gmail.com> (raw)
In-Reply-To: <20110429152105.GA12744@kroah.com>

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 ? 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.

Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               2.00
  bDeviceClass            0 (Defined at Interface level)
  bDeviceSubClass         0
  bDeviceProtocol         0
  bMaxPacketSize0        64
  idVendor           0x3923 National Instruments Corp.
  idProduct          0x717a
  bcdDevice            1.03
  iManufacturer           1 National Instruments
  iProduct                2 NI USB-6008
  bNumConfigurations      1
  Configuration Descriptor:
    bLength                 9
    bDescriptorType         2
    wTotalLength           46
    bNumInterfaces          1
    bConfigurationValue     1
    iConfiguration          0
    bmAttributes         0x80
      (Bus Powered)
    MaxPower              500mA


    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting       0
      bNumEndpoints           4
      bInterfaceClass         0 (Defined at Interface level)
      bInterfaceSubClass      0
      bInterfaceProtocol      0
      iInterface              0

      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x81  EP 1 IN
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0040  1x 64 bytes
        bInterval               5

      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x01  EP 1 OUT
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0040  1x 64 bytes
        bInterval               5

      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x82  EP 2 IN
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0040  1x 64 bytes
        bInterval               5

      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x02  EP 2 OUT
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0040  1x 64 bytes
        bInterval               5
Device Status:     0x0000
  (Bus Powered)

  reply	other threads:[~2011-05-03 17:05 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 [this message]
2011-05-03 17:22     ` Greg KH

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=BANLkTim4v6C0RRo6r8XpkPx9B6LhcMQjOw@mail.gmail.com \
    --to=pshah.mumbai@gmail.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).