<?xml version="1.0" encoding="utf-8"?>
<feed version="0.3" xmlns="http://purl.org/atom/ns#">
<link rel="alternate" type="text/html" href="https://gamma.unpythonic.net/"/>

<title>Jeff Epler's blog</title>
<modified>2020-09-07T14:31:40Z</modified>
<tagline>Photos, electronics, cnc, and more</tagline>
<author><name>Jeff Epler</name><email>jepler@unpythonic.net</email></author>
<entry>
<title>Pi Zero W USB Proxy</title>
<issued>2020-09-07T14:31:40Z</issued>
<modified>2020-09-07T14:31:40Z</modified>
<id>https://gamma.unpythonic.net/01599489100</id>
<link rel="alternate" type="text/html" href="https://gamma.unpythonic.net/01599489100"/>
<content type="text/html" mode="escaped">

&lt;img src=&quot;https://media.unpythonic.net/emergent-files/01599489100/IMG_20200907_093946.jpg&quot;&gt;

&lt;p&gt;I'm not sure exactly what to call it, but here's a little something I set
up this weekend.

&lt;p&gt;On my Linux desktop, I have occasional problems where being stopped at the
debugger prompt for a plugged-in USB device hoses the whole computer.
The problem waxes and wanes but on a particularly frustrating day 
I decided that maybe a Pi was the answer to the problem.

&lt;p&gt;Using screen I can access the USB-serial devices on the pi, and using sshfs
I can access the files.  If the whole pi freezes, I can just reboot it
with essentially no harm done.

&lt;p&gt;I selected a Pi Zero W with a Zero4U hub and Adafruit MiniPiTFT 1.14&amp;quot; attached.
To a base raspbian lite system I added some software, including tio, udiskie,
screen, and Adafruit Blinka; enabled ssh access and disk mounting by the pi
user, and set up GNU screen and my custom script for the LCD which is
(confusingly) also called screen.

&lt;p&gt;The screen shows information about each of the 4 USB connectors.
In brackets &amp;quot;S&amp;quot; is shown if there is a serial device; &amp;quot;D&amp;quot; is shown if there's a partitioned disk, &amp;quot;d&amp;quot; if there's an unpartitioned disk; and &amp;quot;M&amp;quot; is shown if it is mounted.  After that, the device name is shown.

&lt;p&gt;Automount can be toggled with the B button (silk screen 23) and any non-mounted disks can be mounted with the A button (silk screen 24)

&lt;p&gt;So far I've only used it lightly, but if it prevents a single crash of my
desktop, it will be worth it.

&lt;p&gt;This isn't a detailed guide so a lot of the setup is omitted.  However, here are the scripts that are the essential parts:

&lt;p&gt;&lt;script src=&quot;https://gist.github.com/jepler/ee50fca98455f26379e5e0ab24ce6ed4.js&quot;&gt;&lt;/script&gt;

&lt;p&gt;&lt;script src=&quot;https://gist.github.com/jepler/ae71dffd3aeb4cb6a11a12e8773ee373.js&quot;&gt;&lt;/script&gt;
</content>
</entry>
</feed>
