1

I tried using wpa-supplicants to be able to connect to multiple WiFi's (not simultaneously).

This only works with manual it seems and not with DHCP. Writing the SSID and the password directly in /etc/network/interfaces works for one network.

From the interfaces file it seems only one network can be specified. Any ideas?

EDIT: By 2 networks I mean my wireless home network and e.g. the network at university. I want my pi to have a (un)ordered list of networks and I want to connect to one available. It is enough, when this happens on startup, but it would be nice if it tries to reconnect, when the connection is lost..

  • If you are referring to moving between wireless networks and connecting to whichever is active at the time, take a look at this question. – bobstro Sep 03 '15 at 14:13
  • I use wicd-curses - It saved allot of time messing around with that supplicant file. The answer here shows you how to use if for reconnecting, but you can use it to "remember" many hot spots, and it will autoconnect to the strongest one. http://raspberrypi.stackexchange.com/a/9750/894 – Piotr Kula Sep 03 '15 at 15:05
  • @bobstro : This is what I need with one important change: This method only works with an static IP. I need it to work with dhcp – Florian Reisinger Sep 03 '15 at 15:12
  • @ppumkin : I do not have a screen or any other access to the pi of it ideas not connected to a WiFi. As far as I got it it is impossible to use the tool via ssh and the same WiFi (tried) or to connect to an network not in reach... Thanks for all your answers :) – Florian Reisinger Sep 03 '15 at 15:15
  • Have you tried simply using something like iface home inet dhcp? – bobstro Sep 03 '15 at 17:54
  • @ppumkin one problem with these answers is that THEY ARE NOT APPLICABLE to anyone using the new distributions using dhcpcd. The only methods which work reliably are https://www.raspberrypi.org/documentation/configuration/wireless/README.md If you know what you are doing you can restore old behaviour, but this requires detailed knowledge and is not suitable for new users. Sadly the Foundation is going the same was as Microsoft & Apple and making things "simpler". – Milliways Sep 04 '15 at 00:17
  • As far as I understood the syntax the element right after "iface" had to be the hardware path (wlan0 in my case) – Florian Reisinger Sep 04 '15 at 05:17
  • @bobstro : Notifying you as I forgot in yesterday's comment of mine... – Florian Reisinger Sep 05 '15 at 06:58
  • pay attention to id_str in the 1st answer to the question I linked to. That's the key to what you need to enter in your /etc/network/interfaces. – bobstro Sep 05 '15 at 17:36

0 Answers0