目录

我的树莓派配置

目录
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
sudo apt-get install util-linux procps hostapd iproute2 iw haveged dnsmasq
git clone https://github.com/oblique/create_ap.git
cd create_ap
sudo make install

#sudo create_ap wlan0 eth0 热点名 密码
sudo create_ap wlan0 eth0 a0 12345678..

sudo create_ap --dhcp-hosts ./dhcp_hosts.conf wlan0 eth0 a0 12345678..

sudo create_ap -w 2 -g 192.168.222.1 --dhcp-hosts ./dhcp_hosts.conf --daemon wlan0 eth0 a0 12345678..



把上述的启动命令添加到/etc/rc.local

dhcp-range=192.168.222.200,192.168.222.260
dhcp-host:98:01:a7:b3:24:95,192.168.222.222

create_ap --dhcp-hosts ./dhcp_hosts.conf -g 192.168.1.1 MyAccessPoint 12345678
sudo create_ap --dhcp-hosts ./dhcp_hosts.conf -g 192.168.1.1 wlan0 eth0 a0 12345678..


sudo create_ap --dhcp-hosts ./dhcp_hosts.conf -g 192.168.222.1 wlan0 eth0 a0 12345678..

sudo create_ap --dhcp-hosts /home/pi/Services/create_ap/dhcp_hosts.conf -g 192.168.222.1 wlan0 eth0 a0 12345678..

sh /home/pi/Services/create_ap/start_ap.sh


listen-address=192.168.222.1
bind-dynamic
dhcp-range=192.168.222.1,192.168.222.254,255.255.255.0,24h
dhcp-option-force=option:router,192.168.222.1
dhcp-option-force=option:dns-server,192.168.222.1
dhcp-option-force=option:mtu,1500
no-hosts ~
1
CHANNEL=default GATEWAY=192.168.222.1 WPA_VERSION=1+2 ETC_HOSTS=0 DHCP_DNS=gateway NO_DNS=0 HIDDEN=0 ISOLATE_CLIENTS=0 SHARE_METHOD=nat IEEE80211N=0 IEEE80211AC=0 HT_CAPAB=[HT40+] VHT_CAPAB= DRIVER=nl80211 NO_VIRT=0 COUNTRY= FREQ_BAND=2.4 NEW_MACADDR= DAEMONIZE=0 NO_HAVEGED=0 WIFI_IFACE=wlan0 INTERNET_IFACE=eth0 SSID=a0 PASSPHRASE=12345678. USE_PSK=0
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26

CHANNEL=default
GATEWAY=192.168.222.1
WPA_VERSION=1+2
ETC_HOSTS=0
DHCP_DNS=gateway
NO_DNS=0
HIDDEN=0
ISOLATE_CLIENTS=0
SHARE_METHOD=nat
IEEE80211N=0
IEEE80211AC=0
HT_CAPAB=[HT40+]
VHT_CAPAB=
DRIVER=nl80211
NO_VIRT=0
COUNTRY=
FREQ_BAND=2.4
NEW_MACADDR=
DAEMONIZE=0
NO_HAVEGED=0
WIFI_IFACE=wlan0
INTERNET_IFACE=eth0
SSID=a0
PASSPHRASE=12345678.
USE_PSK=0