I was using Wlan0 but in the middle I do not know where I messed up wlan0 wasn't starting automatically instead my pi3 was trying to connect through ethernet with LAN cable plugged in, so I unplugged LAN cable it was still not having wlan0 started automatically so I have put this below line in /etc/rc.local
sudo /etc/init.d/networking restart; sudo ifup wlan0
Is it ok to put in /etc/rc.local
I am doubting because earlier it used to start automatically without this line in rc.local
?
Contents of /etc/network/interfaces
# interfaces(5) file used by ifup(8) and ifdown(8)
# Please note that this file is written to be used with dhcpcd
# For static IP, consult /etc/dhcpcd.conf and 'man dhcpcd.conf'
# Include files from /etc/network/interfaces.d:
source-directory /etc/network/interfaces.d
auto lo
iface lo inet loopback
iface eth0 inet manual
allow-hotplug wlan0
iface wlan0 inet manual
wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf
allow-hotplug wlan1
iface wlan1 inet manual
wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf
sudo
in/etc/rc.local
; it's run by init with privileges. If you wish to test it, then usesudo rc.local
instead. – goldilocks Aug 27 '16 at 17:08/etc/network/interfaces
– Ciasto piekarz Aug 28 '16 at 05:34