Some quick rPi Zero 2W questions

Hi All,
I’m just double checking to see in my understandsing of deploying IB Hosted on rPiZero 2W. Some of my understandings (i.e., ASSumptions) are:

  • Must boot from sd card. Hacks to allow booting from USB port won’t work.
  • One can attach a formatted USB drive to the OTG port following the procedured in “Device Configuration - info-beamer”.
  • Other than copying the files to be cached to the drive and creating the stub file /config/importer on the u-sd card the process is transparent(ish) to the user.
  • If on enables P2P on IBs on the LAN they will share the data equitably.
  • I assume that file names and hashed values must agree with the uploaded assets.

Questions:

  • Are all files cached in memory at initialization? Is is possble to leave the on-device when not in use, or when in use by a peer device? USB drive can hold terabytes of files at very low cost; memory on a pi zero 2W is 500Mb. I’m primary thinking of video or large audio files.

I’m currently falling down the rabbit hole of IB programming. Lua, OpenGL, the ins and outs of the API. It’s been a while since I’ve coded at this low a level. I didn’t appreciate how level I was coding until I realized that every line was writing executed with every frame. A far cry from Qt, and a nice trip back to roots.

Correct.

It doesn’t have to be directly connected (I think OTG implies that? Or am I wrong?). Any USB connection would work, including through a hub. Also make sure the drive is FAT32 formatted. Other filesystems won’t work.

Correct.

Exactly. The P2P sharing doesn’t care how the files got retrieved initially. So they could be downloaded or imported via USB.

Filename doesn’t matter. Only the hash must be identical as it’s the “primary key” for any content.

Not cached in memory, but on the local SD card. So that’s an interesting idea but won’t work at the moment. The importer currently works by blindly importing every file from the attached USB drive into the SD’s cache directly. So the files on the USB shouldn’t exceed the capacity (minus around 1GB) of the SD card. The idea with the current implementation is that you attach the USB drive, wait until the Pi stops blinking and you know all files have been imported. That would be difficult when the file are only imported on-demand.