0

I have been accessing this Pi over SSH on a wifi per the initial install via burning a raspbian image to an SD card. I tried unsuccessfully to add another wifi network by editing the wpa_supplicant.conf as follows:

network={
    ssid="OriginalWifi"
    psk="passwordSchool"
}

network={
    ssid="NewWifi"
    psk="passwordHome"
} 

Should this work? Or do I have to burn the SD card again with the updated wifi creds in wpa_supplicant.conf?

2

You need to add an id to each network and possibly a priority if there is a chance to have both detectable at the same time:

network={
    ssid="OriginalWifi"
    psk="passwordSchool"
    id="school"
}

network={
    ssid="NewWifi"
    psk="passwordHome"
    id="home"
} 

You can add a priority= line in each network block {} with a number after the '='. The HIGHER the number the more priority it has (i.e. a priority of 2 network will be selected over priority of 1). This only applies if both / multiple networks defined in you file are detected at the same time. e.g.:

network={
    ssid="NewWifi"
    psk="passwordHome"
    id="home"
    priority=2
} 
2
  • There is NO "need to add an id to each network", although you can do so if you wish. – Milliways Mar 24 at 0:26
  • @Milliways - That's the only way I got it to work... – user130616 Mar 24 at 0:54

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.