Raspberry Pi uses a USB wireless adapter

Source: Internet
Author: User
The wireless adapter must be supported by Raspberry Pi. You can go to the official or http://shumeipai.net to view the hardware list

Either of the two solutions can not be changed

# Solution 1

# Configure network interfaces

Sudo nano/etc/Network/interfaces

The default file content is as follows:

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 default Inet DHCP

Modify as follows:
DHCP Configuration:

Auto Lo

Iface lo Inet loopback
Iface eth0 Inet DHCP

Allow-hotplug wlan0
Auto wlan0
Iface wlan0 Inet DHCP
WPA-roam/etc/wpa_supplicant/wpa_supplicant.conf

Static Configuration:

Auto Lo

Iface lo Inet loopback
Iface eth0 Inet DHCP

Allow-hotplug wlan0
Iface wlan0 Inet Manual
Address 192.168.0.100
Netmask 255.255.255.0
Gateway 192.168.0.1
WPA-roam/etc/wpa_supplicant/wpa_supplicant.conf

# Set WPA Authentication

Sudo nano/etc/wpa_supplicant/wpa_supplicant.conf

Modify as follows:

Network = {
SSID = "SSID name"
PROTO = RSN
Key_mgmt = WPA-PSK
Pairwise = CCMP TKIP
Group = CCMP TKIP
PSK = "password"
}

# Restart. wlan0 is automatically enabled.

# Solution 2

# WPA authentication File

Sudo nano/etc/wpa_supplicant/wpa_supplicant.conf

The modified content is as follows:

Ctrl_interface = dir =/var/run/wpa_supplicant group = netdev
Update_config = 1

Network = {
SSID = "SSID name"
PROTO = RSN
Scan_ssid = 1
Key_mgmt = WPA-PSK
Pairwise = CCMP
Auth_alg = open
PSK = "password"
}

# Modify the interfaces Configuration

Sudo nano/etc/Network/interfaces

DHCP Configuration:

Auto Lo

Iface lo Inet loopback
Iface eth0 Inet DHCP

Allow-hotplug wlan0
Auto wlan0
Iface wlan0 Inet Manual
WPA-roam/etc/wpa_supplicant/wpa_supplicant.conf
Iface default Inet DHCP

Static Configuration:

Auto Lo

Iface lo Inet loopback
Iface eth0 Inet DHCP

Allow-hotplug wlan0
Iface wlan0 Inet Manual
Address 192.168.0.100
Netmask 255.255.255.0
Gateway 192.168.0.1
WPA-roam/etc/wpa_supplicant/wpa_supplicant.conf
Iface default Inet DHCP

# Restart

By default, it will be automatically connected. You can run 'sudo iwconfig' to view the configuration or 'sudo ifconfig' to view the status.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.