can't connect to Wifi using TP-LINK TL-WN823N
-
@blaadr Ok, so what you can do next is to force the configuration in the wpa_supplicant.conf file located in /etc/wpa_supplicant/wpa_supplicant.conf
Open the file delete the content and replace it with the following (replace the indications ssid and pass with your own ones) :
ctrl_interface=/var/run/wpa_supplicant GROUP=root
ap_scan=1
network={
ssid="your_ssid"
proto=WPA RSN
key_mgmt=WPA-PSK
group=CCMP TKIP
psk="your_password"
}Save and reboot. Should work fine with that. Keep me posted !
-
@gkralicek2
Thank for your help, I tried to do that but when I try writing my file with nano, I get the error message :"Error writing wpa_supplicant.conf: Read-only file system".
I tried to chmod the file but I can't, for the same reason.
How can I overpass this ? -
@blaadr type the following :
mount -o remount,rw /boot
while in ssh in order to remount the root partition in read/write mode. Then you should have no problem saving the wpa_supplicant.conf file :=) -
@gkralicek2 I finally wrote successfully the wpa_supplicant.conf file but still not working after reboot.
So I tried launching command to debug :wpa_supplicant -c/etc/wpa_supplicant/wpa_supplicant.conf -iwlan0 -d
Here is the output :
wpa_supplicant v2.5 random: Trying to read entropy from /dev/random Successfully initialized wpa_supplicant Initializing interface 'wlan0' conf '/etc/wpa_supplicant/wpa_supplicant.conf' driver 'default' ctrl_interface 'N/A' bridge 'N/A' Configuration file '/etc/wpa_supplicant/wpa_supplicant.conf' -> '/etc/wpa_supplicant/wpa_supplicant.conf' Reading configuration file '/etc/wpa_supplicant/wpa_supplicant.conf' ctrl_interface='DIR=/var/run/wpa_supplicant GROUP=root' ap_scan=1 Priority group 0 id=0 ssid='NUMERICABLE-B023' Could not read interface wlan0 flags: No such device nl80211: Driver does not support authentication/association or connect commands nl80211: deinit ifname=wlan0 disabled_11b_rates=0 nl80211: Remove monitor interface: refcount=0 netlink: Operstate: ifindex=0 linkmode=0 (kernel-control), operstate=6 (IF_OPER_UP) Could not read interface wlan0 flags: No such device nl80211: Set mode ifindex 0 iftype 2 (STATION) nl80211: Failed to set interface 0 to mode 2: -19 (No such device) wlan0: Failed to initialize driver interface Failed to add interface wlan0 wlan0: Cancelling scan request wlan0: Cancelling authentication timeout
-
@blaadr Have you tried unplugging your dongle and plugging it back on a different usb port to refresh the driver ?
And is your AP SSID visible or hidden ? -
@gkralicek2 I tried to unplugged the dongle and plug it into all the other port without sucess
Besides,the AP SSID is visible.
Just to be sure that it don't come from the dongle itself, I plugged it on my Windows 10 PC and it works fine. But there is a LED on the dongle that flash when connected to the PC that do not flash when connected to the RPI...
-
@blaadr The dongle LED should light up when plugged showing the +5v from the USB is indeed received. What type of power supply do you use ? 2A ? 3A ?
Don't you have a tiny multicoloured square icon displayed from time to time at the top right corner of your screen when the dongle is plugged ? -
@gkralicek2
I use a 3A power supply, and I never had problems using other USB devices.
I just played for 15 minutes and never noticed any icon on the screen.Just to be sure it doesn't come from the power supply, I tried another one, without success.
I noticed that the LED of the dongle flash for 1/10 second when I plug it.
-
@blaadr Oh ok, then if it flashes even very briefly when plugged power is received ok but the fact you don't have the constant blinking afterwards means the driver doesn't initialize itself properly at bootup. What do you get when doing an ifconfig ? Do you see wlan0 listed ? And could you please make a capture of your /etc/network/interfaces file ?
-
@gkralicek2 Ok so i do not have a wlan0 interface listed here is the outputof the ifconfig :
eth0 Link encap:Ethernet HWaddr B8:27:EB:87:12:3A inet addr:192.168.0.27 Bcast:192.168.0.255 Mask:255.255.255.0 inet6 addr: fe80::ba27:ebff:fe87:123a%1994612484/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:104 errors:0 dropped:0 overruns:0 frame:0 TX packets:135 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:9948 (9.7 KiB) TX bytes:19315 (18.8 KiB) lo Link encap:Local Loopback inet addr:127.0.0.1 Mask:255.0.0.0 inet6 addr: ::1%1994612484/128 Scope:Host UP LOOPBACK RUNNING MTU:65536 Metric:1 RX packets:0 errors:0 dropped:0 overruns:0 frame:0 TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
And this is the content of the /etc/network/interfaces file :
# Configure Loopback auto lo iface lo inet loopback auto eth0 iface eth0 inet dhcp auto wlan0 iface wlan0 inet dhcp wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf
-
@blaadr ok so it seems obvious that the dongle driver is not loaded. What do you get if you type :
ifup wlan0 -
@gkralicek2 Then I get this output :
ip: SIOCGIFFLAGS: No such device
-
@blaadr ok, no wifi driver is loaded in the system and your card wlan0 is not created. So now we'll have to find what prevent the driver to be loaded in the system. I'll need a capture of your recalbox.log file.
Go to recalbox/share/system/logs and delete the file recalbox.log which is there. Then reboot your system having your dongle inserted in USB port, go back to the log folder, open the file and cut and paste the content here -
@gkralicek2 Here it is :
[ 5271.69] : Stopping S94manager [ 2.79] : starting new log [ 2.82] : converting dos to unix carriage return characters [ 3.52] : setting audio to auto [ 3.60] : setting audio volume to 90 ---- recalbox-config.sh ---- [ 3.65] : setting hostname to RECALBOX ---- recalbox-config.sh ---- [ 3.71] : setting audio output mode : auto [ 3.73] : setting audio volume : 90 numid=3,iface=MIXER,name='PCM Playback Route' ; type=INTEGER,access=rw------,values=1,min=0,max=2,step=0 : values=0 Simple mixer control 'PCM',0 Capabilities: pvolume pvolume-joined pswitch pswitch-joined Playback channels: Mono Limits: Playback -10239 - 400 Mono: Playback -663 [90%] [-6.63dB] [on] [ 3.84] : creating network entry in /var/lib/wpa_supplicant.conf [ 3.89] : setting keyboard layout to fr [ 3.89] : updated wifi settings : ssid=NUMERICABLE-B023 key=BNKFPLJB1K Loading /usr/share/keymaps/i386/azerty/fr.map.gz [ 4.55] : starting emulationstation with lang = fr_FR [ 4.58] : Starting emulationstation with command : [ 4.60] : HOME=/recalbox/share/system LANG="fr_FR.UTF-8" SDL_VIDEO_GL_DRIVER=/usr/lib/libGLESv2.so SDL_NOMOUSE=1 /usr/bin/emulationstation; [ -f /tmp/shutdown.please ] && (rm /tmp/shutdown.please; shutdown -h now);[ -f /tmp/reboot.please ] && (rm /tmp/reboot.please; shutdown -r now) ---- recalbox-config.sh ---- udhcpc (v1.24.1) started Sending discover... Sending discover... Sending select for 192.168.0.27... Lease of 192.168.0.27 obtained, lease time 86400 deleting routers adding dns 89.2.0.1 adding dns 89.2.0.2 ---- recalbox-config.sh ---- [ 15.85] : no wlan interface found ---- recalbox-config.sh ---- [ 18.87] : Starting S94manager Will not start pm2 : system.api.enabled is set to 0
-
@blaadr unplug your Ethernet cable otherwise the Wlan0 card won't initialize. According to the capture you sent you are already connected to your network through wire and you got an IP address in 192.168.0.x. You won't manage to get another card on the same network until you unplug the first one.
So lose the network cable and reboot the pi with the usb dongle only in order to check if the network card initializes.
Once booted try to initiate a "ping recalbox" command from your Windows machine connected to the network and see if the Pi replies. -
@gkralicek2 Ok. I managed to isolate the part of the recalbox.log file that matches the boot with Ethernet, I think it is OK. Here is the part of the file :
[ 11.37] : starting new log [ 11.41] : converting dos to unix carriage return characters [ 12.18] : setting hostname to RECALBOX [ 12.19] : setting audio volume to 90 [ 12.23] : setting audio to auto ---- recalbox-config.sh ---- [ 12.27] : setting audio volume : 90 ---- recalbox-config.sh ---- [ 12.30] : setting audio output mode : auto numid=3,iface=MIXER,name='PCM Playback Route' ; type=INTEGER,access=rw------,values=1,min=0,max=2,step=0 : values=0 Simple mixer control 'PCM',0 Capabilities: pvolume pvolume-joined pswitch pswitch-joined Playback channels: Mono Limits: Playback -10239 - 400 Mono: Playback -663 [90%] [-6.63dB] [on] [ 12.44] : creating network entry in /var/lib/wpa_supplicant.conf [ 12.49] : updated wifi settings : ssid=NUMERICABLE-B023 key=BNKFPLJB1K [ 12.52] : setting keyboard layout to fr Loading /usr/share/keymaps/i386/azerty/fr.map.gz [ 13.13] : starting emulationstation with lang = fr_FR [ 13.15] : Starting emulationstation with command : [ 13.18] : HOME=/recalbox/share/system LANG="fr_FR.UTF-8" SDL_VIDEO_GL_DRIVER=/usr/lib/libGLESv2.so SDL_NOMOUSE=1 /usr/bin/emulationstation; [ -f /tmp/shutdown.please ] && (rm /tmp/shutdown.please; shutdown -h now);[ -f /tmp/reboot.please ] && (rm /tmp/reboot.please; shutdown -r now) ---- recalbox-config.sh ---- udhcpc (v1.24.1) started Sending discover... Sending discover... Sending discover... No lease, failing ---- recalbox-config.sh ---- [ 28.12] : no wlan interface found [ 31.19] : Starting S94manager Will not start pm2 : system.api.enabled is set to 0 ---- recalbox-config.sh ----
-
@blaadr The wire connection is indeed down but the Wlan0 still hasn't initialized cause "no wlan interface found".
You dongle is not detected by the system, hence no driver is installed to handle it and mount the wlan0 interface :=(( -
Maybe should I try reinstalling from zero the last update of the recalbox OS, is there a possibility that It will solve the problem ?
-
@blaadr That's the only thing that remains to be done i'm afraid. Try to make a fresh installation and do it having the dongle installed on your usb port so that it can be initialized properly.
-
@gkralicek2 ... not better after reinstalling... I will try with another usb dongle, any advice about which one to get ?