Developing Application software for a USB host

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.sy 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 d data transfer with those? & in which format & protocol data should be sent & received?

Anybody having experience pls help.

Thanks Faiyaz

Reply to
faiyaz
Loading thread data ...

Op Sat, 28 Jun 2008 10:33:59 +0200 schreef faiyaz :

Have you tried?

Is there a requirement to offer a device driver? Usually there is an API to talk directly from the host OS to the device.

Look in your OS's developer's documentation.

The API should take care of that.

--
Gemaakt met Opera's revolutionaire e-mailprogramma:  
http://www.opera.com/mail/
Reply to
Boudewijn Dijkstra

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?

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.

Reply to
cs_posting

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.

Reply to
cs_posting

It is, even on Windows. Ever heard of libusb(-win32)?

I wasn't talking about a device driver. The 'A' in API stands for 'application'.

And Windows doesn't package drivers?

--
Gemaakt met Opera's revolutionaire e-mailprogramma:  
http://www.opera.com/mail/
Reply to
Boudewijn Dijkstra

What I have seen in the documentation of the ATM6124 is it uses Bul endpoints for transfer usually on the other hand our device use isochronous usually.

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

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

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

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

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

Thanks for your valuable comments Faiyaz

Reply to
faiyaz

Op Tue, 01 Jul 2008 13:09:19 +0200 schreef faiyaz :

Where does it say that? The libusb-1.0 API Reference says it supports all transfer types.

formatting link

--
Gemaakt met Opera's revolutionaire e-mailprogramma:  
http://www.opera.com/mail/
Reply to
Boudewijn Dijkstra

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.

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.

Reply to
cs_posting

all

Please see this page...

formatting link
Please read the "About" portion.

Reply to
faiyaz

Op Wed, 02 Jul 2008 06:48:39 +0200 schreef faiyaz :

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:

formatting link

--
Gemaakt met Opera's revolutionaire e-mailprogramma:  
http://www.opera.com/mail/
Reply to
Boudewijn Dijkstra

I'd strongly recommend you read "USB Complete" by Jan Axelson. It's a good introduction to the workings of USB and interaction with drivers.

If you're targetting Windows, I'd also suggest you download and install the latest WDM Driver Kit and do some reading - especially if you haven't written a Windows Device Driver before. There's a lot to wade through to find information relevant to your device, but it's in there somewhere...

BTW I can sympathise with your dilemma - my first USB driver project was very difficult to get off the ground simply because I had no idea even what sort of (Windows) driver I should be writing for my device, let-alone how to do it! :O

Whether or not your device requires a device driver depends on the nature of the device and how you choose to present that device to Windows.

Some devices, such as "standard" mice and keyboards, conform to a standard known as HID. Windows provides a generic HID Class Driver that allows direct application access to USB HID devices without the need to write another driver. That's because HID devices are well-defined plug-and-play devices that fully enumerate their I/O capabilities.

Other devices, such as USB serial ports, may also make use of standard Windows drivers such as USBSER.SYS (warning: buggy as hell). These allow properly configured USB serial devices to appear in Windows without a vendor-supplied device driver.

There are also several generic device drivers and/or frameworks which allow user-mode access to custom USB devices, such as the Jungo or WinDriver tools. Similar is the BULKUSB.SYS example in the WinDDK which allows application access to a device's bulk endpoints. These of course simplify software design with the penalty of user-mode execution and limitations.

Not having used isochronous endpoints myself, I can't recall whether or not there's any "easy" solution to your problem. No doubt the Jungo tools will support them, but you'll be paying for it.

Not knowing anything about your device, I'm guessing that unless you go Jungo, you'll be learning how to write your own USB device driver... good luck!

Regards,

--
Mark McDougall, Engineer
Virtual Logic Pty Ltd, 
21-25 King St, Rockdale, 2216
Ph: +612-9599-3255 Fax: +612-9599-3266
Reply to
Mark McDougall

ok...I am trying to use libusb-win32 for my device. but as i had installe ATM6124.sys previously, windows now does not allow me to use a differen device driver. And i cannot also delete entries in the registry. I hav to rename the libusb0.sys to atm6124.sys to use it. And when i do that an run the sample application exe from ATMEL to test the device i am getting runtime error(unhandlled exception). Do you have any sample application code to test a device isochronou transfer?

Thanks in advance. Faiyaz

Reply to
faiyaz

Op Thu, 03 Jul 2008 07:44:26 +0200 schreef faiyaz :

Other than advising you to remove drivers via the devmgmt.msc applet, I cannot help you further with this.

--
Gemaakt met Opera's revolutionaire e-mailprogramma:  
http://www.opera.com/mail/
Reply to
Boudewijn Dijkstra

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.