Pages: 1 [2]   Go Down
Author Topic: Looking for USB Host overview  (Read 1006 times)
0 Members and 1 Guest are viewing this topic.
SG
Offline Offline
Sr. Member
****
Karma: 7
Posts: 419
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Read this, the Arduino USB Host shields was design as the hardware interface, but the supported device was up to the user who use it to write the interface software to talk to a USB device.

USB in a NutShell
Quote
Making sense of the USB standard
Starting out new with USB can be quite daunting. With the USB 2.0 specification at 650 pages one could easily be put off just by the sheer size of the standard. This is only the beginning of a long list of associated standards for USB. There are USB Class Standards such as the HID Class Specification which details the common operation of devices (keyboards, mice etc) falling under the HID (Human Interface Devices) Class - only another 97 pages. If you are designing a USB Host, then you have three Host Controller Interface Standards to choose from. None of these are detailed in the USB 2.0 Spec.

USB defines class code information that is used to identify a device’s functionality and to nominally load a device driver based on that functionality.

Some of the USB device like the cheap wi-fi dongle, have only RF transceiver in the hardware, the wifi protocol and IP stack was all in the device driver, hence you are unlikely to get it work with Arduino, perhaps too large to fit in the AVR micro's flash.

For example I was tempted to recommend an Arduino to control model trains using a Sprog dcc controller (which connects to a PC by USB) but I realized I had no way of knowing whether it would work with an Arduino, or even what to look for in the product specifications that would help me to know.

To know the protocol for Sprog dcc controller, You will have to get a USB sniffer to be able to sniff the protocol.
Logged

UK
Offline Offline
Faraday Member
**
Karma: 47
Posts: 3538
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Thanks Bill,

You have provided a lot of helpful information.

If one has to resort to a sniffer I won't bother wasting time on it. I could spend 100 hours at that and still be no wiser.

I had hoped (and assumed) that there is a document somewhere which says the Arduino usb host shield together with the relevant library can do X, Y and Z.

...R
Logged

Global Moderator
Offline Offline
Brattain Member
*****
Karma: 452
Posts: 18694
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Bump Bump Bump ...

Your idea of specific, and mine, must differ.

How to use this forum

You haven't said which Arduino, nor given a link to any proposed host shield. Your project is very vague indeed except that it is something to do with model trains.

Quote
I assume somebody knows what it can and can't do.

You may as well ask "Looking for an overview of what humans can do". It's too broad, no wonder no-one replies.

Your project (and we can only guess what it is) might be solvable with wireless, Bluetooth, RS485, IR transmitters/receivers, lasers, who knows?

If you want to control something from a PC, wouldn't a USB client (rather than host) be adequate?

Quote
I was tempted to recommend an Arduino to control model trains using a Sprog dcc controller

Link to this controller? Datasheet? Specs?

What do you mean by "control"? The engines? Signalling? Boom gates?
Logged

Offline Offline
Sr. Member
****
Karma: 5
Posts: 422
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Google Search leads to this.

And this
http://www.oscale.net/en/simpledcc
No USB required?
Logged

UK
Offline Offline
Faraday Member
**
Karma: 47
Posts: 3538
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Sorry @NickGammon and @Lakes but we are on different wavelengths altogether.  @BillHo has recognized what I'm after.

If I went to a car (automobile smiley) dealer there would be no problem getting an overview of what all the models could do - seating, load carrying, speed, handling, fuel consumption, colour range etc. etc.

All I want is the equivalent information about Arduino USB hosts.

@Nick has said "which Arduino" and "proposed USB shield". Right now I haven't even found anywhere or anyone to tell me that these are relevant questions. Do different Arduino's have different USB host capabilities? Is there a list of what each one can do? Are there different USB host shields with different capabilities? Is there is a list of the different devices and what each can do? Maybe some devices need particular types of Arduino?

[Rant] I am a regular user of Open Source software and it generally suffers very badly in the area of documentation compared with commercial software. If the Arduino and its shields was a Microsoft or Oracle product all of this would be fully documented. I can empathize deeply with people who prefer writing code to writing documentation (so do I) but there must be an enormous hidden cost worldwide as everyone using Open Source stuff spends unproductive hours trying to figure it out [/Rant].
Logged

Global Moderator
Offline Offline
Brattain Member
*****
Karma: 452
Posts: 18694
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Personally I believe in documenting things, because an undocumented feature may as well not exist.

Here is some Arduino stuff I documented:

http://www.gammon.com.au/forum/?bbtopic_id=123

Quote
Do different Arduino's have different USB host capabilities? I

Yes, they do have different USB capabilities. The ones which have the "U" version of the chips are more capable in that respect, for example the Leonardo with the ATmega32u4 chip. This can certainly be (easily) used as a USB slave, in fact I have one here mimicking a keyboard, but you can also mimic a mouse, joystick etc.

The ones which do not have the USB capability can to an extent do the same thing, albeit fairly slowly and with fairly critical timing loops.

A search for "leonardo arduino usb host" revealed this thread: http://arduino.cc/forum/index.php?topic=108994.0

The suggestion there is that the ATmega32u4 chip can be a slave and not a host.

You may find the Products page (http://arduino.cc/en/Main/Products) helpful (to an extent) although I'm not sure how much detail they give about each board.

Quote
If the Arduino and its shields was a Microsoft or Oracle product all of this would be fully documented

Yes, well perhaps. But you pay for that documentation, and in the case of the companies mentioned, I would suggest quite a lot.

The thing is, most (almost all) shields are independently produced, so there is no one organization you can line up and criticize for not documenting things.

Quote
If I went to a car (automobile) dealer there would be no problem getting an overview of what all the models could do ...

Perhaps, again. But if I went to a car dealer I would expect to have to answer questions. Eg. Do you want to carry a lot of luggage? Travel quickly? Carry heavy loads? Have long range? Be cheap? Be safe? Carry 8 passengers?

The answers then guide the information which is given to you.

Just curious, why this fascination with USB host shields? There is another thread where someone regularly asks for multi-threading without ever explaining why he needs it or what his project is. It is like he has heard multi-threading is a great idea and is trying to find a use for it.

I got 80,000 hits on a Google search for "arduino usb host shield". Since I don't personally have a use for one right now, you may as well read those and see what you find, rather than one of us doing it and repeating whatever-it-is that those pages say.
Logged

UK
Offline Offline
Faraday Member
**
Karma: 47
Posts: 3538
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Thanks Nick,

This has probably gone as far as it can. I will watch it for a few more days in case there are more contributions.

I had no interest in this until it occurred to me that it might be possible to control a Sprog DCC controller with an Arduino, and then I realized I had no means of knowing whether it is possible. I don't want to do it myself as I have moved beyond DCC to radio control smiley

I must look at life in a somewhat different way from you - I do see things and then wonder if I might find a use for them. (That's how supermarkets work smiley)

And I would expect to get information from the car dealer even if I refused to answer his questions. Indeed I might deliberately refuse to answer so that he had no chance to bias the information he gives me.

I don''t understand what you say about the Arduino's with the U having better USB capabilities - you seem (to me) to be mixing their roles as slave and host. I thought they would all behave as a slave either through their own USB connector or an FTDI USB to serial thingummy. And I thought all the host technology was contained in the shield.

Thanks again,

...R
« Last Edit: May 06, 2013, 12:50:32 pm by Robin2 » Logged

SG
Offline Offline
Sr. Member
****
Karma: 7
Posts: 419
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I had found from the manual that Sprog DCC controller using as USB to serial converters, therefore USB host shields should be able to support.
Logged

Global Moderator
Offline Offline
Brattain Member
*****
Karma: 452
Posts: 18694
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I must look at life in a somewhat different way from you - I do see things and then wonder if I might find a use for them.

I look at a device and wonder how it works. In the case of a forum post I wonder what device the poster has, what shield they have and what Arduino they have. None of which you have said, so we immediately move into the realm of guesswork.

However I found a PDF manual for the Sprog. Inside (my emphasis):

Quote
SPROG is a DCC decoder programmer for connection to a USB or serial port of a personal computer or similar device.

...

SPROG takes input form a standard USB or RS232 serial connection (from the 'host')
 

It would seem logical to me, since the Arduino easily supports serial comms, to get a Sprog with a serial interface. You haven't said if you already have one (in which case it would be courteous to provide its model number, and specs), and if you don't why not save all this hassle and get one with a serial interface?

Quote
I thought they would all behave as a slave either through their own USB connector or an FTDI USB to serial thingummy.

The recent models certainly can act as a serial-port USB slave, since that is what the FTDI-USB chip does. However the "U" models can also act as mice, keyboards, USB MIDI ports, joysticks etc.
Logged

UK
Offline Offline
Faraday Member
**
Karma: 47
Posts: 3538
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Thanks all.

Perhaps you will understand now why I was reluctant to mention a specific device. As I said earlier I have no personal interest in using a Sprog and I'm sorry that people have been put to the trouble of making enquiries about it.

As I also said before, I had just been interested by the possibility of recommending an Arduino to someone else. However if it takes this much discussion and research it is beyond the scope of interest of many potential users. I had the impression that Arduino was actually trying to reach out to those people. Hence my view that it would be very useful if there was a document that explains the opportunities and limitations for people who would be able to use a USB device with an Arduino host shield but who don't know much about USB. After all you don't even need to know as much as I know about USB smiley to connect a device to a PC.

...R
Logged

Pages: 1 [2]   Go Up
Jump to: