您好,我在将树莓派连接到 WiFi 适配器时遇到问题。我从互联网上学习了很多教程,但到目前为止还没有成功。
我的 WIFI 适配器可以扫描网络,但它没有连接到任何网络。这是我的配置文件的样子
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
country=GB
update_config=1
network={
ssid="noname"
#psk="zong4gisbest"
psk=ead5b0b7e82e1a68f01e9a17a2a7719ec24575c89bb5b5805e4ae49c80daa983 }
这是我在 Raspbian 上命令的结果
iwconfig
wlan0 unassociated Nickname:"<WIFI@REALTEK>"
Mode:Auto Frequency=2.412 GHz Access Point: Not-Associated
Sensitivity:0/0
Retry:off RTS thr:off Fragment thr:off
Power Management:off
Link Quality:0 Signal level:0 Noise level:0
Rx invalid nwid:0 Rx invalid crypt:0 Rx invalid frag:0
Tx excessive retries:0 Invalid misc:0 Missed beacon:0
eth0 no wireless extensions.
lo no wireless extensions.
lsusb
Bus 001 Device 004: ID 0bda:0179 Realtek Semiconductor Corp. RTL8188ETV
Wireless LAN 802.11n Network Adapter
Bus 001 Device 003: ID 0424:ec00 Standard Microsystems Corp. SMSC9512/9514
Fast Ethernet Adapter
Bus 001 Device 002: ID 0424:9514 Standard Microsystems Corp. SMC9514 Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
您能帮我解决这个问题吗?
谢谢
答案1
编辑您的wpa_supplicant.conf
,更改以下行:
network={
ssid "noname"
psk"zong4gisbest"
到:
network={
ssid="noname"
#psk="zong4gisbest"
psk=ead5b0b7e82e1a68f01e9a17a2a7719ec24575c89bb5b5805e4ae49c80daa983
}
保存然后运行
wpa_supplicant -iwlan0 -D wext -c/etc/wpa_supplicant/wpa_supplicant.conf -B
dhclient wlan0
错误:
nl80211:驱动程序不支持身份验证/关联或连接命令
意味着标准nl80211不支持您的设备,您应该使用旧的驱动程序wext
。
要正确设置您的wpa_supplicant.conf
,最好使用以下wpa_passphrase
命令:
wpa_passphrase YOUR-SSID YOUR-PASSWORD >> /etc/wpa_supplicant/wpa_supplicant.conf
要在重新启动后自动连接到您的 AP,请编辑wlan0
您的接口,/etc/network/interfaces
如下所示:
allow-hotplug wlan0
iface wlan0 inet dhcp
wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf
答案2
简单的:
sudo wget https://github.com/lwfinger/rtl8188eu/raw/c83976d1dfb4793893158461430261562b3a5bf0/rtl8188eufw.bin -O /lib/firmware/rtlwifi/rtl8188eufw.bin
并重新插入,参见
https://github.com/raspberrypi/linux/issues/764#issuecomment-73355704