User Tools

Site Tools


airflash

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
airflash [2021/08/20 10:59]
sausage image change
airflash [2021/09/04 09:49] (current)
sausage [What use is this?]
Line 1: Line 1:
 ====== AirFlash for the Pi Zero ====== ====== AirFlash for the Pi Zero ======
  
-{{ :​airflash:​airflash-with-logo.jpg?​direct&​400|}}+{{ :​airflash:​airflash.jpg?​direct&​400|}}
  
 ===== What is the AirFlash? ===== ===== What is the AirFlash? =====
  
-The AirFlash is an open-source standalone USB powered device that accepts up to four USB Flash drives and will serve their content out over WIFI to one or more users. ​This allows you to take it anywhere and plug it in to a USB power source. Within 90 seconds the device will be available.+The AirFlash is an open-source standalone USB powered device that accepts up to four USB Flash drives and will serve their content out over WIFI to one or more users. ​You can take it anywhere and plug it in to a USB power source. Within 90 seconds the device will be available.
  
-Security is at a minimum. The WIFI password should be printed on the underside of device for nearby users to gain access from their own computers.+Security is at a minimum. The WIFI password should be conveniently ​printed on the underside of the device for nearby users to gain access from their own computers.
  
 If you are just after assembly instructions and a pre-configured image for your SD Card, see the appropriate sections below. If you are just after assembly instructions and a pre-configured image for your SD Card, see the appropriate sections below.
Line 13: Line 13:
 ===== What use is this? ===== ===== What use is this? =====
  
-Great question. There are a couple of basic cases where the AirFlash comes in very handy. You may work for an organisation that does not allow USB flash drives or sticks to be inserted into a corporate laptop. ​So how are you going to get your latest ​downloaded ​podcast ​transferred to your USB-powered ​MP3 player in your carRemember, it is advised to speak to your IT department first.+Great question. There are a couple of basic cases where the AirFlash comes in very handy. You may work for an organisation that does not allow USB flash drives or sticks to be inserted into a corporate laptop. ​It could be difficult getting ​your latest podcast ​onto your USB MP3 player in the car. Or bringing in photos for the office celebration. ​Remember, it is advised to speak to your IT department first.
  
 You can plug the AirFlash into any nearby USB port (to provide power to the device), connect to the WIFI access point called ''​AirFlash'',​ and using your file manager copy your files across to whichever USB stick is connected to the AirFlash. You can plug the AirFlash into any nearby USB port (to provide power to the device), connect to the WIFI access point called ''​AirFlash'',​ and using your file manager copy your files across to whichever USB stick is connected to the AirFlash.
Line 23: Line 23:
 Another good use case is when you are at a LAN party and everyone needs access to the same map packs and patches for a particular game. By leaving the AirFlash plugged in somewhere at the party, everyone can connect to it and pull down what is required. Another good use case is when you are at a LAN party and everyone needs access to the same map packs and patches for a particular game. By leaving the AirFlash plugged in somewhere at the party, everyone can connect to it and pull down what is required.
  
-While the party host could just as easily open a share on his drive, ​there are usually ​a couple ​of problems with this. Firstly, they may be rebooting or switching between operating systems and are therefore unreliable. And second, there is always that one person who can'​t ​connect to the share. You know that person.+While the party host could just as easily open a share on his drive, ​they are usually ​patching and rebooting like the rest of us. And second, there is always that one person who can just never connect to the share. You know that person.
  
-===== How to build your own AirFlash ​=====+Having a separate, portable, dedicated share is a handy tool to keep in your kit. 
 + 
 +===== Parts required ​=====
  
 You will need the following off-the-shelf parts which can be sourced from the following vendors: You will need the following off-the-shelf parts which can be sourced from the following vendors:
Line 37: Line 39:
   * USB flash stick   * USB flash stick
   * HDMI adapter to suit the Pi Zero W - https://​core-electronics.com.au/​mini-hdmi-to-standard-hdmi-jack-adapter-for-raspberry-pi-zero.html   * HDMI adapter to suit the Pi Zero W - https://​core-electronics.com.au/​mini-hdmi-to-standard-hdmi-jack-adapter-for-raspberry-pi-zero.html
 +
 +{{ :​airflash:​airflash-logo-case.jpg?​direct&​600 |}}
 +
 +Huge thanks to my friend Sharm for producing the AirFlash case prints.
  
 ===== Assembly ===== ===== Assembly =====
  
 For assembly instructions for the Pi Zero W and the Zero4U 4-Port USB Board, see the manual here: http://​www.uugear.com/​doc/​Zero4U_UserManual.pdf For assembly instructions for the Pi Zero W and the Zero4U 4-Port USB Board, see the manual here: http://​www.uugear.com/​doc/​Zero4U_UserManual.pdf
- 
-===== What is the rationale for the technology choices? ===== 
- 
-Originally the AirFlash was going to be created using the ESP32 and harnessing the WIFI features and available FTP library. However, USB library support was difficult to find. And I wasn't overly keen to implementing a bit banged mass storage USB driver. 
- 
-Next I looked at the Raspberry Pi Pico and noticed it had some support for connecting a USB device. But I forgot that it didn't come with WIFI onboard. I didn't want to go into the complication of adding a module and then have casing considerations. 
- 
-I settled on the Raspberry Pi Zero W as it features WIFI, USB and good library support through the OS. Having a few seconds boot up time with an OS seemed a fairly pragmatic choice. ​ 
- 
-For the OS, I chose piCore (a port of Tiny Core Linux), for it's robust use of persistence. Hard power cycles do not corrupt the data or OS content of piCore, so power can be pulled from the device without incident. 
  
  
Line 57: Line 53:
 Once assembled, you can connect a mini-usb cable from your PC to the data USB on the Pi. You can connect a USB flash drive to any of the four USB ports (even without any working OS SD Card inserted), and the device will mount and directly serve the USB flash drive. Once assembled, you can connect a mini-usb cable from your PC to the data USB on the Pi. You can connect a USB flash drive to any of the four USB ports (even without any working OS SD Card inserted), and the device will mount and directly serve the USB flash drive.
  
-===== I just want the pre-built image =====+{{ :​airflash:​airflash-bare-test-drive.jpg?​direct&​600 |}} 
 + 
 +===== I just want pre-built image =====
  
 If you just want a working AirFlash setup, you can download this image that I made already set up and running. ​ If you just want a working AirFlash setup, you can download this image that I made already set up and running. ​
Line 70: Line 68:
  
 If you would like the work through the process manually, continue on below. If you would like the work through the process manually, continue on below.
 +
 +
 +===== Second fastest way to build =====
 +
 +It is possible to install the piCore OS to an SD-Card as outlined in this article, but rather than follow the steps to create and edit all the files, you can download all the required files at the github repo instead:
 +
 +https://​github.com/​sausagejohnson/​AirFlashOnPi
 +
 +===== What is the rationale for the technology choices? =====
 +
 +Originally the AirFlash was going to be created using the ESP32 and harnessing the WIFI features and available FTP library. However, USB library support was difficult to find. And I wasn't overly keen to implementing a bit banged mass storage USB driver.
 +
 +Next I looked at the Raspberry Pi Pico and noticed it had some support for connecting a USB device. But I forgot that it didn't come with WIFI onboard. I didn't want to go into the complication of adding a module and then have casing considerations.
 +
 +I settled on the Raspberry Pi Zero W as it features WIFI, USB and good library support through the OS. Having a few seconds boot up time with an OS seemed a fairly pragmatic choice. ​
 +
 +For the OS, I chose piCore (a port of Tiny Core Linux), for it's robust use of persistence. Hard power cycles do not corrupt the data or OS content of piCore, so power can be pulled from the device without incident.
 +
  
 ===== The piCore Operating System ===== ===== The piCore Operating System =====
Line 167: Line 183:
  
 After mounting the USB flash drive (usually this will be: ''​mount /​mnt/​sda''​),​ you can copy these files to the /​mnt/​mmcblk0p2/​tce/​optional/​ folder. This is where the system looks for tcz extensions. After mounting the USB flash drive (usually this will be: ''​mount /​mnt/​sda''​),​ you can copy these files to the /​mnt/​mmcblk0p2/​tce/​optional/​ folder. This is where the system looks for tcz extensions.
 +
 +{{ :​airflash:​airflash-with-power-top.jpg?​direct&​600 |}}
  
 ===== Enabling WIFI ===== ===== Enabling WIFI =====
Line 306: Line 324:
  
 Excellent stuff. Now we have an access point and a DHCP service dishing out IP addresses to whoever should wish to connect. Now to provide Windows shares. But first we'll persist these changes so they don't get lost. Excellent stuff. Now we have an access point and a DHCP service dishing out IP addresses to whoever should wish to connect. Now to provide Windows shares. But first we'll persist these changes so they don't get lost.
 +
 +{{ :​airflash:​airflash-with-power.jpg?​direct&​600 |}}
  
 ===== Persisting hostapd and dnsmasq between reboots ===== ===== Persisting hostapd and dnsmasq between reboots =====
Line 406: Line 426:
  
 ''​filetool.sh -b''​ to persist the changes inside /opt and inside the new samba folder. ''​filetool.sh -b''​ to persist the changes inside /opt and inside the new samba folder.
 +
 +{{ :​airflash:​airflash-drive-connected.jpg?​direct&​600 |}}
  
 ===== Usershares ===== ===== Usershares =====
Line 488: Line 510:
 Who knows, maybe even your IT department would appreciate having one on hand. Who knows, maybe even your IT department would appreciate having one on hand.
  
 +{{ :​airflash:​airflash-drives-connected.jpg?​direct&​600 |}}
  
 ===== Troubleshooting ===== ===== Troubleshooting =====
airflash.1629457145.txt.gz · Last modified: 2021/08/20 10:59 by sausage