yes! After browsing the Internet, I asked this question myself. But the problem here is that no solution really works for me.
Research sometimes gets out of control and makes me deviate from my actual goal. This puts me in a situation where I try to solve a problem that didn't exist at first.
Therefore, this paper summarizes how to obtain wpa-psk WiFi, establish a network on raspberry PI 2 and run quickly.
Let's connect PI 2!
Step 2: hardware and software settings
The reason why the settings are listed here is that some of my hardware has been used for at least 2 years, so it is best to clearly indicate that this solution has been tested and tested on a limited combination of hardware and software.
So far, I don't have the latest raspberry PI 3 development board (built-in WiFi), so this version of PI is not within the scope of this ible
Similarly, the very old versions of raspberry PI a and B have not been tested and are therefore out of scope.
The following is a list of the hardware and software I currently use:
Raspberry PI 2, model B , with raspbian version of at least 1.5 years
Raspberry PI 2, model B with raspbian Jessie version of at least one year
Construction of raspberry PI 2, model B and the latest version of popular retropie OS
The ubiquitous EDIMAX wireless USB dongle, few of whom have been lying in my parts box for several years
A quick (but outdated) comparison of various raspberry PI boards can be found here.
Step 3: get the research back on track
During the search, solut I discussed on the Internet and said that some WiFi USB dongles are made of "exotic" chipsets. Configuring them to work normally is not a direct task.
If I did have any such chips, that would be right. Exotic USB dongle. However, if my EDIMAX USB adapter has worked properly in the past two years and enabled it to work with newer WiFi networks, I need to study the chipset, then I know my research has deviated from the goal. p》 Therefore, if you have any widely used USB dongle (such as EDIMAX), the solution should work without deep understanding of the details of the chipset and crazy micro level research
Step 4: make changes to the WiFi network
I have made several attempts to make PI use the network upgraded to wpa2-psk [AES] standard with my WiFi.
For some reason, all configurations do not work. After more research, I decided to gradually reduce the WiFi network to support the earlier wpa-psk [TKIP] standard.
By making some quick changes to the WiFi settings of the router, I can set the home WiFi network to comply with the wpa-psk [TKIP] wpa2-psk [AES] standard.
The password (not with the passphrase), which was originally used for the old WEP settings, was nearly 30 characters long, so I decided to keep it for the new WiFi settings as well.
Step 5: use WPA_ Fight with the supplicant utility
Since I am using the raspbian OS version with a history of at least two years, I decided to refer to the WPA at that time_ Supplicant document. It can be found locally on my PI.
/usr/share/doc/wpasupplicant/examples
Based on this document, I am interested in WPA_ The supplicant.conf file has made many settings changes.
Anyway, how do I change the settings, PI just refuses to connect to the Internet.
Although the configuration file exists in the following path, the output error message often reports a lack of WPA_ Supplicant file or directory:
/etc/wpa_ supplicant/wpa_ supplicant.conf
In addition, I can use nano to edit this file and configure my WiFi settings.
After trying all the configurations listed, nothing has changed
The next available option is by completely ignoring WPA_ The supplicant utility to establish a WiFi connection.
Step 6: missing WPA_ Supplicant utility!
The next option is to bypass WPA completely_ The supplicant utility and directly use the network interface configuration located at this path:
/etc/network/interfaces
This will lead us to the discussion of password vs. password:
I want to make this point clear here, because it is an aspect of my complete misunderstanding.
Because my WiFi has been set as an outdated WEP standard for a long time, I mistakenly think that the "password" is the same as the "password" setting!
incorrect!
After more research, it is clear that the passphrase needs to use the current WiFi SSID and password (using a combination) and is known as WPA_ The utility of passphrase is as follows:
$ sudo wpa_ passphrase SSID_ NO_ DOUBLE_ QUOTES PASSWORD_ NO_ DOUBLE_ QUOTES
Note that you should specify the name of the SSID and WiFi password, not in double quotes.
Running the above command produces output similar to the following:
network=
ssid=MY_SSID_INSIDE_DOUBLE_QUOTES
#psk=MY_VERY_LONG_PASSWORD_INSIDE_DOUBLE_QUOTES
psk=9d24321fad5e92de16581d4129g1b8dd2f47c6510953a68e95b1b6d99f5e95ef
And WPA_ Instead of entering the passphrase command, the SSID and the original password are output and enclosed in quotation marks.
However, the original password will be automatically commented out with the symbol
The third line of the output, also known as PSK (short for pre shared key), is a passphrase. Unlike the other two outputs, the passphrase is not enclosed in quotation marks.
The passphrase will be different from the original password, which is what we will use to configure WiFi settings
Step 7: configure WiFi settings
The next step is to use the nano text editor to edit the / etc / network / interfaces configuration file and insert PSK settings.
$ sudo nano /etc/network/interfaces
Comment out or delete WPA_ The supplicant setting is marked with. Add useful comments to record the intent of setting changes:
#LOSE the wpa_ supplicant utility by commenting out these settings
#allow-hotplug wlan0
#iface wlan0 inet manual
#wpa-roam /etc/wpa_ supplicant/wpa_ supplicant.conf
#iface default inet dhcp
Configure WiFi settings using the PSK value generated in the last step:
# BYPASSED wpa_ supplicant - Wifi configuration defined directly this file
# Set the iface setting to use dhcp
allow-hotplug wlan0
iface wlan0 inet dhcp
wpa-ssid MY_ SSID_ NO_ DOUBLE_ QUOTES
wpa-psk 9d24321fad5e92de16581d4129g1b8dd2f47c6510953a68e95b1b6d99f5e95ef
Save and close the / etc / network / interfaces file.
After saving the settings, the configuration file should be similar to the file in the image.
Step 8: restart WiFi on PI
Use ifdown to disconnect the network interface command:
$ sudo ifdown wlan0 Internet Systems Consortium DHCP Client 4.2.2
Copyright 2004-2011 Internet Systems Consortium.
All rights reserved.
Listening on LPF/wlan0/74:da:38:0f:9b:c8
Sending on LPF/wlan0/74:da:38:0f:9b:c8
Sending on Socket/fallback|
DHCPRELEASE on wlan0 to 10.0.0.1 port 67
Restart the network interface using the ifup command:
Internet Systems Consortium DHCP Client 4.2.2
Copyright 2004-2011 Internet Systems Consortium.
All rights reserved.
Listening on LPF/wlan0/74:da:38:0f:9b:c8
Sending on LPF/wlan0/74:da:38:0f:9b:c8
Sending on Socket/fallback
DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 3
DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 4
DHCPREQUEST on wlan0 to 255.255.255.255 port 67
DHCPOFFER from 10.0.0.1
DHCPACK from 10.0.0.1 bound to 10.0.0.15 -- renewal in 38873 seconds.
Although the "operation not allowed" message is displayed in the output, PI can still access your router and connect to the network!
Perform several simple ping operations. One hit the local router, the other hit something like google.com in the public domain.
Press Ctrl C at any time to end the Ping test.
Step 9: next steps
The final confirmation is to open the browser on raspberry PI and surf the Internet.
When working on my raspberry PI B board through the Internet, I can successfully copy this solution to the other two raspberry PI B boards!
Now my PI board has returned to normal operation. The next step is to try to use the solution with wpa2-psk [AES] WiFi network. There are more lenses.
Bao’an District Shenzhen City, China
+86 189 3806 5764