banner



Configuring Multiple Wifi in Raspberry Pi With Login Updated FREE

Configuring Multiple Wifi in Raspberry Pi With Login

How To: Raspberry Pi Multiple WiFi Networks

Captured: 2017-11-19 at 15:38 from world wide web.raspberrycoulis.co.uk

Raspberry Pi Multiple Wifi Networks

Getting WiFi working on Raspberry Pi must be ane of the nigh searched topics since the popular board was released. Thankfully, this is now a pretty uncomplicated process even for beginners! However, as the Raspberry Pi is portable, many people like to take it with them wherever they get. This presents a new claiming, which is providing Internet admission without access to a monitor or an Ethernet cable. Like other Internet connected devices, people want to ready upwardly Raspberry Pi multiple WiFi networks.

Firstly, did you know that there is a quick way to prepare WiFi on your Raspberry Pi before the first kicking?

Setup Raspberry Pi WiFi Earlier Kick

Until recently, you had to kick your Pi with an Ethernet cablevision connected and so make all the necessary edits to arrangement files to setup WiFi. Yet, at that place is now a way to setup WiFi before you power on your Pi for the very first time. In gild to practise this, you need to create a file called "wpa_supplicant.conf" and then transfer it to the boot folder on your SD menu. You can do this in any basic text editing software, simply Notepad++ is recommended.

Notepad++ is a free text editor and is a suped-up version of the standard Windows Notepad. However, information technology is cracking for creating or editing lawmaking because it helps with formatting - such as indentation, brackets and so on. Y'all tin can download Notepad++ from their website.

WPA Supplicant

First, open Notepad++ and add the following code to information technology:

1234567 ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdevupdate_config=1network={ssid="YOUR_WIFI_NETWORK"psk="YOUR_WIFI_PASSWORD"key_mgmt=WPA-PSK}

You need to add your own details to this document, and they are pretty self-explanatory:

  1. SSID = Your WiFi network proper name
  2. PSK = Your WiFi password

Encryption

The last section, "key_mgmt", is set depending on the encryption method your WiFi network uses. If yous are using a relatively modern WiFi router, then the chances are it will exist WPA-PSK. For the curious, this stands for WiFi Protected Access Pre-Shared Key. Older routers (as in 10+ years) may use WEP, or Wired Equivalent Privacy, but this is no longer recommended as a relatively inexperienced hacker could cleft this in a few minutes if they wanted to!

In one case yous have added your WiFI network name and password, relieve your file every bit "wpa_supplicant.conf" (without the quotation " " marks and ensuring it is lower-case). This is what you tin can now transfer to the boot folder on your SD card. At present when y'all boot your Pi, it should automatically connect to your WiFi network!

What actually happens is that your Pi copies the "wpa_supplicant.conf" file to the proper location on the Pi itself. This is typically "/etc/wpa_supplicant", and if you want to make any additional changes, you lot can find the "wpa_supplicant.conf" file here.

Make sure you set

Make sure you set "key_mgmt" depending on the encryption method used by your WiFi router!

Hang on though!

You have come here because you lot want to institute **Raspberry Pi multiple WiFi networks! **To practice this, you follow the aforementioned steps as above, except you need to add a few more networks to your "wpa_supplicant.conf" file. There is besides an boosted step required, especially if you want to prioritise the networks so that your Pi prefers to connect to a specific network over another.

Raspberry Pi Multiple WiFi Networks

To do this, you will plain demand to know the details of all the WiFi networks you desire your Raspberry Pi to connect to. This may well be your abode network, your school or piece of work network and mayhap a phone-tethered network (i.due east. for when yous desire to get your Pi online exterior the reach of other WiFi networks). Once you have the SSID and passwords for your WiFi networks, you need to add them to your "wpa_supplicant.conf" file:

1234567891011121314151617181920212223 ctrl_interface=DIR=/var/run/wpa_supplicant Grouping=netdevupdate_config=1network={ssid="HOME_WIFI_NETWORK"psk="HOME_WIFI_NETWORK_PASSWORD"key_mgmt=WPA-PSKid_str="habitation"priority=1}network={ssid="WORK_WIFI_NETWORK"psk="WORK_WIFI_NETWORK_PASSWORD"key_mgmt=WPA-PSKid_str="work"priority=2}network={ssid="PHONE_TETHER_NETWORK"psk="PHONE_TETHER_NETWORK_PASSWORD"key_mgmt=WPA-PSKid_str="phone"priority=iii}

If you look carefully at the new details above, you may discover a few things. Firstly, we accept created three networks - one for home, 1 for work and one for tethering to your phone's WiFi hotspot. In society to aid your Raspberry Pi empathise which network is which, we have too added the "id_str" string, which y'all will observe has been assigned a name - either "home", "work" or "phone". This is a crucial step for Raspberry Pi multiple WiFi networks, as you will demand them for the side by side part, then call back them.

Setting priorities

You may also notice a "priority" string, forth with a number. This is pretty self-explanatory - this tells your Raspberry Pi to attempt and connect to your networks in a specific gild. Commencement of all, the numbers associated are not equally logical as yous would expect! This is because the college the number, the higher the preference. In the instance to a higher place, our Raspberry Pi will attempt to connect to the networks in the following order:

  1. Telephone (priority of 3)
  2. Piece of work (priority of ii)
  3. Home (priority of one)

As a result, our case places the "phone" network at the tiptop considering we may want to connect to our Raspberry Pi in the office, merely want to avert connecting to the "work" network if the "phone" network is present. You might desire to experiment with the priorities yourself, and y'all can do this past simply changing the numbers associated with the "priority" string.

Virtually there…

In that location is i more adjustment required to get Raspberry Pi Multiple WiFi Networks, and that is to add a couple of lines to the "/etc/network/interfaces" file, because this tells your Raspberry Pi how to connect to any networks present:

1234567891011121314151617181920212223

interfaces(v) file used by ifup(8) and ifdown(viii)# Please notation that this file is written to be used with dhcpcd# For static IP, consult /etc/dhcpcd.conf and 'human being dhcpcd.conf'# Include files from /etc/network/interfaces.d:source-directory /etc/network/interfaces.dauto loiface lo inet loopbackiface eth0 inet manualallow-hotplug wlan0iface wlan0 inet manualwpa-conf /etc/wpa_supplicant/wpa_supplicant.confallow-hotplug wlan1iface wlan1 inet manualwpa-conf /etc/wpa_supplicant/wpa_supplicant.confiface home inet dhcpiface work inet dhcpiface phone inet dhcp

The key lines here are the bottom iii:

  1. iface habitation inet dhcp
  2. iface work inet dhcp
  3. iface phone inet dhcp

Recollect the "id_str" names we added earlier? If not, and then information technology might be worth going back and getting them as this is where nosotros add them to our interfaces file. You now only need to add your "id_str" here, forth with the prefix "iface" and the suffix "inet dhcp", specially if your IP addresses are set by DHCP.

Last step!

One time you have added your network strings to the interfaces file, merely save it (do this by pressing Ctrl+X if using Nano) and so reboot your Raspberry Pi! If all goes well, you should have setup Raspberry Pi Multiple WiFi Networks, along with prioritised connections!

Configuring Multiple Wifi in Raspberry Pi With Login

DOWNLOAD HERE

Source: https://github.com/tdamdouni/Raspberry-Pi-DIY-Projects/blob/master/_WebArticles/how-to-raspberry-pi-multiple-wifi-networks.md

Posted by: hoehnehilowentoce.blogspot.com

0 Response to "Configuring Multiple Wifi in Raspberry Pi With Login Updated FREE"

Post a Comment

Iklan Atas Artikel

Iklan Tengah Artikel 1

Iklan Tengah Artikel 2

Iklan Bawah Artikel