Raspberry pi wifi configuration

Source: Internet
Author: User

Raspberry Pi hands teach you how to install a USB wireless Nic on Raspberry Pi to support WIFI

Although Raspberry Pi already has a wired network card, it does not have a wireless network card configured, And the mobility is not strong enough. Fortunately, the machine is equipped with two USB ports. Of course, it should be split into one for the WIFI wireless network card, this makes it easier for the school to use it!
I have a NetCore branch NW336 wireless network card, which is very cheap. It seems that the chip is Realtek. Try inserting a USB port and find that the indicator on the network card will flash and it feels quite interesting, login to the system immediately:
(1) Check the USB device type to see if the USB wireless Nic has been recognized by the system. Run lsusb
Pi @ raspberrypi ~ $Lsusb
Bus 001 Device 002: ID 0424: 9512 Standard Microsystems Corp.
Bus 001 Device 001: ID 1d6b: 0002 Linux Foundation 2.0 root hub
Bus 001 Device 003: ID 0424: ec00 Standard Microsystems Corp.
Bus 001 Device 004: ID 0133: 8176 Realtek semiconducorp. RTL8188CUS 802.11n WLAN Adapter ==========
Congratulations, my USB wireless network card has been properly recognized!

(2) check whether the kernel module supports your wireless Nic. Run lsmod
Pi @ raspberrypi ~ $Lsmod
Module Size Used
Snd_bcm2835 15846 0
Snd_pcm 77560 1 snd_bcm2835
Snd_seq 53329 0
Snd_timer 19998 2 snd_pcm, snd_seq
Snd_seq_device 6438 1 snd_seq
Snd 58447 5 snd_bcm2835, snd_timer, snd_pcm, snd_seq, snd_seq_device
Snd_page_alloc 5145 1 snd_pcm
Leds_gpo 2235 0
Led_class 3562 1 leds_gpio
8192cu 489381 0 "========
Congratulations, the kernel module corresponding to my wireless network card has been automatically loaded.

(3) view wireless device configurations and run iwconfig

Pi @ raspberrypi ~ $Iwconfig
Wlan0 unassociated Nickname: "<WIFI @ REALTEK>"
Mode: Managed Frequency = 2.412 GHz Access Point: Not-Associated
Sensiti.pdf: 0/0
Retry: off RTS thr: off Fragment thr: off
Power Management: off
Link Quality: 0 Signal level: 0 Noise level: 0
Rx invalid nwid: 0 Rx invalid crypt: 0 Rx invalid frag: 0
Tx excessive retries: 0 Invalid misc: 0 Missed beacon: 0

Lo no wireless extensions.

Eth0 no wireless extensions.

(4) configure network interface settings
Use the vi or nano command to edit the content of the/etc/network/interfaces file. Make sure that the content of the file is displayed as follows.

Auto lo
Iface lo inet loopback

Iface eth0 inet dhcp

Auto wlan0
Allow-hotplug wlan0
Iface wlan0 inet manual
Wpa-roam/etc/wpa_supplicant/wpa_supplicant.conf
Iface default inet dhcp

If you do not want to set it as a Dhcp Dynamic IP address or static IP address, the file content is as follows:
Auto lo
Iface lo inet loopback

Iface eth0 inet dhcp

Allow-hotplug wlan0
Iface wlan0 inet manual
Address 192.168.1.100
Netmask 255.255.255.0
Gateway 192.168.1.1
Wpa-roam/etc/wpa_supplicant/wpa_supplicant.conf

(5) configure the wireless network card setting file
Edit the/etc/wpa_supplicant/wpa_supplicant.conf file to make sure the content is as follows:
Note that you must modify the name of the Access Point and the Wi-Fi access password.

Network = {
Ssid = "WIFI Access Point name"
Proto = RSN
Key_mgmt = WPA-PSK
Pairwise = CCMP TKIP
Group = CCMP TKIP
Psk = "WIFI access password"
}

(6) After all configurations are completed, restart Raspberry Pi and you will be able to use WIFI normally.
Sudo reboot
After Raspberry Pi is restarted, if you are using dhcp, you can log on to your vro to view the IP address allocated by WIFI or the static IP address you set. Now you can use the wireless network.

Related Article

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.