Pi Zero W Project: Travel Storage Device Topic is solved

Having issues with your DietPi installation or found a bug? Post it here.
Post Reply
User avatar
dwr
Posts: 72
Joined: Thu Feb 18, 2021 3:46 am

Pi Zero W Project: Travel Storage Device

Post by dwr »

Greetings,

Before I begin, I want to outline the hardware and software that I will be using:

Hardware:
  • Raspberry Pi Zero W
  • USB + Ethernet Expansion HAT (Connected via GPIO and MicroUSB Data Port)
  • SanDisk 64GB Flash Drive (for 'dietpi_userdata' and Photo, Video, & File Storage)
  • (Optional) TP-Link TL-WN725N USB Wi-Fi Dongle
Software:
  • DietPi OS (32bit)
  • NextCloud (Photo, Video, & File Storage)
  • Wi-Fi Hotspot (to connect a device to to transfer files)
Project Goals:
I am attempting to setup a Travel Storage Device to transfer photos and videos to. The goal is to have the Pi Zero W put off a Wi-Fi signal via the Hotspot software to which I will connect to and upload photos, videos, and files through the NextCloud software. Due to the setup that I am using, I do not require the Pi Zero to have access to the internet via Wi-Fi since I will use an ethernet connect for updates, etc - I simply need it to put off a Wi-Fi signal for me to connect to.

Initial Thoughts and Subsequent Issues:
My initial thought process included using the TP-Link Wi-Fi USB Dongle as the Wi-Fi transmitter (via the Hotspot Software), and the Pi's On-Board Wi-Fi to connect to the internet for updates. However, I found that DietPi OS does not recognize the USB W-Fi Dongle after the initial setup and reboot. Since that wasn't working, I tried to simply use the On-Board Wi-Fi as both the transmitter and receiver, but 'dietpi-software' would not allow me to install the Hotspot Software without a network connection through the ethernet port.

So, my question is simple: What is the easiest and most efficient way for me to set this up?

Image
User avatar
WarHawk
Posts: 773
Joined: Thu Jul 20, 2017 8:55 am

Re: Pi Zero W Project: Travel Storage Device

Post by WarHawk »

Best bet would be to just set it up as a WIFI AP, then use your phone to direct connect to the AP's SSID, then you can directly use either a URL or simply the DNS IP of the AP as the connector to Nextcloud and then sync the images that way.

Heck you could probably run a full bore photo gallery (included in Dietpi Software Store)

I did so some digging...I found this guy created a dual SSID build on a RPi0W that no only broadcasts it's own SSID, but appears it can connect to a wifi AP directly as well (not sure it can route thru it...maybe it can)
He is an Amateur Radio guy so it's a bit in depth
https://www.youtube.com/watch?v=TO6lmroNDRU
https://github.com/km4ack/pi-scripts
User avatar
dwr
Posts: 72
Joined: Thu Feb 18, 2021 3:46 am

Re: Pi Zero W Project: Travel Storage Device

Post by dwr »

WarHawk wrote: Wed Jul 28, 2021 3:49 am Best bet would be to just set it up as a WIFI AP, then use your phone to direct connect to the AP's SSID, then you can directly use either a URL or simply the DNS IP of the AP as the connector to Nextcloud and then sync the images that way.
Yes, that is what my goal is here, however I am unable to get DietPi to work like this. As mentioned above, I was going to set it up using the Hotspot software included with DietPi. Maybe the Hotspot software is the wrong way to go in this scenario... Thoughts on a better software solution?
WarHawk wrote: Wed Jul 28, 2021 3:49 am Heck you could probably run a full bore photo gallery (included in Dietpi Software Store)
I run multiple websites with Lychee and other photo gallery software through my hosting business so I am familiar with this but figured that running NextCloud on the Pi Zero for this special project would be more... robust... since it allows me to upload whatever I need to it. But I am always open to others' opinions and solutions - thoughts?
WarHawk wrote: Wed Jul 28, 2021 3:49 am I did so some digging...I found this guy created a dual SSID build on a RPi0W that no only broadcasts it's own SSID, but appears it can connect to a wifi AP directly as well (not sure it can route thru it...maybe it can)
He is an Amateur Radio guy so it's a bit in depth
https://www.youtube.com/watch?v=TO6lmroNDRU
https://github.com/km4ack/pi-scripts
It's funny that you mention this as I am actually a registered HAM Radio operator, haha! I will check out his GitHub tomorrow to see if anything that he currently has posted will work for me. As a side note, RaspAP will also do what you mentioned here (broadcasting an AP as well as receiving signal) but I would much rather work with DietPi since it allows me to be more flexible with additional software installations (since the software that is available through DietPi will work in conjunction with each other).
User avatar
Joulinar
Posts: 5619
Joined: Sat Nov 16, 2019 12:49 am

Re: Pi Zero W Project: Travel Storage Device

Post by Joulinar »

Yes the HotSpot implementation of DietPi is not that flexible. For installation, it require an Ethernet (eth0) as well as WiFi (wlan0) interface and of course an internet connection to be able to download packages needed.

As an alternative, RaspAP should be working as well.
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
User avatar
dwr
Posts: 72
Joined: Thu Feb 18, 2021 3:46 am

Re: Pi Zero W Project: Travel Storage Device

Post by dwr »

Joulinar wrote: Wed Jul 28, 2021 12:40 pm Yes the HotSpot implementation of DietPi is not that flexible. For installation, it require an Ethernet (eth0) as well as WiFi (wlan0) interface and of course an internet connection to be able to download packages needed.

As an alternative, RaspAP should be working as well.
I actually tried installing RaspAP on top of DietPi last year but was unable to get it to work properly. If you are able to provide me with some detail about getting it to work with with DietPi, I would be extremely grateful since that would solve my issue.

I probably should have put this in the original post, but I am attempting to mirror this project: SUBZero (Secure USB Backup Zero) - however, with this project, one cannot change where the files are "uploaded" to nor is there an interface to view the already uploaded files (which is why I wanted to use NextCloud). Thoughts on an alternative?
User avatar
MichaIng
Site Admin
Posts: 3216
Joined: Sat Nov 18, 2017 6:21 pm

Re: Pi Zero W Project: Travel Storage Device

Post by MichaIng »

Just for reference: https://github.com/MichaIng/DietPi/issues/2813
RaspAP install experiences/attempts can be at best discussed there.
User avatar
dwr
Posts: 72
Joined: Thu Feb 18, 2021 3:46 am

Re: Pi Zero W Project: Travel Storage Device

Post by dwr »

MichaIng wrote: Wed Jul 28, 2021 6:57 pm Just for reference: https://github.com/MichaIng/DietPi/issues/2813
RaspAP install experiences/attempts can be at best discussed there.
Indeed - I found this will Google'ing "DietPi RaspAP".

I found this as well while searching for the above:

Might be worth a shot, but not using DietPi unfortunately. I suppose I could install NextCloud manually or simply use Samba. I'll report back with my results, but if anyone has any other suggestions or tips to make something like I mentioned in the original post, please let me know.
User avatar
WarHawk
Posts: 773
Joined: Thu Jul 20, 2017 8:55 am

Re: Pi Zero W Project: Travel Storage Device

Post by WarHawk »

dwr wrote: Wed Jul 28, 2021 4:21 am
WarHawk wrote: Wed Jul 28, 2021 3:49 am Best bet would be to just set it up as a WIFI AP, then use your phone to direct connect to the AP's SSID, then you can directly use either a URL or simply the DNS IP of the AP as the connector to Nextcloud and then sync the images that way.
Yes, that is what my goal is here, however I am unable to get DietPi to work like this. As mentioned above, I was going to set it up using the Hotspot software included with DietPi. Maybe the Hotspot software is the wrong way to go in this scenario... Thoughts on a better software solution?
WarHawk wrote: Wed Jul 28, 2021 3:49 am Heck you could probably run a full bore photo gallery (included in DietPi Software Store)
I run multiple websites with Lychee and other photo gallery software through my hosting business so I am familiar with this but figured that running NextCloud on the Pi Zero for this special project would be more... robust... since it allows me to upload whatever I need to it. But I am always open to others' opinions and solutions - thoughts?
WarHawk wrote: Wed Jul 28, 2021 3:49 am I did so some digging...I found this guy created a dual SSID build on a RPi0W that no only broadcasts it's own SSID, but appears it can connect to a wifi AP directly as well (not sure it can route thru it...maybe it can)
He is an Amateur Radio guy so it's a bit in depth
https://www.youtube.com/watch?v=TO6lmroNDRU
https://github.com/km4ack/pi-scripts
It's funny that you mention this as I am actually a registered HAM Radio operator, haha! I will check out his GitHub tomorrow to see if anything that he currently has posted will work for me. As a side note, RaspAP will also do what you mentioned here (broadcasting an AP as well as receiving signal) but I would much rather work with DietPi since it allows me to be more flexible with additional software installations (since the software that is available through DietPi will work in conjunction with each other).
Well if the DietPi AP one doesn't work then a side load of RaspAP will work just fine...the other apps in DietPi will work just as advertised, it's just the scripting to get the wireless card to operate smoothly just isn't up to snuff...

I have sideloaded many non DietPi programs into a DietPi build...they just don't auto stop/start with the DietPi-config scripts...and will have to use the init or systemctl commands to restart/control, so the RaspAP might be the best cleanest/easiest option to go with (however there might be quite a bit of manual installation needed) https://docs.raspap.com/manual/ <- maybe the devs can look at this and build a working script to do a proper install of RaspAP directly on DietPi as an actual DietPi package

DietPi is based off of Debian (just heavily scripted) so any commands to run/install apps on Debian will work on DietPi

73's KF5CIF
User avatar
WarHawk
Posts: 773
Joined: Thu Jul 20, 2017 8:55 am

Re: Pi Zero W Project: Travel Storage Device

Post by WarHawk »

Just tried it...didn't work

Sacrificed my Pwnagotchi build (imaged the card first of course) and installed the latest DietPi image on it...and attempted the install...no go...it would connect to the wireless but would not broadcast the AP SSID for the Captive Portal...I tried all night to get it to work but no go

Nope tried the YouTube video version as well...no go, I can see the WIFI SSID but when I connect, I get no DHCP address from the RPi0W...I did see when installing the guys script it did give and error on the hostapd install (but the script disables it ??)

Dunno what to do, following the video was easy enough...and it installed straight forward but due to the scripting of DietPi it really messes with the scripting of the AP scripting...dunno what to do...sorry
User avatar
Joulinar
Posts: 5619
Joined: Sat Nov 16, 2019 12:49 am

Re: Pi Zero W Project: Travel Storage Device

Post by Joulinar »

You did used 2 WiFi adapter?
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
Post Reply