Skip to content

adam-burns/devuan-pi-gadgeteer

Repository files navigation

Devuan Pi Gadgeteer

Give power to a Pi
Get virtual USB devices

Devuan Pi Gadgeteer Photo

Devuan Pi Gadgeteer Photo

Dyne.org



Work in progress 🚧:

Devuan Pi Gadgeteer is an ansible script to enable compatible Raspberry Pi hardware models running Devuan Pi to act as a multi-function USB device (also called a gadget) when connected to a host or laptop.

The default configuration offers a USB network interface presented to the USB host with a higher routing priority than other native ethernet or WiFi interfaces. This means all default networking traffic is configured to flow through the Devuan Pi USB gadget.

The default configuration also offers a virtual USB flash drive storage device (capacity configurable, default 10G), a side effect of this is the connected USB host can potentially be booted from this device.

This repository should be cloned on a local provisioning machine, not on the device to be provisioned (this may work, but has not been tested).

Currently the script enables a compatible Devuan Pi to present itself to a USB host as:

  • a USB 10G mass storage gadget (capacity is configurable)

  • network adapter gadgets (ECM & RNDIS adapters)

(more coming soon)

** Raspberry Pi Hardware Compatibility **

Pi Model
Raspberry Pi 4 Yes
Raspberry Pi Zero W Yes
Raspberry Pi Zero 2 W Yes
Raspberry Pi 1 No Hardware not compatible
Raspberry Pi 2 No Hardware not compatible
Raspberry Pi 3 No No Data lines on USB power port

USB Host functionality has been tested as functional on:

Host OS Host Hardware Pi Model USB Storage USB Network
Windows 10 Lenovo Thinkpad P52 Pi 4 Yes Yes
Windows 10 Lenovo Thinkpad P52 Pi Zero 2W Yes Yes
Linux Fedora 35 Lenovo Thinkpad P52 Pi 4 Yes Yes
Linux Fedora 35 Lenovo Thinkpad P52 Pi Zero 2W Yes Yes
macOS Monterey MacBook Air M1 2020 Pi 4 Yes Yes
Devuan 5 Pi 4 Pi Zero 2W Yes Yes
Android 11 Nokia 7.2 Pi 4 Yes No

🚩 Table of Contents (click to expand)

📝 Prepare

  • Install Devuan Pi on a compatible Raspberry Pi from latest nightly builds for Devuan Pi, available on the Devuan ARM images site. Download & install the correct image for your hardware (Devuan 5 Daedalus recommended).

  • Configure the freshly installed Devuan Pi with a wireless network (as root):


menu-config


When the device is connected to the wireless network, take note of its IP address as it may be needed for if multicast DNS is not detected during the install process.


💾 Install

Once the Devuan Pi is connected to the local network, issuing the following on the provisioning host to start the install:


make play

This executes an ansible playbook to configure the system and will reboot the Pi.

On the first reboot, the system will then format a fresh 10G (default) image file for a USB mass storage device. This can take about 20 minutes on a Pi 4.


By default, the Devuan Pi hostname is configured as devuanpi. If on the provisioning host, the ansible script errors reporting it cannot find the target device, edit the file hosts.yml and replace the hostname devuanpi.local with the IP address of the Pi to be provisioned.


🎮 Quick start

  • Power down the provisioned Pi and disconnect the Pi power supply.

  • Connect a USB cable to the the Pi USB power supply USB port.

  • Connect the other end of the USB cable to a host computer.


With power now supplied by the host computer, in exchange, the Devuan Pi will boot and expose USB storage and network devices to the host.


🔝 back to top

😍 Acknowledgements

software by Dyne.org

Copyleft (ɔ) 2022 by Dyne.org foundation, Amsterdam

Designed, written and maintained by Adam Burns.

🔝 back to top


🌐 Links

🔝 back to top


👤 Contributing

Please first take a look at the Dyne.org - Contributor License Agreement then

  1. 🔀 FORK IT
  2. Create your feature branch git checkout -b feature/branch
  3. Commit your changes git commit -am 'Add some fooBar'
  4. Push to the branch git push origin feature/branch
  5. Create a new Pull Request
  6. 🙏 Thank you

🔝 back to top


💼 License

Devuan Pi Gadgeteer - 
Copyleft (ɔ) 2021 Dyne.org foundation, Amsterdam

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as
published by the Free Software Foundation, either version 3 of the
License, or (at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU Affero General Public License for more details.

You should have received a copy of the GNU Affero General Public License
along with this program.  If not, see <http://www.gnu.org/licenses/>.

🔝 back to top

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published