当前位置 : 主页 > 手机开发 > 无线 >

配置wifi的AP模式

来源:互联网 收集:自由互联 发布时间:2021-06-10
配置wifi的AP模式: 需要busybox里面有ifconfig,udhcpd,tcpsvd,ftpd 另外有hostapd ifconfig wlan0 up hostapd -B /etc/hostapd.conf udhcpd /etc/udhcpd.conf tcpsvd 0 21 ftpd -w /data udhcpd.conf: 1 # The start and end of the I

配置wifi的AP模式:

需要busybox里面有ifconfig,udhcpd,tcpsvd,ftpd

另外有hostapd

 

ifconfig wlan0 up
hostapd -B /etc/hostapd.conf
udhcpd /etc/udhcpd.conf
tcpsvd 0 21 ftpd -w /data &

 

udhcpd.conf:

分享图片
1 # The start and end of the IP lease block
2 start         192.168.1.2
3 end            192.168.1.255
4 
5 # The interface that udhcpd will use
6 interface    wlan0
View Code

hostapd.conf:

分享图片
 1 ssid=alvin
 2 ctrl_interface=/var/run/hostapd
 3 hw_mode=g
 4 channel=1
 5 interface=wlan0
 6 driver=nl80211
 7 ignore_broadcast_ssid=0
 8 wpa=2
 9 wpa_passphrase=12345678
10 wpa_key_mgmt=WPA-PSK
11 rsn_pairwise=CCMP
View Code
网友评论