USB Hostshield Library

Hi

I was wondering if anybody knows a good tutorial for usage of the USB Hostshield Library (2.0)? I started experimenting recently but I find this library rather confusing. The examples provided along with this library do work but so far I was not able to use it for other USB devices , such as gamepads etc.

Thanks for your answers

Heiko

The examples provided along with this library do work

That's a good starting point, then, for you to develop the drivers necessary to interface with your specific USB slave.

but so far I was not able to use it for other USB devices , such as gamepads etc.

No one has ever said that writing USB drivers was going to be easy. You most certainly need to know quite a bit about the specific device you are trying to control.

There is no "etc." about it. You will develop different drivers for each device you want to control.

Hi, thanks for your answer.

I know that I have to write different drivers for different devices. The one in question is a gamepad from speedlink. I have all the data necessary for interfacing available, usbmon and wireshark do a great job.;) In fact I once wrote a simple USB driver under linux, so I'm not entirely new to this topic, although I know it is kind of hard. :) The problem was the API of the USB library itself, as I mentioned. But I think I'm getting the hang of it bit by bit (taking this literally g). It's just that I searched the web over and over but there seems to be no useful documentation on this library besides the included examples.

It's just that I searched the web over and over but there seems to be no useful documentation on this library besides the included examples.

On the other hand, you have absolutely the best documentation at your finder tips - the source code itself. It always matches the current code.

That's right. ^^ But crawling through tons of header and code files is very time expensive. If you're facing the library the first time, you'll need some time to understand what's going on. I don't want to appear lazy, but I think a little piece of documentation wouldn't hurt.;) Well I'll try to get this son of a calculator working and then maybe I'll write a little tutorial.

I don't want to appear lazy, but I think a little piece of documentation wouldn't hurt.

It probably wouldn't, and I don't think you are lazy. But documentation has a habit of getting out of date before the ink dries/toner cools. And it is not any fun to develop.

Well I'll try to get this son of a calculator working and then maybe I'll write a little tutorial.

I'm guessing you won't.

I'm willing to bet that you will get the son of a calculator working, but then there will be other challenges/opportunities, and the tutorial will get put on the back burner for a while.

At least, that's what would happen with me.

You could try asking at the author's site - http://www.circuitsathome.com/mcu/usb-host-shield-library-version-2-0-released. They should be able to offer assistance. He seems to reply to questions posted there.

I finally was able to produce a fully working device driver. I will do some finishing on the code an then post a downloadlink here, if someone would like to use it. :)

I will do some finishing on the code an then post a downloadlink here, if someone would like to use it

Please do.

And here we go :)

http://da.finchi.de/wp-content/download/StrikeFX_Arduino_Driver.zip

Included in this package is the Hostshield Library, the driver, a Manual.pdf and a demo sketch.