1.nanopi板子插上USB Wifi
2.ifconfig
wlan0 Link encap:Ethernet HWaddr 20:0d:b0:4d:4e:95
inet addr:192.168.8.1 Bcast:192.168.8.255 Mask:255.255.255.0
UP BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:29 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
WiFi名字:wlan0
3.nano /etc/network/interfaces
设置Wifi网卡(wlan0)IP地址
auto lo
iface lo inet loopback
auto wlan0
iface wlan0 inet static
address 192.168.8.1
netmask 255.255.255.0
auto eth0
iface eth0 inet dhcp
4. nano /etc/hostapd/hostapd.conf
设置Wifi网卡(wlan0)hostapd
country_code=CN
interface=wlan0
ssid=79872873
hw_mode=g
channel=7
macaddr_acl=0
auth_algs=1
ignore_broadcast_ssid=0
wpa=2
wpa_passphrase=12345678
wpa_key_mgmt=WPA-PSK
wpa_pairwise=TKIP
rsn_pairwise=CCMP
5. nano /etc/dnsmasq.conf
设置Wifi网卡(wlan0)dhcp
interface=wlan0
dhcp-range=192.168.8.100,192.168.8.249,255.255.255.0,24h