0

I'm using VNC viewer to connect to my Raspberry Pi 3 running Raspbian Stretch. I set up my wifi connection using the wifi setting on the menu bar. However, after I reboot the Pi it does not connect to wifi automatically and I have to manually connect it. Extensive google research yielded no working solutions. I have tried editing the interfaces file and wpa_supplicant.conf but nothing has worked so far.

my /etc/network/interfaces file:

# 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

my /etc/wpa_supplicant/wpa_supplicant.conf file:

ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
update_config=1
country=GB

network={
        ssid="mywifiname"
        psk="mywifipassword"
        key_mgmt=WPA-PSK
}

2 Answers2

0

What you have looks correct (assuming SSID and Password are correct) and you haven't modified any other files.

How are you accessing VNC if networking is not set?

See How to set up networking/WiFi

Milliways
  • 62,573
  • 32
  • 113
  • 225
-2

Try adding a line auto wlan0 in the /etc/network/interfaces file. That should make it work.

RalfFriedl
  • 2,180
  • 2
  • 11
  • 12