Worked out a handy way to deploy software to a PocketBeagle SBC today.
The USB port enumerates a CDC-ACM serial interface (console) and a CDC-Ethernet port, however by default, there's no route to the Internet. To connect it to the Internet, you must set your machine up as a router, and make it use your host as a default route.
Alternatively, you direct things to use a HTTP proxy. Like this:
https://proxypy.readthedocs.io/en/latest/
```
log.info("Sending deployment script")
os.system(
"scp deploy.sh [email protected]:/tmp"
)
# Send the deployment script over via SSH
with proxy.Proxy(port=0) as p:
log.info("Running deployment script")
os.system(
"ssh -R 8080:localhost:%d [email protected] bash -ex /tmp/deploy.sh" % p.flags.port
)
```
In the top of `deploy.sh`:
```
# Never sure whether things use upper or lower case here
export HTTP_PROXY="http://localhost:8080/"
export http_proxy="http://localhost:8080/"
export HTTPS_PROXY="http://localhost:8080/"
export https_proxy="http://localhost:8080/"
```
(Some applications use upper case, others use lower case.)
Now `apt-get`, `git` and friends, can pull files over HTTP/HTTPS via your proxy.
The same technique would work with the Raspberry Pi Zero family.