In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/01 Report--
Editor to share with you how to configure the wireless network raspberry pie, I believe that most people do not know much about it, so share this article for your reference, I hope you will learn a lot after reading this article, let's learn about it!
Confirm that the network card has been installed successfully
It is recommended to use the USB wireless card with RTL8188CUS chip on the raspberry pie (no additional driver is required). Use the following instructions to see if the installation is successful:
If lsusb# is invalid, check whether the driver loads lsmod#. If not, the first way to load modprobe xxx is through configuration / etc/network/interfaces file.
Sudo nano / etc/network/interfaces
The contents of the modified file are as follows:
Auto loiface lo inet loopbackiface eth0 inet dhcpauto wlan0allow-hotplug wlan0iface wlan0 inet dhcpwpa-ssid "your wifi name" wpa-psk "your wifi password"
The specific meaning of each line configuration is as follows:
Auto lo / / means to use localhostiface eth0 inet dhcp / / to indicate that if there is a network card ech0, use dhcp to obtain the IP address (this network card is the local network card, not the WIFI network card) auto wlan0 / / means if there is a wlan device Use the wlan0 device name allow-hotplug wlan0 / / to indicate that the wlan device can be hot-plugged iface wlan0 inet dhcp / / means that if there is a WLAN network card wlan0 (that is, the WIFI network card), use dhcp to obtain the IP address wpa-ssid "your wifi name" / / to connect to the SSID name wpa-psk "your wifi password" / / to use wpa-psk authentication method to authenticate the password when connecting to the WIFI network
After the above definition, if there is a network cable connection, then take DHCP automatic connection to obtain the address, use the command
Sudo / etc/init.d/networking restartsudo service networking restart # has the same effect as the above line.
After success, you can see the wlan0 device with an IP address (connected) with the ifconfig command.
Sometimes you need to execute sudo ifdown wlan0 and sudo ifup wlan0 to work, and if not, sudo reboot.
If you are a server, it is recommended to set static IP.
If you want to be a server, you'd better boot up and set a static IP address, and add the following part to it:
Iface default inet static # change the above iface wlan0 inet dhcp to this line. Address 192.168.1.2 # static IP address. Netmask 255.255.255.0 # IP mask, part of the address of 0 can be passed. The gateway 192.168.1.1 # gateway is usually the primary address of the router. Dns-nameservers x.x.x.x # your local dns address the second way: modify sudo nano / etc/wpa_supplicant/wpa_supplicant.conf to implement ctrl_interface=/var/run/wpa_supplicantctrl_interface_group=0ap_scan=2network= {ssid= "WIFI name" proto=WPA2 key_mgmt=WPA-PSK pairwise=TKIP group=TKIP psk= "WIFI password"}
Then modify the file sudo nano / etc/network/interfaces, and the modified file content is as follows:
Auto loiface lo inet loopbackiface eth0 inet dhcp.auto wlan0iface wlan0 inet dhcppre-up wpa_supplicant-B-Dwext-iwlan0-c/etc/wpa_supplicant/wpa_supplicant.confpost-down killall-Q wpa_supplicant
After the modification is complete, restart the network using the following command
Sudo / etc/init.d/networking restart
After success, you can see the wlan0 device with an IP address (connected) with the ifconfig command.
Note: we use the DHCP dynamic IP for both of the above methods. If you want to set the static ip method and the method to connect the hidden SSID AP:
(1) set static ip
Modify the file sudo nano / etc/network/interfaces
Auto loiface lo inet loopbackiface eth0 inet dhcpallow-hotplug wlan0iface wlan0 inet manualwpa-roam / etc/wpa_supplicant/wpa_supplicant.confiface default inet staticaddress 192.168.1.2netmask 255.255.255.0gateway 192.168.1.1dns-nameservers x.x.x.x # your local dns address (2) connecting WIFI does not broadcast hidden SSID
Add a line of scan_ssid=1 under ssid= "XXXX" and restart, as shown below:
Sudo nano / etc/wpa_supplicant/wpa_supplicant.confctrl_interface=/var/run/wpa_supplicantctrl_interface_group=0ap_scan=2network= {ssid= "Network id" scan_ssid=1 proto=WPA2 key_mgmt=WPA-PSK pairwise=TKIP group=TKIP psk= "password"}
After rebooting, you can connect to this wireless network that does not broadcast SSID.
The above is all the contents of the article "how to configure the wireless network for raspberry pie". Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.