Systemd unit to switch between joining a network and creating an access point. This repository contains a script and systemd unit file that checks a GPIO pin, and will either join an existing network with netctl or create an access point with hostapd.
- libgpiod - for checking gpio pins
- iproute2 - for setting up network interfaces
- hostapd - for creating a swoftware access point
- dnsmasq - to provide a DHCP server for the access point
- netctl - for joining wifi network
For Arch Linux, run makepkg and install the resulting package.
On other systems, the unit file can be installed to /etc/systemd/system
with modifications for wherever the script file is installed to.
After the unit and script are installed configure the following:
- configure netctl with at least one WiFi network to join
- configure hostapd to provide the access point
- configure dnsmasq
Start/enable wifi-ap-sw
- Make more flexible, right now the pocket beagel pin
P1.20
and wlan0 are used. It is possible, in the futre, that something else may be needed.