<?xml version="1.0" encoding="UTF-8"?>
<!-- generator="bbPress/1.0.2" -->
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title>LeafLabs Garden &#187; Topic: Faking a USB hub?</title>
		<link>http://forums.leaflabs.com/topic.php?id=565</link>
		<description>A place to share, learn, and grow...</description>
		<language>en-US</language>
		<pubDate>Fri, 22 Jan 2016 00:09:32 +0000</pubDate>
		<generator>http://bbpress.org/?v=1.0.2</generator>
		<textInput>
			<title><![CDATA[Search]]></title>
			<description><![CDATA[Search all topics from these forums.]]></description>
			<name>q</name>
			<link>http://forums.leaflabs.com/search.php</link>
		</textInput>
		<atom:link href="http://forums.leaflabs.com/rss.php?topic=565" rel="self" type="application/rss+xml" />

		<item>
			<title>x893 on "Faking a USB hub?"</title>
			<link>http://forums.leaflabs.com/topic.php?id=565#post-3081</link>
			<pubDate>Sat, 11 Dec 2010 15:26:41 +0000</pubDate>
			<dc:creator>x893</dc:creator>
			<guid isPermaLink="false">3081@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;It's possible but only one problem - number of endpoints in STM32 chip. You can adopt Versaloon project for Maple support if you need more than one USB device on Maple.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>gbulmer on "Faking a USB hub?"</title>
			<link>http://forums.leaflabs.com/topic.php?id=565#post-3079</link>
			<pubDate>Sat, 11 Dec 2010 11:41:05 +0000</pubDate>
			<dc:creator>gbulmer</dc:creator>
			<guid isPermaLink="false">3079@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;soundcyst - great question. I'd love to know the answer to that too. &#60;/p&#62;
&#60;p&#62;When I read the USB specs, e.g.&#60;br /&#62;
&#60;a href=&#34;http://www.usb.org/developers/docs/&#34; rel=&#34;nofollow&#34;&#62;http://www.usb.org/developers/docs/&#60;/a&#62;&#60;br /&#62;
I don't see what would prevent it. Though it does seem to add complexity.&#60;/p&#62;
&#60;p&#62;A Hub has to present itself to the USB host 'properly', including having its own USB Device class and control endpoint. So, I assume being a hub would 'consume' the STM32F's control end point, but I don't see why that might be a problem.&#60;/p&#62;
&#60;p&#62;The USB spec. (usb_20.pdf) includes chapters on a Hub, which is more than 1/4th the main document (123 of 420 pages). So there is some complexity in there. &#60;/p&#62;
&#60;p&#62;There is a chunk of that USB hub documentation around *not* doing certain USB transactions during periods when a real USB device is doing a transaction, but that shouldn't happen when the device is just faking being a hub.&#60;/p&#62;
&#60;p&#62;I have assumed their is more to it, but mainly because of the amount of documentation in the USB spec.&#60;/p&#62;
&#60;p&#62;According to the USB spec:&#60;br /&#62;
&#34;4.8.2.2 Functions&#60;br /&#62;
A function is a USB device that is able to transmit or receive data or control information over the bus.  A function is typically implemented as a separate peripheral device with a cable that plugs into a port on a hub.  &#60;strong&#62;However, a physical package may implement multiple functions and an embedded hub with a single USB cable.  This is known as a compound device.  A compound device appears to the host as a hub with one or more non-removable USB devices. &#60;/strong&#62;&#34; (My emphasis)&#60;/p&#62;
&#60;p&#62;I assume the 'non-removable USB devices' is the unique part of 'compound device', but I haven't been able to pin that down. &#60;/p&#62;
&#60;p&#62;I would have imagined that 'compound device' could become 'invisible' to the host if it were a hub + several USB devices, and the software enumerated them as if they were being plugged in. &#60;/p&#62;
&#60;p&#62;I assume condensing the devices into a hub+spoofed devices would require each device to be enumerated, and get polled. Enumeration would take longer at bootup, and polling would take longer. If it were only a few USB devices, I wouldn't have thought this would be a big performance impact.&#60;/p&#62;
&#60;p&#62;It is extra software complexity though. For it to have some benefit, it'd need to implement a USB Hub and at least two USB Devices.&#60;/p&#62;
&#60;p&#62;From the perspective of a minimal bootloader and debug infrastructure, being a single USB device would be simpler. Candidate devices which are widely supported, and relatively understandable include CDC virtual serial. There are others, including HID, but I don't know how I would 'open' a HID device from the host PC, and make any use of the device. Using a USB CDC virtual serial is pretty well understood.&#60;/p&#62;
&#60;p&#62;But having a framework which would support 'plugging in' combination's of USB Devices looks like a good idea for general development.&#60;/p&#62;
&#60;p&#62;{whine: I would *much* prefer this sort of functionality in preference to LeafLabs creating and supporting Yet Another IDE}
&#60;/p&#62;</description>
		</item>
		<item>
			<title>soundcyst on "Faking a USB hub?"</title>
			<link>http://forums.leaflabs.com/topic.php?id=565#post-3075</link>
			<pubDate>Fri, 10 Dec 2010 21:26:18 +0000</pubDate>
			<dc:creator>soundcyst</dc:creator>
			<guid isPermaLink="false">3075@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;With the bootloader, DFU, and CDC issues that have arisen, and the discussion of adding another chip a la Arduino, I thought I'd pose a question:  would it be a good idea (see: easy, effective, not processor hungry) to have the STM32's USB functionality pretend to be a hub to the host?  In this way, the chip could have a DFU device and a CDC device, or also an HI device, or Audio device, etc. &#34;attached to the hub&#34; without running into the Windoze and Mac issues of driver attachment and IADs.  Or could it?  I'm not well-enough versed in USB to know if this sort of spoof would be effective to the host, and cheap enough to be worthwhile on the device, but I thought I'd ask.&#60;/p&#62;
&#60;p&#62;Or if the STM32 doesn't support it, perhaps the helper chip could be a hub controller that would support splitting the devices?  (This option seems trickier than the former)&#60;/p&#62;
&#60;p&#62;Thoughts?
&#60;/p&#62;</description>
		</item>

	</channel>
</rss>
