The question is published on by Tutorial Guruji team.
Hy there, I am having problem in connecting my raspberry pi to a wifi dongle. I have followed a lot of tutorials from internet but no success so far.
My WIFI dongle can scan the networks but it’s not connecting to any network.Here is what my configuration file looks like
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev country=GB update_config=1 network={ ssid="noname" #psk="zong4gisbest" psk=ead5b0b7e82e1a68f01e9a17a2a7719ec24575c89bb5b5805e4ae49c80daa983 }
Here are the results of my commands on 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
Can you please help me resolving the issue?
thanks
Answer
Edit your wpa_supplicant.conf
, change the following lines:
network={ ssid "noname" psk"zong4gisbest"
to:
network={ ssid="noname" #psk="zong4gisbest" psk=ead5b0b7e82e1a68f01e9a17a2a7719ec24575c89bb5b5805e4ae49c80daa983 }
save then run
wpa_supplicant -iwlan0 -D wext -c/etc/wpa_supplicant/wpa_supplicant.conf -B dhclient wlan0
The error:
nl80211: Driver does not support authentication/association or connect commands
mean that the standard nl80211 doesn’t support your device , you should use the old driver wext
.
To correctly set up your wpa_supplicant.conf
, it is better to use the wpa_passphrase
command:
wpa_passphrase YOUR-SSID YOUR-PASSWORD >> /etc/wpa_supplicant/wpa_supplicant.conf
To automatically connect to your AP after restart edit the wlan0
interface on your /etc/network/interfaces
as follow:
allow-hotplug wlan0 iface wlan0 inet dhcp wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf