0

So you can set up wifi via the cmd line by editing the /etc/wpa_supplicant/wpa_supplicant.conf file with the following:

network={ ssid="YOUR_NETWORK_NAME" psk="YOUR_NETWORK_PASSWORD" }

and entering the proper parameters.

but my question is, how would I enter 1 or two more, so when I move my pi say to work, or to a friends house that it automatically connects to whatever configured wireless network is available?

Much like how your phone would connect to a previously connected wifi connection?

1

You can enter multiple stanzas to the file like this:

network={
  ssid="Your_SSID"
  psk="WPA_PASSKEY"
  id_str="Home Wifi"
}

network={
  ssid="Work_SSID"
  psk="WPA_PASSKEY"
  id_str="Wifi at work"
}

The id-str field is a unique identifier you create. You can read more about this technique in this forum thread.

It discusses moving this info to the boot section to allow modification with any OS (including windows, which may not have access to the Linux partitions of the SD card), but no matter where you locate this info the technique should work.

  • i'll give this a shot when I get home. – TheXed Oct 25 '16 at 16:32

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.