[GTALUG] USB "gadget" on Raspberry Pi 4; Tiny Pilot KVM

D. Hugh Redelmeier hugh at mimosa.com
Mon May 10 15:29:11 EDT 2021


It's hard to find general-purpose computers that can be USB clients, 
rather that hosts.  This mode is called "gadget".

You can do this with a Raspberry Pi Zero.

You can also do it with a Pi 4!

It turns out that the Pi 4's power connector is also a USB 2.0 port.
To conveniently access it, you can use one of these:

<https://www.buyapi.ca/product/usb-c-pwr-splitter/>
(There's a different splitter that might be aimed at the Pi Zero)

Why you cannot do this with other models of Pi:  The Broadcom chip has one 
USB port.  It is fed to a USB hub, and that's exposed on the connectors.  
A USB hub cannot provide Gadget ports.

On the Pi 4, the Broadcom's USB port is connected to the power input, with 
no hub in the way.

| From: Stewart C. Russell via talk <talk at gtalug.org>

| Buyapi (in Nepean) and Canakit are Canadian official
| resellers, so are supposed to get priority on stock. Practically,
| they'll run out like everyone else from time to time.

If I were making a buyapi order, I'd certainly throw in a splitter.  Just 
on spec.


What prompted me to look at this is the description of the "TinyPilot" KVM 
project.

<https://tinypilotkvm.com/>
<https://www.servethehome.com/tinypilot-voyager-kvm-raspberry-pi-remote/>

This is a Raspberry Pi 4 + extras that acts as another computer's 
Keyboard, Video, an Mouse.  It can be accessed via ethernet.  Not cheap 
enough for me.

Their magic sauce is software (there is an open source subset),
a splitter for the USB C power-in (like above, but US$35), and an HDMI 
capture circuit (AliExpress dongle for less that $20 should work).

According to STH, the obvious competitor is the Lantronix Spider.
The cheapest, used, on ebay is over $200 and may not have the features I'd 
like.

I actually use 4-port UltraHD KVMs that I got for about $100 (in other 
words, $25/computer).  They fulfill my needs at a lower cost.  Maybe a Pi 
Zero solution could cost about that.

The HDMI capture dongles are diverse and mysterious to me.  AliExpress's 
descriptions are unreliable.  For example, the first item in their list 
was emblazoned with "4K" but the specs said 1080p was the max resolution.  
Any recommendations?

- I think FullHD is fine.

- USB 3.0 might be an advantage: higher bandwidth possible

- "driverless" would be nice.  I think that that means it looks like a 
  USB video camera the software.

AliExpress is an adventure.  I would not bother if I actually had a 
serious or 
urgent need.


More information about the talk mailing list