In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-09-26 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 raspberry pie into a wireless AP, I believe 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!
Hardware configuration
Raspberry pie RaspberryPI 2 Model B
USB Wifi
I bought USB Wifi specific information is IDEMAC SL-1506N wireless usb network card rt5370 chip 11n network card receiver AP, for reference. There are many on Taobao.
Install the necessary programs
Mainly includes hostapd,dnsmasq
Basic configuration
First plug in the USB Wifi
You need to start NAT in the kernel first.
Sudo iptables-t nat-A POSTROUTING-o eth0-j MASQUERADEsudo iptables-A FORWARD-I eth0-o wlan0-m state-- state RELATED,ESTABLISHED-j ACCEPTsudo iptables-A FORWARD-I wlan0-o eth0-j ACCEPT
Save the configuration of iptables
Sudo sh-c "iptables-save > / etc/iptables.ipv4.nat"
Edit configuration file / etc/network/interfaces
If the following exists, comment it out, like this
# auto wlan0#iface wlan0 inet manual#wpa-conf / etc/wpa_supplicant/wpa_supplicant.conf
Add the following at the end of the file
Allow-hotplug wlan0iface wlan0 inet static address 192.168.10.1 netmask 255.255.255.0 up iptables-restore < / etc/iptables.ipv4.nat
Modify / etc/default/ifplugd into
INTERFACES= "eth0" HOTPLUG_INTERFACES= "eth0" ARGS= "- Q-f-U0-D10-w-I" SUSPEND_ACTION= "stop"
Execute sudo ifup wlan0 to make the configuration effective
Modify / etc/sysctl.conf to make sure it contains
Net.ipv4.ip_forward = 1
Perform sudo sysctl-p to reload the configuration
Install and configure hostapdsudo apt-get install hostapd
Create the file / etc/hostapd/hostapd.conf and fill in the content
Interface=wlan0driver=nl80211ssid=MyPIhw_mode=gchannel=6macaddr_acl=0auth_algs=1ignore_broadcast_ssid=0wpa=2wpa_passphrase=12345678wpa_key_mgmt=WPA-PSKwpa_pairwise=TKIPrsn_pairwise=CCMP
Ssid and wpa_passphrase are modifiable. (I've tried the configuration without a password, but I don't have access to the Internet.)
Open the file / etc/default/hostapd and set the
# DAEMON_CONF= ""
Modify to
DAEMON_CONF= "/ etc/hostapd/hostapd.conf"
Run sudo service hostapd start and restart the hostapd service
Install dnsmasqsudo apt-get install dnsmasq
Open the configuration file / etc/dnsmasq.conf and add it directly at the end
No-resolvlisten-address=192.168.10.1interface=wlan0dhcp-range=192.168.10.100192.168.10.200,12hdhcp-option=option:router,192.168.10.1server=114.114.114.114server=8.8.8.8server=8.8.4.4
After saving, restart the dnsmasq service
Sudo service dnsmasq restart above is all the content of the article "how to configure raspberry pie into a wireless AP". 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.
The market share of Chrome browser on the desktop has exceeded 70%, and users are complaining about
The world's first 2nm mobile chip: Samsung Exynos 2600 is ready for mass production.According to a r
A US federal judge has ruled that Google can keep its Chrome browser, but it will be prohibited from
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
About us Contact us Product review car news thenatureplanet
More Form oMedia: AutoTimes. Bestcoffee. SL News. Jarebook. Coffee Hunters. Sundaily. Modezone. NNB. Coffee. Game News. FrontStreet. GGAMEN
© 2024 shulou.com SLNews company. All rights reserved.