配置wifi的AP模式


配置wifi的AP模式:

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

另外有hostapd

 

加载wifi驱动时要设置op_mode为AP模式

作者的wifi模块是博通的,modprobe bcmdhd op_mode=2

 

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

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

 


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM