From a243b2c8fb215adb7bf065f372344f88012d0a6f Mon Sep 17 00:00:00 2001 From: KemoNine Date: Tue, 18 Aug 2020 18:58:23 -0400 Subject: [PATCH] Add auto config of wifi using a usb disk with 'wifi.txt' config file --- docs/README.md | 1 + docs/auto_wifi_setup.md | 29 +++++++++++++++++++++ docs/networking.md | 2 +- wifi_setup.py | 56 +++++++++++++++++++++++++++++++++++++++++ 4 files changed, 87 insertions(+), 1 deletion(-) create mode 100644 docs/auto_wifi_setup.md create mode 100644 wifi_setup.py diff --git a/docs/README.md b/docs/README.md index 7cf2091..568e533 100644 --- a/docs/README.md +++ b/docs/README.md @@ -14,6 +14,7 @@ Items marked ```REQUIRED``` are assumed to be setup and working. You've been war * [Finalize Setup (REQUIRED)](finalize_setup.md) * [Setup swap (REQUIRED)](swap.md) * [Additional Networking Setup (REQUIRED)](networking.md) +* [Automatic WiFi Setup (VERY SMART)](auto_wifi_setup.md) * [Apt use RAM (VERY SMART FOR 4Gb RAM)](apt_cache_tmpfs.md) * [Automatic Updates (VERY SMART)](auto_updates.md) * [Logs in RAM (VERY SMART)](log2ram.md) diff --git a/docs/auto_wifi_setup.md b/docs/auto_wifi_setup.md new file mode 100644 index 0000000..6d14db1 --- /dev/null +++ b/docs/auto_wifi_setup.md @@ -0,0 +1,29 @@ +# Automatic WiFi Config + +The below will setup automatic WiFi configuration via text file. The way this will work is you plug in a USB disk with a file named ```wifi.txt``` with the ```essid``` as the first line and ```password``` as the second line in the file. On boot a small script will run that reads the file and re-configures the PiFrame's WiFi to use the new values. + +Can be used for setup and/or re-configuring WiFi if something changes. + +``` sh + +git clone https://git.kemonine.info/PiFrame/piframe.git /opt/piframe +cp /opt/piframe/wifi_setup.py /usr/local/bin +chmod a+x /usr/local/bin/wifi_setup.py + +cat > /etc/systemd/system/wifi_setup.service <