0

I know how to set up multiple wifi networks, as in this question. However, I have additional needs not addressed there:

First: How do I know which network made the connection (for instance, in the example, I would like to know if the network is school or work)?

Second: How can I set up the Raspberry Pi as an access point if no network connection is made (I assume this will need some kind of script, but I don't know how to write it)?

Third: How can I check every few minutes if the connection is still active, and automatically reset the connection if it is not (perhaps this is a use case for watchdog, but I've never used that)?

  • You linked to a very old post. Are we supposed to guess which parts of it you followed. If you want help post YOUR OWN configuration. You have asked 3 separate questions, which would attract quite different answers. – Milliways Nov 2 '16 at 22:46
  • I used this answer. My configuration has 5 different networks, each with appropriate entries in /etc/network/interfaces and /etc/wpa_supplicant/wpa_supplicant.conf. I have successfully connected to two of those networks, but haven't yet been able to try connecting to the other three. Yes, I asked three different questions, but they are all related, and someone interested in one of them might very likely be interested in the others, so I asked them all here in one place. – user448810 Nov 3 '16 at 0:31
0

You can use the nano tool by executing: sudo nano /etc/wpa_supplicant/wpa_supplicant.conf

All you need to do is add your networks with the following format with id_str= and a familiar name.

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

network={
    ssid="Network1"
    psk="password1"
    id_str="kitchen"
}

network={
    ssid="Network2"
    psk="password2"
    id_str="garage"
}

I also found you a question that has been answered like this: How to setup multiple WiFi networks?.

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.