0: tpacpi_bluetooth_sw: Bluetooth
Soft blocked: no
Hard blocked: no
1: hci0: Bluetooth
Soft blocked: no
Hard blocked: no
2: phy0: Wireless LAN
Soft blocked: yes
Hard blocked: no
解除block: 这里可以看到无线接口是 2: phy0: Wireless LAN ,所以使用这个标号就是 2
rfkill unblock 2
然后再次 rfkill list all 检查就可以看到软件阻断已经关闭
0: tpacpi_bluetooth_sw: Bluetooth
Soft blocked: no
Hard blocked: no
1: hci0: Bluetooth
Soft blocked: no
Hard blocked: no
2: phy0: Wireless LAN
Soft blocked: no
Hard blocked: no
再次执行
./start_wifi
但是提示无法从驱动读取 SSID
Successfully initialized wpa_supplicant
wlp3s0: Could not read SSID from driver
dhcpcd-9.2.0 starting
DUID 00:04:62:91:a1:81:51:17:11:cb:b7:60:eb:9e:7a:2e:cc:7b
wlp3s0: waiting for carrier
timed out
dhcpcd exited
lo no wireless extensions.
enp0s25 no wireless extensions.
wlp3s0 IEEE 802.11 ESSID:off/any
Mode:Managed Access Point: Not-Associated Tx-Power=15 dBm
Retry short limit:7 RTS thr:off Fragment thr:off
Encryption key:off
Power Management:off
virbr0 no wireless extensions.
virbr0-nic no wireless extensions.
anbox0 no wireless extensions
这里可以看到 Access Point: Not-Associated
如果无线接口没有显示,可能需要激活:
sudo ifconfig wlp3s0 up
然后扫描无线网络:
sudo iwlist wlp3s0 scan | grep ESSID
此时可以看到周围可用的无线热点名字列表
使用wpa_supplicant连接无线网络
安装wpa_supplicant
sudo apt install wpasupplicant
wapsupplicant提供了一个 wpa_passphrase 工具可以创建配置:
wpa_passphrase your-ESSID your-passphrase | sudo tee /etc/wpa_supplicant/wpa_supplicant-home.conf