1

recently I got my WiFi connection running for my home network. Next step was to improve my script and make it possible to access multiple WiFi networks without always changing my /etc/network/interfaces. Also I want all to have a static IP for each of these networks. Therefore I changed my code quiet a bit.

As a role model served the best rated answer of an older post (wifi setup for multiple networks). It seemed to be quiet sweet, due to I'm just starting using the Raspberry and in consequence of my researches, I was able to understand there everything.

So I did the following:

/etc/wpa_supplicant/wpa_supplicant.conf:

ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
update_config=1
network={
   ssid="SCHOOLS NETWORK NAME"
   psk="SCHOOLS PASSWORD"
   id_str="school"
}

network={
   ssid="HOME NETWORK NAME"
   psk="HOME PASSWORD"
   id_str="home"
}

/etc/network/interfaces:

   auto lo

   iface lo inet loopback
   iface eth0 inet dhcp


   allow-hotplug wlan0
   iface wlan0 inet manual
   wpa-roam /etc/wpa_supplicant/wpa_supplicant.conf


   iface school inet static
   address static.school.address
   gateway school.gateway.address
   netmask school.netmask.address

   iface home inet static
   address static.home.address
   gateway home.gateway.address
   netmask home.netmask.address

I searched a lot of posts and googled and tried now for a couple of hours (if not even days) but didn't find a solution. My first guess was that the whitespaces in my SSID cause problems, but therefore I use " " (also tried using ' '). Same with my password, where a # appears, but I hope I solved that problem by simply having the PW/SSID in quotation marks. I didn't really find a solution for my problem, but I'm sure some of you can help me. Thanks in advance

0

1 Answer 1

1

Those SSIDs appear to be placeholder names used as an example in the original article you linked to. You need to put in the actual SSIDs and passwords you're working with.

Likewise, unless static.home.address is a valid DNS name on your network, you need to put in an IP address.

1
  • I know and did it exactly like that... But still it didn't work... In my eyes everything is correct, but it simply doesn't do what it should...
    – user28969
    Commented Apr 15, 2015 at 12:37

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.