This commit is contained in:
Daniel (Fourdee) 2016-10-08 13:42:47 +01:00
parent aff815ef23
commit 70bea9edbd
2 changed files with 19 additions and 6 deletions

View File

@ -22,7 +22,7 @@ iface wlan0 inet dhcp
# wireless-key xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
# wpa-psk xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
# to generate a secure encrypted key: wpa_passphrase yourSSID yourpassword
# Disable power saving on most chipsets (prevents SSH/connection dropouts)
# Disable power saving on compatible chipsets (prevents SSH/connection dropouts over WiFi)
wireless-mode Managed
wireless-power off

View File

@ -271,7 +271,7 @@ do_firstrun_automated_user_configuration() {
#-----------------------------------------------------------------------------
#Set Network
# - Get 1st active index of wlan and eth adapters
# - Get 1st index of available wlan and eth adapters
local fp_ifconfig_tmp='/tmp/.ifconfig'
ifconfig -a > "$fp_ifconfig_tmp" #export to file, should be quicker in loop than calling ifconfig each time.
@ -331,9 +331,21 @@ do_firstrun_automated_user_configuration() {
#Disable powersaving for known chips that suffer from powersaving features causing connection dropouts.
# This is espically true for the 8192cu and 8188eu.
#FOURDEE: This may be better located as a default setting in ARMbian.
echo -e "options 8192cu rtw_power_mgnt=0" > /etc/modprobe.d/8192cu.conf
echo -e "options 8188eu rtw_power_mgnt=0" > /etc/modprobe.d/8188eu.conf
#FOURDEE: This may be better located as default in ARMbian during build (eg: common), as currently, not active until after a reboot.
# - Realtek | all use the same option, so create array.
local realtek_array=(
"8192cu"
"8188eu"
)
for ((i=0; i<${#realtek_array[@]}; i++))
do
echo -e "options ${realtek_array[$i]} rtw_power_mgnt=0" > /etc/modprobe.d/realtek_"${realtek_array[$i]}".conf
done
unset realtek_array
# - Ethernet enable
elif (( $FR_net_ethernet_enabled )); then
@ -411,7 +423,8 @@ main() {
# old distros can't handle allow-hotplug
if [[ "$DISTRIBUTION" == "wheezy" || "$DISTRIBUTION" == "trusty" ]]; then
sed -i "s/allow-hotplug eth0/auto eth0/" /etc/network/interfaces
sed -i "s/allow-hotplug eth/auto eth/" /etc/network/interfaces
sed -i "s/allow-hotplug wlan/auto wlan/" /etc/network/interfaces
fi
# some hardware workarounds