Pi Zero W Project: Travel Storage Device

I couldn’t sleep last night so I attempted an install of RaspAP on top of DietPi (following the instructions above relating to not interfering with DietPi’s networking interfaces).

Findings:
RaspAP seemed to take over a lot of aspects once installed. I did receive a few failures during the install but nothing that looked like it was going to affect the general usage (I did not keep any of the install logs). I used the DietPi Automated Install to setup Wi-Fi from the start, but as I mentioned, RaspAP took over once installed. As we know, the hardware limitations on the Pi Zero W won’t allow simultaneous Tx and Rx, but the trick was to NOT reboot until you configure RaspAP’s Hotspot. Once rebooted, RaspAP apparently prioritizes the Hotspot over the general network connection, meaning that the Wi-Fi Client side of things was turned off but the Hotspot remained online. For my purposes, this was a successful test.

I ran into issues when I installed an Ethernet/USB Expansion HAT and plugged in a TP-Link Wi-Fi USB Dongle. RaspAP did not recognize it at first, so after two reboots, it finally recongized it and allowed me to select it through the Hotspot dropdown menu - I am emphasizing the word ‘select’ here because once I rebooted, the Hotspot went down and I was unable to access it through a LAN connection rending it useless.

I used the ethernet connection on the HAT to gain access once again (at this point, I removed the TP-Link Wi-Fi Dongle). After regaining access via ethernet, I returned all settings to default and made sure that TP-Link Wi-Fi Dongle drivers were properly installed and being used - they were. So I plugged the TP-Link Wi-Fi Dongle back into the Pi, rebooted, and removed the ethernet connection. RaspAP went back to using the Pi’s On-Board Wi-Fi module as the Hotspot so I was able to reconnect to the Web GUI and attempt to use the TP-Link Dongle as the Wi-Fi Client. This is where it all went south…

RaspAP wasn’t even allowing me to ‘scan’ for Wi-Fi networks but gave me the option to “re-initialize wpa_supplicant” - so I did. Once that happened, the Hotspot went down, the Wi-Fi Client failed to work at all, and the ethernet connection wouldn’t even allow me to regain access to the Pi. So I said, screw it and went to bed.

Tonight I plan on grabbing another Pi Zero W to install Raspberry Pi OS and try this again - I will also give DietPi OS another shot using the original Pi Zero W with a fresh install but won’t use the TP-Link Wi-Fi Dongle this time since my goal here is to have access via a Hotspot only which I was able to do last night. I will post my results later.

Edit: I just read in the RaspAP Docs that if I have the TP-Link Wi-Fi Dongle plugged in (but not used) during the install process, RaspAP will automatically detect it and use it as the Wi-Fi Client Rx (while using the Pi’s On-Board Wi-Fi module as the Hotspot Tx), so I will attempt to incorporate this step into my testing tonight.

Hi,

I did a quick test and used the automatic install scrip on a RPi4B and it is working. OK not really something to compare with a Pi Zero W :roll_eyes:

Only thing needed was to remove dhcpcd5 and to adjust wlan0 interface to use 10.3.141.1 instead of default DietPi WiFi hotspot IP address.

Makes sense. I was able to reproduce what I mentioned above, with success, but I decided to fallback on simply having it use the On-Board Wi-Fi module (Pi Zero W) to produce a Tx signal so I can connect my iPhone to it. My next step is to install NextCloud so I can offload everything - I wish iOS had an app for rSync or Syncthing since that would make my life much easier, but alas, I shall use what I can for now.

Well if you have to use rasbian…I recommend installing nextcloud and other apps as docker instances w/ it pointing to a persistent bound location for data storage and config, using portainer as a way to control the docker containers as well

Too bad there is so much going on in the DietPi scripting that it breaks the RaspAP setup :frowning:

I do not hold myself out to be any kind of expert since I am just under a year into using Raspberry Pi’s, and about 3 years into general Linux OS’s, but I have come very far in learning the intricacies of this world and am not afraid to admit that I have tried using Docker around 10 times over the last year and have still been completely unsuccessful in my attempts.

Now this isn’t to say that I do not understand the different coding languages since I have a coding background (I used to be a web designer and can usually decipher what I am looking at regardless of the coding language), BUT I believe it is my own brain that cannot understand how it logically works - it simply puzzles me. I have used extra Pi’s (RPi 4’s and Pi Zero’s) on multiple occasions just to try it out and experiment only to completely fail in my understanding of the general dynamics of its basic inter-workings. But I do not expect (or truthfully want) anyone to try to explain it to me now - I WILL one day get it, but I am just not in the mindset right now.

With that being said, I do appreciate the guidance on using Docker to run NextCloud on the Pi Zero since it makes sense to use containers that use minimal resources. It is simply an obstacle/project that I will one day overcome.

dwr
does iOS has an app that can synchronize folder using SAMBA?

On my Android devices I use FolderSync to backup all my pictures https://play.google.com/store/apps/details?id=dk.tacit.android.foldersync.lite&hl=de&gl=US

Maybe there are alternatives on iOS https://alternativeto.net/software/foldersync/?platform=iphone

MichaIng
There is quite a good documentation of manual install steps https://docs.raspap.com/manual/

Probably something that could be adjusted to our needs? Should we have a closer look?

Unfortunately no - not without Jailbreaking at least. Apple keeps their ecosystem pretty locked down and only within the last 5 years or so developed their “Files” App. Even SanDisk’s iXpand Storage products for iOS require manual ‘off-loading’ of files, pictures and videos. 'Tis a shame, indeed.

Edit: I looked through some of those ‘AlternativeTo’ apps, downloaded Resilio, but it’s not an automatic service unfortunately. This wouldn’t be a problem for me except for the fact that I have an iPhone XR with a small storage capacity which, in my use-case, would require me to stop recording, download the photos and videos, delete them, and then continue. With the Samba server from a RPi Zero W or the GL.iNet Mango Router, I can have the GoPro or DJI App directly save to a network address of the Samba server thereby allowing me to continuously record or take pictures without having to offload when the iPhone’s storage fills up.

If I were using an Android phone, I could simply attach an OTG Micro USB or USB-C flash drive to store the files on-demand. I know that the iPhone will allow me to use a ‘Lightning to USB-A’ connector to connect a USB Flash Drive, but the DJI and GoPro Apps won’t allow continual saving to a flash drive… weird, right?

Yeah Apple is doing all for his customer to be not user friendly :roll_eyes: ok different story

Stumbled across this…this might help

Another solution could be a static/stand alone web generated file service

I did some digging…I used HFS ~ Http File Server alot on some of my windows machines, just log into the webpage…then upload files directly to the windows machine

Linux equivalent after some poking around
PHFS ~ Python Http File Server
and
LanXchange
and
Weborf

Perhaps if/when some sort of WIFI AP SSID can be generated…remote device connects to that…then logs into a webpage (universally accepted on almost ALL types of devices) and upload that way

Also found this…if interested
PIRATEBOX Raspbian and Armbian based manual instructions

Maybe the management of wifi card in NetworkManager is the culprit

Disable management of wifi card in NetworkManager
The NetworkManager is a comfort feature, which tend to disturb a smoothness running PirateBox. You can disable the management of wlan0 of the NetworkManagement daemon, run:

if ! grep -q wlan0 /etc/NetworkManager/NetworkManager.conf ; then
sudo sed -i -e ‘s|unmanaged-devices=interface-name|unmanaged-devices=;interface-name|’
/etc/NetworkManager/NetworkManager.conf
sudo sed -i -e ‘s|unmanaged-devices=|unmanaged-devices=interface-name:wlan0|’
/etc/NetworkManager/NetworkManager.conf
fi

>

This looks rather nice as well…simple one line setup for nexcloud in a docker instance…also you can build it yourself

if the wifi thing ever get’s fixed…this might be a good addon
https://github.com/nextcloud/nextcloudpi

Woooo!!! Got hostapd to activate on my RPi0W, compiled in dietpi…it took ALOT of installing missing packages…but got it
https://wireless.wiki.kernel.org/en/users/Documentation/hostapd

root@DietPi:/usr/local/bin# ./hostapd /etc/hostapd/hostapd-minimal.conf
wlan0: interface state UNINITIALIZED->ENABLED
wlan0: AP-ENABLED

however I lost connectivity…testing further…I have a .deb created with checkinstall
https://mega.nz/file/uU0gCKAB#S1WGn84jFlZTuudtb_fdAfMRBqXYQjeMaGcQWS1-JZk

Yessir - this is actually how I have it setup at present. I explored FE File Explorer as well and found it to be more robust so I switched to using that - loving it so far.


Thanks for the additional options! I actually found a few of these types of solutions already (see below) but none of the ones that you posted.

ArozOS is a great little virtual desktop OS, utilizing a USB (OTG) add-on board (which I have a few of) but unfortunately it isn’t a solution since it’s so robust.

SUBZero is exactly what you are referring to, but it’s too basic in the sense that it doesn’t allow me to upload to a folder (within the connected USB Flash Drive) of my choosing - given my web design background, it probably wouldn’t be difficult to modify some of the coding to select my own folder (I might give this another shot, actually).

I’ll check those out later this evening!


I briefly looked into PIRATEBOX during my intial search for a solution, however based on how old it is (and lack of updates), I decided to veer away from it. But hey, it’s worth a shot! I’ll give it another ‘once-over’ later tonight.


Believe it or not, this is exactly what I used during my 2nd or 3rd attempt at setting something like this up - I used a fresh install of RPi OS Lite, then installed RaspAP, and finally NextCloudPi. It ran pretty well until I had the issues with RaspAP - I steered away from it since NextCloud isn’t the lightest on system resources, but it still could be a possible solution since I wouldn’t be in any rush to offload the files once done with my ‘adventures’.


This is GREAT NEWS! Hopefully your testing will provide successful results since RaspAP seems to go “commando” on other software/scripts that I add to the Pi Zero (changing and reconfiguring things after reboots).

Please keep me updated!

So I looked over the options you provided, and came up with more questions/concerns, haha! :rofl:

PHFS ~ Python Http File Server - looks too complicated for my current knowledge.
LanXchange - looks promising and I will give this a shot soon.
Weborf - correct me if I am wrong here, but this doesn’t look like it supports ARM devices…?

you could try to compile server as well as frontend package yourself https://github.com/ltworf/weborf#compile

In order to do the

autoreconf -f -i

I had to

sudo apt install autoconf automake autotools-dev -y

got it compiled…it only allows reading of the files…not uploading


LanXchange will not work without a desktop
I downloaded oracle jdk 8 w/ the floating point operation for RPi0 processor architecture and installed

root@DietPi:~# java -version
java version "1.8.0_301"
Java(TM) SE Runtime Environment (build 1.8.0_301-b09)

Getting a failure when I try to run it

root@DietPi:/home/warhawk# ./lxc
root@DietPi:/home/warhawk# Exception in thread "main" java.awt.HeadlessException:
No X11 DISPLAY variable was set, but this program performed an operation which requires it.
        at java.awt.GraphicsEnvironment.checkHeadless(GraphicsEnvironment.java:204)
        at java.awt.Window.<init>(Window.java:536)
        at java.awt.Frame.<init>(Frame.java:420)
        at java.awt.Frame.<init>(Frame.java:385)
        at javax.swing.JFrame.<init>(JFrame.java:189)
        at de.tobifleig.lxc.plaf.swing.SwingGui.<init>(SwingGui.java:93)
        at de.tobifleig.lxc.plaf.swing.GenericPCPlatform.<init>(GenericPCPlatform.java:54)
        at de.tobifleig.lxc.plaf.swing.Main.main(Main.java:44)

Fooey

First, I have to say thank you for your continued effort with this project. I cannot say for sure, but it seems like there is a… desire for something like this out of the box, and while some of these solutions can satisfy that desire/need/want/whatever, most are out of date or no longer maintained (as you are probably finding out). So, thank you from me and all those that are currently looking, or will be looking for a solution for a project like this in the future.

Ok, so getting back on track… I setup PirateBox (since most of the other options that either you all or I discovered are no longer viable or are beyond my expertise) and found that the instructions that present themselves on the terminal screen after install are not the same as the instructions on the PirateBox website, HOWEVER, things seem to be working at this point. After I make some dinner, grab a quick shower, and prep for work tomorrow, I plan to dive into PirateBox a bit more.

I’ll report back once I have fully tested it’s capabilities…

HORY CRAP!
hory.crap.jpg
Got it working…only by installing LXDE (a desktop) using the DietPi scripting and TigerVNC
and viola…however can’t connect TO it from my windows machine…