开热点 忘掉自己手动配置吧
create_ap
git clone git@github.com:oblique/create_ap.git
cd create_ap
sudo make install
ifconfig
docker0: flags=4099<UP,BROADCAST,MULTICAST> mtu 1500
inet 172.17.0.1 netmask 255.255.0.0 broadcast 172.17.255.255
ether 02:42:f0:71:8e:08 txqueuelen 0 (Ethernet)
RX packets 0 bytes 0 (0.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 0 bytes 0 (0.0 B)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
enxb827eb07b15a: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 192.168.2.109 netmask 255.255.255.0 broadcast 192.168.2.255
inet6 fe80::6964:9416:8de7:2826 prefixlen 64 scopeid 0x20<link>
ether b8:27:eb:07:b1:5a txqueuelen 1000 (Ethernet)
RX packets 328524 bytes 478811996 (456.6 MiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 163059 bytes 12426695 (11.8 MiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
lo: flags=73<UP,LOOPBACK,RUNNING> mtu 65536
inet 127.0.0.1 netmask 255.0.0.0
inet6 ::1 prefixlen 128 scopeid 0x10<host>
loop txqueuelen 1000 (Local Loopback)
RX packets 592 bytes 66641 (65.0 KiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 592 bytes 66641 (65.0 KiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
sudo create_ap wlan0 enxb827eb07b15a pi 12345678 --no-virt
WARN: brmfmac driver doesn't work properly with virtual interfaces and
it can cause kernel panic. For this reason we disallow virtual
interfaces for your adapter.
For more info: https://github.com/oblique/create_ap/issues/203
Config dir: /tmp/create_ap.wlan0.conf.pCYxzIAx
PID: 1386
Sharing Internet using method: nat
hostapd command-line interface: hostapd_cli -p /tmp/create_ap.wlan0.conf.pCYxzIAx/hostapd_ctrl
Configuration file: /tmp/create_ap.wlan0.conf.pCYxzIAx/hostapd.conf
Failed to create interface mon.wlan0: -95 (Operation not supported)
wlan0: Could not connect to kernel driver
Using interface wlan0 with hwaddr b8:27:eb:52:e4:** and ssid "pi"
wlan0: interface state UNINITIALIZED->ENABLED
wlan0: AP-ENABLED
wlan0: STA 00:be:3b:ab:a6:** IEEE 802.11: associated
wlan0: AP-STA-CONNECTED 00:be:3b:ab:a6:**
wlan0: STA 00:be:3b:ab:a6:** RADIUS: starting accounting session 5BC05FA2-00000000
wlan0: STA 00:be:3b:ab:a6:** WPA: pairwise key handshake completed (WPA)
wlan0: STA 00:be:3b:ab:a6:** WPA: group key handshake completed (WPA)
wlan0: STA 80:56:f2:80:24:** IEEE 802.11: associated
wlan0: AP-STA-CONNECTED 80:56:f2:80:24:**
wlan0: STA 80:56:f2:80:24:** RADIUS: starting accounting session 5BC05FA2-00000001
wlan0: STA 80:56:f2:80:24:** WPA: pairwise key handshake completed (WPA)
wlan0: STA 80:56:f2:80:24:** WPA: group key handshake completed (WPA)
wlan0: STA 80:56:f2:80:24:** WPA: group key handshake completed (WPA)
wlan0: STA 00:be:3b:ab:a6:** WPA: group key handshake completed (WPA)