Setting up Raspberry Pi Zero W headless


Trying to set up a headless Pi Zero W using the built in wifi. With the changes from Jessie to Stretch in Raspbian, setting up how to get your Pi connected to your home wifi has changed somewhat - with spa_supplicant.conf now used and particular coding required to make it work -ref 3rd post -

I finally managed to get the latest version of Stretch setup and connected using those details. However, this doesn’t seem to work AstroBox-rpi-0_13_11-20180709.

Any idea what coding/requirements are needed for the Astro distro?



Have you seen this:


Yes but that is for when you have actually got the Pi connected to the network, which I’m struggling to do with the Astro distro.

Looking on the Octopi website, their distro uses a similar wpa_supplicant file but renamed “octopi-wpa-supplicant.txt”. Is the Astro one similar to this?


No we don’t have anything like that because our product is meant to be configured using a hotspot or ethernet (the Pi Zero W is not really supported but works).

You don’t need to have it connected to run those commands. You can plugin a monitor to the hdmi port and a keyboard to the USB port.


Thanks for the reply Daniel.

I was hoping to just have the Pi Zero W run AstroPrint and I could access it via Astro Desktop/iOS app just on the local network, no remote access or running a webcam. I would have thought this would have been possible?

I wasn’t planning on buying a mirco hdmi cable or a usb keyboard so setting up the Pi via sd card/terminal would have been good. I thought Astro distro runs a variant of Raspbain? Would this not include wpa_supplicant as standard, just possibly renamed similar to Octo?

Many thanks,


It is a variant of Raspbian but the OctoPrint setup is not standard Raspbian, it’s done by the OctoPi project. We currently don’t support it


I understand but octoprint are just using what is baked into raspbain already. Let me try a different tack - what version of raspbain is currently used in the latest Astro distro?


No @danielkrice, the OctoPrint config files on the boot drive are not baked into Raspbian, that was implemented as part of the OctoPi project.


yeah this is all sorts of broken. a fresh stretch imaged to a card works a treat. same pi zero w with current astrobox image written to the card results in all kinds of FAIL.
wpa_supplicant refuses to work.
iw reg get doesn’t stick. crda doesn’t seem to matter. something is very broken


I am using Raspberry Pi Zero W with the AstroPrint and WiFi is working fine. There are a problem with refreshing the page, connection to the cloud but on the daily basis, it is just working, even with my Pi Camera v1.3.
I don’t remember any special issue during setting up the wifi connection :confused:


I would love for mine to work. Are there past images available somewhere to try?


I configired it 3 weeks ago. So it still should be the same image, I will chcek my commands history to check what I did.

This is list of my commands:
pi@astrobox-4758:~ $ history
1 sudo halt
2 sudo nano /etc/network/interfaces
3 sync
4 sudo nano /etc/astrobox/config.yaml
5 sync
6 sudo apt-get update
7 sudo reboot
8 sudo apt-get update
9 sudo apt-get upgrade
10 sync
11 reboot
12 pwd
13 passwd
14 ls
15 raspi-config
16 sudo raspi-config
17 sync
18 reboot
19 sudo reboot
20 ps
21 history

So I just added my wifi network to interfaces, enabled manual network configuration in astroprint config and this is it.


i stumbled onto some other semi-unrelated thread here where someone mentioned editing the config.yaml. not once did i see that anywhere else :open_mouth:
but, after i edited that the wireless started working fine. now if i could get the raspi-cam to work…


Good that it helps. About Raspberry Pi Camera, as you can see in my history, I just enabled it in raspi-config and rebooted. After that AstroBox show me option to select usb or pi camera in settings.


I’ve moved on and just started using Octo instead but just curious @Wojtek - how do you ssh into the Pi in the first place on a fresh install?


You need to create file on boot partition. If I good remember the name should be ssh. After that you can login with pi and raspberry login and password. I moved from octoprint to astroprint for better visual design :smiley:


The SSH file placement is not an issue. You can’t connect to it wirelessly to actually SSH in the first place as the Pi hasn’t connected to a network, because there isn’t a “documented” way of setting that up in the Astro image, unlike the Octo image.


True, for first network configuration I connected my 7 inch HDMI screen… but as it is not officially supported platform it is kind of natural that some of the things you have to do manually.