Fantastic Experience

Joel Newkirk freerunner at newkirk.us
Sat Sep 13 01:29:42 CEST 2008


On Fri, 12 Sep 2008 14:20:13 +0200, Matthias Apitz <guru at unixarea.de>
wrote:

> one question to the community: normally you can't switch easy between
> normal USB mode, i.e. a host is talking to a USB device, and
> host-to-host mode where two computers are talking to each other; the USB
> FAQ even warns not to connecting two computers without any kind of USB
> bridge, because this could damage the computers; see here:
> http://www.usb.org/about/faq/ans5/
> 
> how is this electrically organised in the GTA02 that I could just use a
> gender
> changer to switch between host-to-host mode or host-to-device mode?
> 
> thx
> 
> 	matthias

You cannot "just" use a gender changer.  As you already perceive, that's
just the physical connection being adapted.

Take a few minutes and read through http://wiki.openmoko.org/wiki/USB_host
and http://wiki.openmoko.org/wiki/Specialized_USB_cables - the gist of it
is that you use a coupler or non-standard cable for the physical
connection, and settings in the kernel (configurable on-the-fly, of course)
tell the Freerunner whether it is USB Device or USB Host, and whether to
expect 5V over the USB to charge & power itself, or to provide 5V over USB
to power devices.  

There are also some clever things that can be done on this front that
aren't exploited yet, like sensing a resistor's presence or absence and
automatically switching things around.  I wrote a shell script to let me
choose (manually) among the various configurations more easily - when asked
to go to 'power-providing' host mode, it checks for 5V presence on the USB
port and refuses to send out 5V while it is so.  I expect similar
functionality will appear soon in the form of an applet.  (context menu
from the USB tray icon, perhaps?)

As an aside:  It'd be helpful if we could use a short standard term to
differentiate: Host mode providing power vs Host mode permitting charging. 
Given the non-standard nature of Host mode communication on top of
device-mode power, I figure there's no existing standard.  "powered host
mode" is descriptive but potentially confusing - what is 'powered': the
Freerunner or the devices...  Any suggestions, anyone, or someone know of a
(short) existing term in use?

j






More information about the community mailing list