Created
March 28, 2017 18:23
-
-
Save fionn/48531574f06b4796afcd9e73bc18c6f0 to your computer and use it in GitHub Desktop.
make drone's WPA configuration persistent
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# Append | |
# /home/default/wpa.sh & | |
# to /bin/wifi_setup.sh | |
# The desired IP address for the drone | |
ADDRESS="192.168.x.y" | |
# WPA credentials for the new network | |
ESSID="some_ssid" | |
PASSWORD="password" | |
wpa_passphrase $ESSID $PASSWORD > /etc/wpa_supplicant.conf | |
# shorten this when everything is confirmed working | |
sleep 100 | |
{ ifconfig ath0 $ADDRESS; iwconfig ath0 essid '$ESSID' && wpa_supplicant -B -Dwext -iath0 -c/etc/wpa_supplicant.conf; } & |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment