Wifi on RPI Zero W

This forum is for topics specific to the Raspberry Pi and Arch Linux ARM

Wifi on RPI Zero W

Postby ber532k » Fri Mar 31, 2017 7:03 pm

Hi everyone,

I am currently trying to figure out how to use the RPi Zero W's onboard WiFi. I am running the official image for Raspberry Pi (1) and from what I can see it performs quite well, only it lacks support for the onboard networking devices (obviously).

How was networking made available for the RPi3? Could this method, maybe even the same buildscripts be used for ARMv6? Or is anyone already using the RPi Zero W and maybe even it's networking capabilities?

Regards
ber532k
 
Posts: 1
Joined: Fri Mar 31, 2017 6:39 pm

Re: Wifi on RPI Zero W

Postby alphanumeric » Mon Apr 03, 2017 2:11 pm

I have just set up the Pi Zero W with wifi, it works without issues so far. I set it up with

https://wiki.archlinux.org/index.php/Netctl

Basicly I copied the

/etc/netctl/examples/wireless-wpa

file to

/etc/netctl/wireless-wpa

modified it and started the daemon via

$this->bbcode_second_pass_code('', '$netctl start wireless-wpa')

I also ended up disabling networkd, not sure if it was necessary or wise. Since the first boot ssh is not working here, I m still looking into it, but wifi works : )
alphanumeric
 
Posts: 1
Joined: Mon Apr 03, 2017 2:00 pm

Re: Wifi on RPI Zero W

Postby stasiana » Mon May 01, 2017 2:34 pm

My script to enable Wi-Fi on a new install. Run this on the host system where /dev/disk is the block device of your newly installed Arch on the SD card.

$this->bbcode_second_pass_code('', '
#!/bin/sh

set -e

if [[ $# -ne 3 ]] ; then
echo "Usage: $0 </dev/disk> <ssid> <passphase>"
exit 1
fi

DISK="$1"
SSID="$2"
PASS="$3"

if [[ ! -b "${DISK}" ]] ; then
echo "Not a block device: ${DISK}"
exit 1
fi

if [[ "${USER}" != "root" ]] ; then
echo "Must run as root."
exit 1
fi

echo Mounting
mkdir root
mount "${DISK}2" root

cat << EOF >> root/etc/systemd/network/wlan0.network
[Match]
Name=wlan0

[Network]
DHCP=yes
EOF

wpa_passphrase "${SSID}" "${PASS}" > root/etc/wpa_supplicant/wpa_supplicant-wlan0.conf

ln -s \
/usr/lib/systemd/system/wpa_supplicant@.service \
root/etc/systemd/system/multi-user.target.wants/wpa_supplicant@wlan0.service

echo Unmounting
umount root

echo Cleaning up
rmdir root')
stasiana
 
Posts: 5
Joined: Wed Apr 26, 2017 3:58 am

Re: Wifi on RPI Zero W

Postby Waimanu » Fri Jun 09, 2017 9:05 pm

stasiana, thanks for posting your script. It was very helpful to me. One suggestion: The first line should probably be

$this->bbcode_second_pass_code('', '#!/bin/bash')
so that the script will work on systems where /bin/sh doesn't point to /bin/bash. (I ran it on a Xubuntu host :) )
Waimanu
 
Posts: 1
Joined: Fri Jun 09, 2017 8:49 pm


Return to Raspberry Pi

Who is online

Users browsing this forum: No registered users and 10 guests