leejones15
Posts: 7
Joined: Wed Jan 01, 2014 6:55 pm

(another) Wifi issue

Wed Dec 04, 2019 4:06 am

Hi Folks,
I am a long time RPi user, but only a superficial one (I just install Retropie and make old game consoles) so I'm having some trouble...
I got an RPi 4 and would like to run Raspian and Pygame or Python Arcade (I teach Python in high school and have some students I want to teach to make platformers). However, I am having trouble using the onboard Wifi.
When I first connected, the SSID I connect to showed up, I typed in the password, but then it (the SSID) disappeared. I turned my phone into a hotspot and it showed up, so I connected and typed in the password and it disappeared, too. When I click on the wifi symbol in Raspian, it says "No APs." I tried using one of my Wifi dongles from my old Pis and it went through the same process for wlan1 (appear-connect-disappear).

I'm sorry to say I'm not a native RPi speaker, so if you have any ideas, can you provide step-by-step? I've looked over some other posts on the subject and most replies and solutions involve things I'm not sure how to do...

Thanks in advance!

renice123
Posts: 84
Joined: Tue Oct 15, 2019 3:56 pm

Re: (another) Wifi issue

Wed Dec 04, 2019 1:18 pm

Try to check the status of your network on the command line in the terminal
Start simple, these packages work by default

dpkg -l | grep wpasupplicant

dpkg -l | grep wireless-tools

is everything right?

ifconfig -a

wlan0?

iwlist scanning | grep "IEE"

WPA2?

iwlist scanning | grep "ESSID"

network name

iwlist scanning | grep "Authentication"

PSK?

If you have WEP encryption, you can even connect manually

sudo iw dev wlan0 connect [network SSID] key 0:[WEP key]

If you have WPA2 and PSK (usually all routers use these settings), then you will need to make the file /etc/wpa_supplicant/wpa_supplicant.conf

Usually wi-fi setup is quite easy if the access point is correctly installed.

Code: Select all

ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
update_config=1
country=US

network={
	ssid="*****"
	psk="PASSWORD"
	key_mgmt=WPA-PSK
	disabled=1
}

network={
	ssid="******"
	psk="PASSWORD"
	key_mgmt=WPA-PSK
}

User avatar
DougieLawson
Posts: 36511
Joined: Sun Jun 16, 2013 11:19 pm
Location: Basingstoke, UK
Contact: Website Twitter

Re: (another) Wifi issue

Wed Dec 04, 2019 4:56 pm

Code: Select all

disabled=1
I'd remove that clause as it's going to work better if it is enabled.
Note: Having anything humorous in your signature is completely banned on this forum. Wear a tin-foil hat and you'll get a ban.

Any DMs sent on Twitter will be answered next month.

This is a doctor free zone.

pibobk
Posts: 43
Joined: Wed Jun 27, 2018 10:09 pm

Re: (another) Wifi issue

Wed Dec 04, 2019 5:44 pm

This is from an absolute newbie, but I wonder if this might have some relevance. Apologies if not.

Just had wifi connection problem and after a lot of messing about, it came down to the metal heatsink box.

https://www.martinrowan.co.uk/2019/08/w ... i-4-cases/

Bought a Pi4 and needed a case to smarten and tidy things up. I thought in view of the alleged heat issue I'd kill two birds with one stone and bought a metal heat sink case.

After a lot of faffing around involving my internet provider and experiments, here's the result:

With metal case/heatsink average 7.3Mbps
Without the case and insignificant temperature rise average 35Mbps

Think I might buy a plastic case and a Shim (to be on the safe side).

renice123
Posts: 84
Joined: Tue Oct 15, 2019 3:56 pm

Re: (another) Wifi issue

Wed Dec 04, 2019 5:58 pm

Of course, shielding always degrades communication. Especially if wi-fi is in the 5 GHz range.
And by the way, my connection to 5 GHz was broken, the window also “disappeared”.
I solved the problem by increasing the power of the router (I indicated in the settings to increase the power of the transmitter). The microwave range is very moody and even the position of the computer plays a role.
The 2.4 GHz band is much more predictable. But I have it clogged with the signals of neighbors' routers
In my house everyone uses wi-fi
 

leejones15
Posts: 7
Joined: Wed Jan 01, 2014 6:55 pm

Re: (another) Wifi issue

Wed Dec 04, 2019 10:44 pm

Thanks, all. Below is the output from running what renice suggested. With I was doing this, I was connected over LAN (so I could use SSH), so I'm not sure if that made a difference. However, what stands out to me is "doesn't support scanning" at the end.

Code: Select all

pi@raspberrypi:~ $ dpkg -l | grep wpasupplicant
ii  wpasupplicant                         2:2.7+git20190128+0c1e29f-6+deb10u1 armhf        client support for WPA and WPA2 (IEEE 802.11i)
pi@raspberrypi:~ $ dpkg -l | grep wireless-tools
ii  wireless-tools                        30~pre9-13                          armhf        Tools for manipulating Linux Wireless Extensions
pi@raspberrypi:~ $ ifconfig -a
eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 192.168.5.161  netmask 255.255.0.0  broadcast 192.168.255.255
        inet6 fe80::bd0d:98c6:a4f6:e0ac  prefixlen 64  scopeid 0x20<link>
        ether dc:a6:32:57:0e:69  txqueuelen 1000  (Ethernet)
        RX packets 8485  bytes 1028816 (1004.7 KiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 114  bytes 15512 (15.1 KiB)
        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 6  bytes 570 (570.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 6  bytes 570 (570.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

wlan0: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500
        ether dc:a6:32:57:0e:6a  txqueuelen 1000  (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

pi@raspberrypi:~ $ iwlist scanning | grep "IEE"
eth0      Interface doesn't support scanning.

lo        Interface doesn't support scanning.

pi@raspberrypi:~ $ iwlist scanning | grep "ESSID"
eth0      Interface doesn't support scanning.

lo        Interface doesn't support scanning.

pi@raspberrypi:~ $ iwlist scanning | grep "Authentication"
eth0      Interface doesn't support scanning.

lo        Interface doesn't support scanning.

pi@raspberrypi:~ $ /etc/wpa_supplicant/wpa_supplicant.conf
-bash: /etc/wpa_supplicant/wpa_supplicant.conf: Permission denied
Also, per the comment on heatsinks, I actually started without any heatsinks but had read about some issues with the RPi 4 getting too hot so I put them on. No difference.

andersdk
Posts: 27
Joined: Sun Feb 03, 2019 8:29 pm

Re: (another) Wifi issue

Thu Dec 05, 2019 12:59 am

What does lo stand for in the listing ?
eth0 is your gigabit ethernet interface, which you are not using.

wlan0 is your wireless WiFi lan interface, and this does not pass the no scanning support message.
Also your SSH session presumeably worked fine, so your WiFi is definately working.

If you have a Windows PC, you can install XRDP from your SSH connection on your Pi4:
sudo apt install xrdp

XRDP is the Linux interface to communicate with Windows RDP (remote desktop protocol).
This will allow you to open a remote desktop session from Windows to your Pi4 with the full graphics, not just your text terminal as with SSH.

trejan
Posts: 853
Joined: Tue Jul 02, 2019 2:28 pm

Re: (another) Wifi issue

Thu Dec 05, 2019 1:22 am

andersdk wrote:
Thu Dec 05, 2019 12:59 am
What does lo stand for in the listing ?
Loopback interface. It is what 127.0.0.1/8 is bound to.
andersdk wrote:
Thu Dec 05, 2019 12:59 am
Also your SSH session presumeably worked fine, so your WiFi is definately working.
They're using Ethernet to connect to the Pi.

andersdk
Posts: 27
Joined: Sun Feb 03, 2019 8:29 pm

Re: (another) Wifi issue

Thu Dec 05, 2019 5:04 am

Thanks trejan !

User avatar
rpdom
Posts: 15567
Joined: Sun May 06, 2012 5:17 am
Location: Chelmsford, Essex, UK

Re: (another) Wifi issue

Thu Dec 05, 2019 5:07 am

The "Does not support scanning" is normal for those interfaces. eth0 is the wired connection and lo is the internal loopback. you can get rid of those messages with

Code: Select all

iwlist scanning 2>/dev/null | grep "ESSID"
or just specify the wireless interface in the command

Code: Select all

iwlist wlan0 scan | grep "ESSID"
the lack of any output from the scan suggests no wifi networks have been detected.

leejones15
Posts: 7
Joined: Wed Jan 01, 2014 6:55 pm

Re: (another) Wifi issue

Thu Dec 05, 2019 6:28 am

rpdom wrote: the lack of any output from the scan suggests no wifi networks have been detected.
Yep, that's the issue. There definitely is Wifi around, including my mobile hotspot.

renice123
Posts: 84
Joined: Tue Oct 15, 2019 3:56 pm

Re: (another) Wifi issue

Thu Dec 05, 2019 8:25 am

Since all Raspberries are the same (from the point of view of preinstalled software, unless another distribution kit is used), we can assume that the command of one user for standard blowing is suitable for another user =)
Here is my conclusion to the commands
This is abbreviated, I removed the excess information
IE: IEEE 802.11i/WPA2 Version 1
Authentication Suites (1) : PSK
That is, I see encryption methods. This is important, since the further configuration depends on it.

No need to give a command /etc/wpa_supplicant/wpa_supplicant.conf
The viewing command is nano /etc/wpa_supplicant/wpa_supplicant.conf (nano can be replaced with any editor, can vim, leafpad & etc)

To the iwlist scanning team | grep "ESSID" I see in the terminal a list of available networks

ESSID:"sweethome"
ESSID:"GPON_4369"
ESSID:"kv306"
ESSID:"2G_FF19F7"
ESSID:"GPON_4406"
ESSID:"staf1"
ESSID:"5G_FF19F7"
ESSID:"home_5G"


Thus, if the "iwlist scanning" commands do not produce output, something does not work correctly at the network discovery level. And in this case, of course, setting up the network will not work in a simple way.
Perhaps you configured the access point on Android “in a special way”? I am not an expert on Android, so I can only assume that the access point is configured somehow unusual, which does not allow the computer to detect a wi-fi network

Perhaps the wi-fi network on the computer is simply disabled.
What conclusion does the team give?
sudo ip link set wlan0 up
(SIOCSIFFLAGS: Operation not possible due to RF-kill?)

If so, then enable wi-fi =)
To make sure wi-fi is turned off programmatically, issue the command

sudo rfkill list all

You will see the following output

phy0: Wireless LAN
Soft blocked: yes
Hard blocked: no

tpacpi_bluetooth_sw: Bluetooth
Soft blocked: yes
Hard blocked: yes



Turn on wi-fi programmatically (you can click the two arrows in the window at the top)

If you write such a command, do you see a long list?
sudo iw dev wlan0 scan


Do not worry about overheating of raspberries, your loads are not so large that raspberries are heated to critical values.

Return to “Troubleshooting”