EmbeddedRelated.com
Forums

Developing Application software for a USB host

Started by faiyaz June 28, 2008
Hello all again,
                   Let me tell you in brief about this.
We are developing a USB device(having AT91SAM7) which has a control and
two Isochronous endpoints(1 for IN & 1 for OUT) and a bulk endpoint.  The
device is a custom type device.  It sends and receives packets on
Isochronous endpoints once enumerated.  Now we are using ATM6124.sys
driver
provided by ATMEL for their Evaluation kit of AT91SAM7 and the Basic USB
6124 application exe provided by ATMEL again.  That uses createfile,
writefile & readfile for data transfer.  

First i dont know whether we can use that ATM6124 driver for our custom
application or not? Do we need to develop our own device driver?

Secondly i dont know how to access isochronous endpoint and how to do
data
transfer with those?  & in which format & protocol data should be sent &
received?  

Anybody having experience pls help.


Thanks
Faiyaz
Op Sat, 28 Jun 2008 10:33:59 +0200 schreef faiyaz <faiyaz.pw@gmail.com>:
> Hello all again, > Let me tell you in brief about this. > We are developing a USB device(having AT91SAM7) which has a control and > two Isochronous endpoints(1 for IN & 1 for OUT) and a bulk endpoint. The > device is a custom type device. It sends and receives packets on > Isochronous endpoints once enumerated. Now we are using ATM6124.sys > driver > provided by ATMEL for their Evaluation kit of AT91SAM7 and the Basic USB > 6124 application exe provided by ATMEL again. That uses createfile, > writefile & readfile for data transfer. > > First i dont know whether we can use that ATM6124 driver for our custom > application or not?
Have you tried?
> Do we need to develop our own device driver?
Is there a requirement to offer a device driver? Usually there is an API to talk directly from the host OS to the device.
> Secondly i dont know how to access isochronous endpoint and how to do > data transfer with those?
Look in your OS's developer's documentation.
> & in which format & protocol data should be sent & > received?
The API should take care of that.
> Anybody having experience pls help.
-- Gemaakt met Opera's revolutionaire e-mailprogramma: http://www.opera.com/mail/
On Jun 28, 4:33 am, "faiyaz" <faiyaz...@gmail.com> wrote:

> First i dont know whether we can use that ATM6124 driver for our custom > application or not? Do we need to develop our own device driver?
That's really two questions: 1) Can the provided driver technically do the job? 2) Will Atmel allow you to use it? Will you need to change the name to relfect your product? Will Atmel allow this? Will you need to get a VID & PID for your product and adapt the driver to that? Will Atmel allow this?
> Secondly i dont know how to access isochronous endpoint and how to do > data > transfer with those? & in which format & protocol data should be sent & > received?
You might see if libusb supports isochronous, it is a library designed to make USB access easier, and allow you to do it in the same way across a variety of operating systems.
On Jun 30, 4:16 am, "Boudewijn Dijkstra" <boudew...@indes.com> wrote:

> Is there a requirement to offer a device driver? Usually there is an API > to talk directly from the host OS to the device.
This is _NOT_ generally true of USB devices, especially on windows. With the exception of some very standardized things like keyboards and mice, the hardware vendor, and not the operating system vendor, is expected to provide the device driver. Things are a little different in the case of linux where manufacturer support has been lacking and drivers are getting packaged with the operating system.
Op Mon, 30 Jun 2008 17:56:32 +0200 schreef <cs_posting@hotmail.com>:
> On Jun 30, 4:16 am, "Boudewijn Dijkstra" <boudew...@indes.com> wrote: > >> Is there a requirement to offer a device driver? Usually there is an >> API to talk directly from the host OS to the device. > > This is _NOT_ generally true of USB devices, especially on windows.
It is, even on Windows. Ever heard of libusb(-win32)?
> With the exception of some very standardized things like keyboards and > mice, the hardware vendor, and not the operating system vendor, is > expected to provide the device driver.
I wasn't talking about a device driver. The 'A' in API stands for 'application'.
> Things are a little different in the case of linux where manufacturer > support has been lacking and drivers are getting packaged with the > operating system.
And Windows doesn't package drivers? -- Gemaakt met Opera's revolutionaire e-mailprogramma: http://www.opera.com/mail/
What I have seen in the documentation of the ATM6124 is it uses Bulk
endpoints for transfer usually on the other hand our device uses
isochronous usually.


Yes I have tried the ATM6124 device driver for our device, I think It does
enumeration, but when i run the application exe from Atmel i dont get any
relevant data from USB device.  This exe uses readfile and writefile
functions to send and receive data.  

i am using windows 2k.  Which API it  has to talk directly to the USb
device?

Do i need to refer MSDN website to know how to access isochronous endpoint
and how to do data transfer with those?

I dont know whether Atmel allow us to use the device driver they have
developed for their test board.

I have seen the documentation of the libusb ..It does not support
isochronous.

Thanks for your valuable comments
Faiyaz




Op Tue, 01 Jul 2008 13:09:19 +0200 schreef faiyaz <faiyaz.pw@gmail.com>:
> I have seen the documentation of the libusb ..It does not support > isochronous.
Where does it say that? The libusb-1.0 API Reference says it supports all transfer types. http://libusb.sourceforge.net/api-1.0/ -- Gemaakt met Opera's revolutionaire e-mailprogramma: http://www.opera.com/mail/
On Jul 1, 4:16 am, "Boudewijn Dijkstra" <boudew...@indes.com> wrote:

> >> Is there a requirement to offer a device driver? Usually there is an > >> API to talk directly from the host OS to the device. > > > This is _NOT_ generally true of USB devices, especially on windows. > > It is, even on Windows. Ever heard of libusb(-win32)?
Not only heard of it, already recommended it. However, libusb is, as far as windows is concerned, a 3rd party device driver. Now actually it is only a sort of proxy driver that provides an API you can use to write your own device driver in user space, using ordinary development tools rather than the driver development kit. Perhaps you think of this user space device driver as just part of your application program. That's fine, but it still functions as a device driver.
> And Windows doesn't package drivers?
Not for most USB devices, no. The exceptions are very standardized things like keyboards, mice, disk drives where they all work the same way regardless of manufacturer. Most other devices (for example, USB- serial converter) will require a driver from the device manufacturer.
>Op Tue, 01 Jul 2008 13:09:19 +0200 schreef faiyaz <faiyaz.pw@gmail.com>: >> I have seen the documentation of the libusb ..It does not support >> isochronous. > >Where does it say that? The libusb-1.0 API Reference says it supports
all
>transfer types. >http://libusb.sourceforge.net/api-1.0/ > > > >-- >Gemaakt met Opera's revolutionaire e-mailprogramma: >http://www.opera.com/mail/ >
Please see this page... http://libusb-win32.sourceforge.net/ Please read the "About" portion.
Op Wed, 02 Jul 2008 06:48:39 +0200 schreef faiyaz <faiyaz.pw@gmail.com>:
>> Op Tue, 01 Jul 2008 13:09:19 +0200 schreef faiyaz <faiyaz.pw@gmail.com>: >>> I have seen the documentation of the libusb ..It does not support >>> isochronous. >> >> Where does it say that? The libusb-1.0 API Reference says it supports >> all transfer types. >> http://libusb.sourceforge.net/api-1.0/ > > Please see this page... http://libusb-win32.sourceforge.net/ > Please read the "About" portion.
It doesn't say that isochronous isn't supported. It does say that it's "100% API and functional compatible with the main libusb project." See this as well: http://www.nabble.com/An-urgent-query-regarding-LIBUSB-td17080907.html -- Gemaakt met Opera's revolutionaire e-mailprogramma: http://www.opera.com/mail/